M03 G-Code Command

  • 2 mins read

M03 G-Code Command

M03 is a standard G-code command used in CNC machining that instructs the machine to turn on the spindle in a clockwise direction. This command is used to start the spindle and initiate the cutting process. The M03 command is typically used along with a speed command (S) that sets the spindle speed in revolutions per minute (RPM). The M03 command can also be followed in the program by other parameters such as coolant commands (M08 for coolant on, M09 for coolant off).

Cnc tooling is typically designed to cut with it spinning in a clockwise direction making the M03 G-Code command used to turn on a spindle in the majority programs.

How M03 G-Code Command Is Used

Here’s an example of M03 being used in a G-code program with comments in brackets:

T1 M06                  (call up Tool 1)
G00 X0 Y0 Z50           (rapid move to pre-position)
M03 S1000               (start spindle at 1000 RPM)
G43 H01 Z2.             (set the tool length and move to starting position)
G01 X10 Y10 Z-5 F500    (move to cutting position at feed rate of 500 mm/min)
G02 X20 Y0 Z-5 I10 J-10 (cut a clockwise arc to position X20 Y0 with a radius of 10 mm)
G01 X30 Y10 Z-5         (move to next cutting position)
G00 Z10.                (move above part)
M05                     (stop spindle)
M30                     (program end)

In this example, the program starts by moving rapidly to the starting position (X0 Y0 Z50). The M03 command is then used to start the spindle at 1000 RPM. The program then moves to the cutting position (X10 Y10 Z-5) at a feed rate of 500 mm/min. The G02 command is used to cut a clockwise arc with a radius of 10 mm to position X20 Y0. The program then moves to the next cutting position (X30 Y10 Z-5), and the M05 command is used to stop the spindle.