These codes will stop g-code program execution:
- M00: Stop the program temporarily (until the operator starts it running again) regardless of whether the optional stop switch is set.
- M01: Stop the program temporarily (until the operator starts it running again) only if the optional stop switch is set.
- M02: End the program, reset all parameters, but leave if the program is restarted, it will run from the M02 line.
- M30: End the program, reset all parameters, and rewind the program so if it is restarted, it will run from the first line.
Each code will stop the spindle and turn off coolant.
Typical Uses
M00 - Give the operator a message or comment
Just put a comment right after the M00 telling the operator what they need to do:
M00
( Clear the Chips! )
M01 - Optional Stop
Many operators like to put an M01 after every tool change. This stops the machine so the operator can inspect how things are going.
M02 - Change to M30
Most programmers use M30 and never user M02.
Be the first to know about updates at CNC Cookbook
Join our newsletter to get updates on what's next at CNC Cookbook.