G96 without G50: spindle runaway caught by a G-code checker

A G-code checker warns about G96 without G50 on the G96 line, and the warning is worth reading: in constant surface speed the spindle speeds up as the tool moves toward the centre, and with no G50 S limit it can reach the machine’s top speed with a part, chuck and jaws that were never meant to spin that fast.

G-code checker on a Fanuc lathe: G96 is on with no G50 S spindle limit, warning on line 9
NC Proof Turn · Fanuc 0i-TF: facing a 3 in bar to the centre in G96 with no limit
NC Proof G-code checker on a Fanuc 0i-TF lathe: the warning on line 9 marked in the code, in the Errors & warnings list and in the 3D view
The whole app: line 9 lit in the code, the message under it, the 3D view at that moment

Why the spindle runs away

In G96 the control holds the surface speed, so rpm = surface speed × 3.82 / diameter (inch). Facing a 3 in bar at 600 ft/min starts near 760 rpm. At Ø0.1 it asks for about 22,900 rpm, and at the centre it is limited only by the machine’s maximum.

The fix

Clamp the spindle with G50 S before G96. On Fanuc (G-code system A) and on Haas lathes, G50 with an S word sets the maximum spindle speed:

G96 S600 M03          (wrong: no limit)

G50 S2500             (right: never above 2500 rpm)
G96 S600 M03

Pick the limit from the chuck, the jaws and the part’s balance, not from the machine’s top speed. The program after the fix:

%
O01099 (FACE TO CENTRE - FANUC LATHE)
(FANUC 0I-TF)
(STOCK 3.000 DIA - STICK OUT 1.0)
(T0101 CNMG 432 OD ROUGH)
G20 G18 G40 G99
G28 U0. W0.
T0101
G50 S2500
G96 S600 M03
G00 X3.1 Z0. M08
G01 X-0.0625 F0.008
G00 Z0.1
X3.5 Z2. M09
G28 U0. W0.
M30
%
The fixed program on a Fanuc 0i-TF lathe 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 warns on the G96 line when no G50 S limit is in force, and with a machine chosen it also notes a programmed speed above that machine’s top rpm.

G96 and G50 FAQ

What does G50 S do on a lathe?

On Fanuc (G-code system A) and Haas lathes, G50 with an S word sets the maximum spindle speed in G96 constant surface speed.

How fast does the spindle turn at the centre in G96?

In theory without limit: rpm rises as the diameter falls, so it reaches the G50 limit or, with none, the machine’s maximum.

Is G50 S always needed with G96?

It is good practice on every lathe, and especially when facing to the centre or holding light or long parts.

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