M3 G-code

M3 starts the spindle at a specific speed.

What is a Spindle?

A spindle is a controlled motor that turns a tool (such as an endmill) at a given speed to allow it to remove material from the workpiece.

This is commonly used in CNC milling operations.

Speed Parameter

The M3 command must be accompanied by an S parameter which sets the speed of rotation.

M3’s counterpart is the M5 command which turns the spindle off (equivalent to M3 S0).

Format

The command is used as such:

M3 S1000

Which means: start the spindle and make it turn at 1000 rotations per minute.

Parameters

Parameter Usage Example
S The spindle must turn at this speed in rotations per minute M3 S1000

Configuration

The spindle functionality of Smoothie is configured via the Spindle module.

You’ll need to set up appropriate configuration options in your config file to enable spindle control.

Required Setup

Before using M3, ensure you have:

  • Enabled the spindle module in your configuration
  • Configured the appropriate pin for spindle control
  • Set the spindle speed range (min/max RPM)

Further Reading

These resources are used as references for Gcode: