G96 and G97: Constant Surface Speed and RPM

G96 makes the S word a surface speed and lets the control change the RPM as the diameter changes. G97 makes S a fixed spindle speed in RPM.

G96 and G97 decide what the S word means.

  • G96: constant surface speed (CSS). S is a cutting speed: surface feet per minute (SFM) in G20, metres per minute in G21. The control changes the RPM continuously as the cutting diameter changes, so the speed at the cutting edge stays the same.
  • G97: constant RPM. S is a spindle speed in revolutions per minute.

Both are modal: the mode stays until the other one is programmed.

Why constant surface speed helps on a lathe

On a lathe, the cutting speed depends on the diameter being cut. Facing a 100 mm bar at a fixed 1,000 RPM gives about 314 m/min at the outside, but almost nothing near the centre. G96 holds the speed steady by raising the RPM as the tool moves in:

  • RPM = surface speed × 1000 ÷ (π × diameter in mm)
  • RPM = SFM × 3.82 ÷ diameter in inches

A steady cutting speed gives a more even finish and longer tool life. The SFM calculator converts between surface speed and RPM for any diameter.

Always clamp the maximum RPM

As the tool approaches X0, G96 asks for ever higher RPM. Set a limit before you start CSS. On Fanuc and Haas lathes using the standard (A) G-code system, that's G50 with an S word:

G50 S2500      (never exceed 2,500 RPM)
G96 S180 M03   (180 m/min constant surface speed)

On controls that use the B or C G-code systems, the clamp is set with G92 S… instead. Check the manual for your control.

When to switch to G97

  • Threading. Threading cycles need a constant RPM, so switch to G97 before them.
  • Drilling and tapping on the lathe centreline. At X0 the diameter is zero, so G96 would run the spindle at the clamp speed. Use a fixed RPM.
  • Parts that are out of balance, or held in fixtures where high RPM is unsafe.

On mills

Mills rarely use G96, because a milling cutter's diameter doesn't change during the cut. Many mill programs still include G97 on the spindle line, such as G97 S8000 M03, so the control reads S as RPM whatever mode it was left in.

How CutViewer shows G96 and G97

CutViewer has no lathe mode. It reads the S word as a spindle speed in RPM for the Job panel and the spindle range, and doesn't apply constant surface speed, so a G96 surface speed is shown as if it were an RPM.

Frequently Asked Questions

What is the difference between G96 and G97?

With G96, S is a surface speed (feet per minute in G20, metres per minute in G21) and the control raises or lowers the RPM as the cutting diameter changes. With G97, S is a fixed spindle speed in RPM.

Why do I need G50 with G96?

As a lathe tool moves toward the centre of the part, G96 keeps raising the RPM, which in theory becomes infinite at X0. A maximum spindle speed (G50 S… on Fanuc and Haas lathes in the standard G-code system) caps it at a safe value for the chuck and the part.

Should I thread in G96 or G97?

Use G97. Threading cycles rely on the spindle speed staying constant through the pass, so most programmers switch to G97 with a fixed RPM before any threading.

Why does G97 appear in my mill program?

Some mill post processors put G97 on the spindle line, as in G97 S8000 M03, to make sure S is read as RPM. Mills rarely use constant surface speed, so G97 is effectively the default.

Check your own program before you cut: open it in CutViewer to see the toolpath in 3D, the run time and any problems.

Open CutViewer