The M06 code tells the CNC to perform a tool change.
The machine will swap the tool that is in the ready position of the automatic tool changer into the spindle.
Want to learn more about CNC G Code?
Preparing the CNC for a tool change
You should be aware of some of the characteristics of your cutting tool. The size, as in diameter and length need to be taken into account.
A cutter with a very large diameter may need to be placed near empty spots in your tool changer so it doesn’t smash into other tools.
Length isn’t usually as big of an issue but still keep it in mind to make sure you have enough clearance with the machine and with your part.
Another big thing to consider is the weight of the cutter. Check your machine manual because the capabilities of various machines differ.
Remember that the total weight of everything you are putting in the spindle or automatic tool changer is what counts, not just the cutter.
Executing a tool change
Certain conditions need to be met for a safe tool change.
Machine movement needs to be stopped and the machine should be in the tool change position. Often this position is the same as the home position.
The spindle should be stopped and the tool to be swapped in should be in the ready position.
Performing a tool change without an automatic tool changer
If your machine doesn’t have an automatic tool changer, then the operator (probably you) will need to change the tools manually.
The best way to do this is to put a program stop in your program using the M00 code. You should include comments in your program at the program stop to tell the operator what they are expected to do.
What other CNC codes are used with the M06 command?
The main code used with the M06 command is the T code.
The T code selects the tool that will be swapped in.
The line of code performing the tool change will usually be something like:
In this example tool #2 is readied for the tool change and then the M06 tells the CNC to swap the tool into the spindle.
M6 vs M06
Some people get confused about whether the 0 is required to include with an M06 code.
To clear this up, there is no need to include the zero in the code.
The CNC machine will read the code the same. It really is just a matter of preference.
Often you will see the full M06 code used in textbooks or other reference materials. In practice though, many prefer the shortened M6 code in their programs.
If you are working on your own, then go with whichever format you prefer.
If you work in a bigger shop, make sure to stick to the format that the business has been using.
Frequently asked questions about the M06 code
Do you use the M06 code if you want to switch to an empty spindle?
Yes, just call up a tool holder location without a tool in it.
When the M06 command is used the machine will swap in the empty spot, leaving no tool in the spindle.
Do you need to use the M06 command if you don’t have an automatic tool changer?
No, if you don’t have an automatic tool changer, the M06 code isn’t needed.
Without an automatic tool changer all tool changes will need to be done manually.