M06: Tool change
What M06 does
M06 swaps the tool in the spindle for the one selected by the T word, usually written together as T05 M06. On most machining centres the axes must be at the tool change position first, and the new tool's length offset (G43 H) is turned on afterwards.
| Type | M-code |
|---|---|
| Machine | Mill |
| Group | Tool |
| Modal | No: acts only on its own line |
M06 example
T05 M06 Load tool 5 into the spindle.
| Word | What it means here |
|---|---|
T05 | tool number |
M06 | Tool change |
Codes people confuse with M06
| Code | What it does instead |
|---|---|
G43 | Tool length compensation +. Applies the tool length offset H so Z positions are measured from the tool tip. |
M05 | Spindle stop. Stops the spindle. |
Where controls differ
- Lathes: Most lathes index the turret with the T word alone (T0101), no M06.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: M06
-
What does
M06do? (Mill) -
Which code: Changes to the tool called by T.(Mill)
-
What does
G43do? (Mill)
Show the answers
- Changes to the tool called by T.
- M06
- Applies the tool length offset H so Z positions are measured from the tool tip.
Frequently asked questions
- What does M06 mean in CNC programming?
- Tool change. Changes to the tool called by T.
- Is M06 modal?
- No. M06 acts only on the line where it is written; the next line goes back to whatever modal codes were already active.
- What is the difference between M06 and G43?
- M06 (tool change): changes to the tool called by T. G43 (tool length compensation +): applies the tool length offset H so Z positions are measured from the tool tip.
- What is the difference between M06 and M05?
- M06 (tool change): changes to the tool called by T. M05 (spindle stop): stops the spindle.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.