CNC (Computer Numerical Control) machines use a standardized set of commands known as G-codes (preparatory functions) and M-codes (miscellaneous functions) to control the machine's hardware.
1. Understanding M-Codes:
Miscellaneous codes (M-codes) control the "on/off" actions of the machine, such as the spindle, coolant, and tool changes.
2. Decoding Spindle-Related M-Codes:
To operate a CNC lathe, there is a specific sequence for the spindle:
• M03: Spindle ON (Clockwise rotation).
• M04: Spindle ON (Counter-clockwise rotation).
• M05:
Spindle STOP. This command cuts the power to the spindle motor and typically applies a brake to bring it to a complete halt before a tool change or at the end of a program.
3. Role of M05 in Part Programming:
The M05 command is critical for safety and process control. It is always used:
• Before the machine performs an automatic tool change (M06).
• When the operator needs to inspect the part or clear chips manually.
• At the very end of the part program (often just before M30).
4. Conclusion:
According to the Fanuc and ISO standards for CNC programming, M05 is the universal miscellaneous function for stopping the spindle.