What T0–Tn means

A tool selection changes which tool's coordinate offsets, heaters and extrusion state the controller may use. Marlin commonly accepts T0 through configured tool slots; RepRapFirmware can run tool-free, pre-change and post-change macros. Those routines may contain motion that is not written next to the T line.

The command is not portable across every controller. Klipper documents ACTIVATE_EXTRUDER and supports user-defined T macros rather than a universal built-in tool changer. In LinuxCNC, T prepares a tool and M6 performs the change. A numeric slot never proves which color, material or nozzle is installed.

Syntax and parameters

T<tool>
T
tool

Tool or extruder slot number. Valid values and meanings come from the target machine configuration.

F

Marlin tool-change movement feed rate where supported.

S

Marlin option controlling whether XY movement is allowed during the change; version and configuration matter.

No parameters

On recent Marlin versions, bare T can report the active tool; other systems may reject or reinterpret it.

Practical examples

Select tool 1 and prime it

T1
M83
G1 E3 F300

The T line changes the active slot; the explicit G1 line is the only visible priming motion in this snippet.

Select tool 0

T0

Any parking, offset, heating or purge routine may be firmware- or macro-defined outside this one line.

Firmware context

SystemStatusWhat changes
MarlinCommonCommon on multi-extruder and MMU configurations. Tool count, motion, F/S options and special MMU values depend on the build and machine.
KlipperCheck dialectACTIVATE_EXTRUDER is documented for changing the active extruder; printers may define T0/T1 macros, so inspect printer.cfg.
RepRapFirmwareCommonT selects a configured tool and may run tfree, tpre and tpost macros with offsets and heater state changes.
CNC controllersCheck dialectOn LinuxCNC, T prepares the selected tool and M6 performs the change; tool-length compensation is a separate action.

What this viewer can show

Analyzed

The viewer tracks supported physical T slots independently, assigns extrusion and tool colors to the active slot, and flags unsupported indices. It does not invent motion, offsets, purge volumes or materials hidden in machine macros.

Common mistakes

  • A T index is not a material name, color or nozzle diameter.
  • Tool-change macros can move the machine even when the file contains only one T line.
  • Do not copy T syntax between printer firmware and CNC controllers without checking the target documentation.

Primary sources

This page is an original explanation, reviewed against the firmware documentation below. Always confirm commands against the firmware and configuration on the machine that will execute them.