Program Stop and End G-Codes [M00, M01, M02, and M30]

Last modified: March 29, 2024

CNCCookbook’s G-Code Tutorial

These codes will stop g-code program execution:

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.