Cutting with the spindle stopped: M03 caught by a G-code checker

A G-code checker finds the first feed move made with the spindle stopped, the mistake that breaks end mills and inserts in a fraction of a second. The usual cause is a missing M03, or an M03 on the same line as the plunge on a Haas.

G-code checker on a Haas mill: Tool T1 cuts with the spindle stopped, no M03 or M04, line 10
NC Proof Mill · Haas VF-3: the plunge on line 10 runs with the spindle off
NC Proof G-code checker on a Haas VF-3 mill: the error on line 10 marked in the code, in the Errors & warnings list and in the 3D view
The whole app: line 10 lit in the code, the message under it, the 3D view at that moment

Why it happens

  • M03 left out after a tool change, an M00 or an M05.
  • M03 on the cutting line on a Haas. Haas mill and lathe manuals say all M codes take effect at the end of the block. So in G01 Z-0.1 F10. M03 the plunge happens first, and the spindle starts after it.
  • A restart in the middle of the program that skips the line with M03.

The fix

Start the spindle on its own line, or on the positioning move before the cut:

G54 G00 X0.75 Y1.5 S3000        (wrong: no M03 here)
...
G01 Z-0.1 F10. M03              (wrong on Haas: M03 acts after the plunge)

G54 G00 X0.75 Y1.5 S3000 M03    (right: running before it gets close)
...
G01 Z-0.1 F10.

The full program after the fix:

%
O01098 (SPINDLE CHECK - HAAS MILL)
(STOCK 4.0 X 3.0 X 1.0 - X0 Y0 TOP LEFT FRONT CORNER)
(T1 1/2 FLAT END MILL - FLUTE 1.0 - STICK OUT 1.5)
G20 G17 G40 G49 G80 G90
T1 M06
G54 G00 X0.75 Y1.5 S3000 M03
G43 H01 Z1. M08
Z0.1
G01 Z-0.1 F10.
X3.25 F20.
G00 Z1. M09
M05
G28 G91 Z0.
G90
M30
%
The fixed program on a Haas VF-3 mill in NC Proof: No errors, the part cut to the end
After the fix: the same program runs to the end with No errors

How the G-code checker finds it

NC Proof follows the spindle state through the program, by each control’s rules: on Haas an M code acts at the end of its block, on Fanuc at the start. Every feed move that cuts with the spindle stopped is an error. It also warns when a tool cuts with the coolant off, and after an M01 when the program does not restart the spindle.

Spindle stopped FAQ

Does M03 on the same line as G01 start the spindle first?

On a Haas, no: all M codes take effect at the end of the block, so the move runs first. On most Fanuc machines the spindle starts at the start of the block, but the machine builder decides.

Where should M03 go?

On the positioning move before the tool reaches the part, or on its own line before it.

Can a G-code checker find this?

Yes. NC Proof flags every cutting move made with the spindle stopped, on its line.

See every error the app checks on Errors & warnings. Paste your own program into NC Proof Turn or NC Proof Mill during the 4-day free trial (no card needed).

More from the blog