5 days by cncdivi

CNCCookbook’s G-Code Tutorial

The spindle control g-codes control when the spindle is spinning and which direction it spins:

  • M03:  Start spindle spinning clockwise.
  • M04:  Start spindle spinning anti-clockwise.
  • M05:  Stop spindle spinning.

Use the S word to control how many rpms the spindle turns at.

Most M03 and M04 g-codes are issued right after the S word establishes the rpm.  For example:

S2000 M03

That g-code will start the spindle running clockwise at 2000 rpm.

Example

Note:  For most g-code dialects, the leading 0 is optional.  You may refer to M03 as M3, M04 as M4, and M05 as M5 gcode.

 

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 23rd, 2024 at 06:40 am