M-code reference
M06 M-Code: Tool Change
Tool Change — Performs an automatic tool change to the tool selected with T. Many machines pre-stage the next tool with a T word right after M06 to save time.
| Property | Value |
|---|---|
| Code | M06 |
| Function | Tool Change |
| Used on | Milling machines |
What does M06 do?
Performs an automatic tool change to the tool selected with T. Many machines pre-stage the next tool with a T word right after M06 to save time.
M06 example
T5 M06
T6 (pre-stage next tool)
G90 G54 G00 X0 Y0 S6000 M03
G43 H05 Z50.0Tips
- Move to a safe Z (G28/G53) before M06 if the machine does not do it automatically.
- On lathes, the T word alone (T0101) indexes the turret; no M06 is used.
M-codes vary between machine builders. Codes from M00 to M09, M30 and M98/M99 are nearly universal; most others are defined by the machine builder. Always check the M-code list in your machine manual.
Related codes
Most-used M-codes
| Code | Function |
|---|---|
M00 | Program Stop |
M01 | Optional Stop |
M03 | Spindle On Clockwise |
M04 | Spindle On Counter-Clockwise |
M05 | Spindle Stop |
M08 | Flood Coolant On |
M09 | Coolant Off |
M30 | Program End and Rewind |
M98 | Subprogram Call |
M99 | Subprogram Return / Loop |
Frequently asked questions
What does M06 mean on a CNC machine?
M06 is Tool Change. Performs an automatic tool change to the tool selected with T. Many machines pre-stage the next tool with a T word right after M06 to save time.