M-code reference

M00: Program stop

M00 is program stop. Stops the program until the operator presses cycle start. It is non-modal, so it acts only on the line it is written on.

What M00 does

M00 stops the program unconditionally. The spindle and coolant stop on most machines, and the program continues from the next line when the operator presses cycle start. It is used to check a part, clear chips or flip a part.

TypeM-code
MachineMill and lathe
GroupProgram control
ModalNo: acts only on its own line

M00 example

M00 (CHECK BORE SIZE)

Stop and wait for the operator.

WordWhat it means here
M00Program stop

Codes people confuse with M00

CodeWhat it does instead
M01 Optional stop. Stops only when the Optional Stop switch is on.
M30 End of program and rewind. Ends the program and returns to the first line, ready for the next part.
G04 Dwell. Pauses motion for a set time; the spindle keeps running.

Memory hook: M00 always stops. M01 stops only if Optional Stop is on.

Other codes in the program control group

These also act only on their own line.

  • M01 Optional stop
  • M02 End of program
  • M30 End of program and rewind
  • M97 Local subprogram call (Haas)
  • M98 Subprogram call
  • M99 Subprogram end / return

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: M00

  1. What does M00 do? (Mill and lathe)

  2. Which code: Stops the program until the operator presses cycle start.(Mill and lathe)

  3. What does M01 do? (Mill and lathe)

Show the answers
  1. Stops the program until the operator presses cycle start.
  2. M00
  3. Stops only when the Optional Stop switch is on.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does M00 mean in CNC programming?
Program stop. Stops the program until the operator presses cycle start.
Is M00 modal?
No. M00 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 M00 and M01?
M00 (program stop): stops the program until the operator presses cycle start. M01 (optional stop): stops only when the Optional Stop switch is on. A way to remember it: m00 always stops. M01 stops only if Optional Stop is on.
What is the difference between M00 and M30?
M00 (program stop): stops the program until the operator presses cycle start. M30 (end of program and rewind): ends the program and returns to the first line, ready for the next part. A way to remember it: m00 always stops. M01 stops only if Optional Stop is on.

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.

Free preview · no card Try G-Code Sprint