7 months by cncdivi

CNCCookbook’s G-Code Tutorial

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.

 

Like what you read on CNCCookbook?

Join 100,000+ CNC'ers!  Get our latest blog posts delivered straight to your email inbox once a week for free. Plus, we’ll give you access to some great CNC reference materials including:

  • Our Big List of over 200 CNC Tips and Techniques
  • Our Free GCode Programming Basics Course
  • And more!

Just enter your name and email address below:

Full Name
Email *
100% Privacy: We will never Spam you!

5/5 - (1 vote)

Recently updated on March 29th, 2024 at 08:01 am