M-code reference

M03: Spindle on, clockwise

M03 is spindle on, clockwise. Starts the spindle forward (clockwise) at speed S. It is modal, so it stays active on the following lines until another code from the same group replaces it.

What M03 does

M03 starts the spindle clockwise, seen from the spindle looking toward the work on a mill. It is the normal direction for right-hand tools. It is written with an S word for the speed.

TypeM-code
MachineMill and lathe
GroupSpindle
ModalYes: stays active until replaced by another code from the same group

M03 example

S1200 M03

Spindle on clockwise at 1200 RPM.

WordWhat it means here
S1200spindle speed, or a speed limit or surface speed with some codes
M03Spindle on, clockwise

Codes people confuse with M03

CodeWhat it does instead
M04 Spindle on, counterclockwise. Starts the spindle in reverse (counterclockwise).
M05 Spindle stop. Stops the spindle.

Memory hook: M03 forward, M04 reverse, M05 stop: count 3-4-5.

Other codes in the spindle group

Only one code from a modal group is active at a time. Programming any of these replaces M03.

  • M04 Spindle on, counterclockwise
  • M05 Spindle stop
  • M19 Spindle orientation
  • M29 Rigid tapping mode (Fanuc)

Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.

Quick check: M03

  1. What does M03 do? (Mill and lathe)

  2. Which code: Starts the spindle forward (clockwise) at speed S.(Mill and lathe)

  3. What does M04 do? (Mill and lathe)

Show the answers
  1. Starts the spindle forward (clockwise) at speed S.
  2. M03
  3. Starts the spindle in reverse (counterclockwise).

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does M03 mean in CNC programming?
Spindle on, clockwise. Starts the spindle forward (clockwise) at speed S.
Is M03 modal?
Yes. M03 belongs to the spindle group and stays active until another code from that group is programmed.
What is the difference between M03 and M04?
M03 (spindle on, clockwise): starts the spindle forward (clockwise) at speed S. M04 (spindle on, counterclockwise): starts the spindle in reverse (counterclockwise). A way to remember it: m03 forward, M04 reverse, M05 stop: count 3-4-5.
What is the difference between M03 and M05?
M03 (spindle on, clockwise): starts the spindle forward (clockwise) at speed S. M05 (spindle stop): stops the spindle. A way to remember it: m03 forward, M04 reverse, M05 stop: count 3-4-5.

G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.

Free preview · no card Try G-Code Sprint