M-code reference
M01 M-Code: Optional Stop
Optional Stop — Stops the program only when the Optional Stop switch on the control panel is on. It is placed between tools so an operator can inspect a new setup, then…
| Property | Value |
|---|---|
| Code | M01 |
| Function | Optional Stop |
| Used on | Mills and lathes |
What does M01 do?
Stops the program only when the Optional Stop switch on the control panel is on. It is placed between tools so an operator can inspect a new setup, then switched off for production.
M01 example
G91 G28 Z0
M01
T2 M06Tips
- Put M01 before every tool change in new programs.
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 |
M03 | Spindle On Clockwise |
M04 | Spindle On Counter-Clockwise |
M05 | Spindle Stop |
M06 | Tool Change |
M08 | Flood Coolant On |
M09 | Coolant Off |
M30 | Program End and Rewind |
M98 | Subprogram Call |
M99 | Subprogram Return / Loop |
Frequently asked questions
What does M01 mean on a CNC machine?
M01 is Optional Stop. Stops the program only when the Optional Stop switch on the control panel is on. It is placed between tools so an operator can inspect a new setup, then switched off for production.