G-code reference

G97: Constant RPM

G97 is constant RPM. S is a fixed spindle speed in RPM. It is modal, so it stays active on the following lines until another code from the same group replaces it.

What G97 does

G97 cancels constant surface speed: S is read as revolutions per minute. Drilling, tapping and threading on a lathe all use G97 so the speed does not change mid-feature.

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

G97 example

G97 S800 M03

Spindle at a fixed 800 RPM.

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

Codes people confuse with G97

CodeWhat it does instead
G96 Constant surface speed. S is a cutting speed (m/min or ft/min); RPM changes with diameter.

Other codes in the spindle speed mode group

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

  • G96 Constant surface speed

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: G97

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

  2. Which code: S is a fixed spindle speed in RPM.(Mill and lathe)

  3. What does G96 do? (Lathe)

Show the answers
  1. S is a fixed spindle speed in RPM.
  2. G97
  3. S is a cutting speed (m/min or ft/min); RPM changes with diameter.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does G97 mean in CNC programming?
Constant RPM. S is a fixed spindle speed in RPM.
Is G97 modal?
Yes. G97 belongs to the spindle speed mode group and stays active until another code from that group is programmed.
What is the difference between G97 and G96?
G97 (constant RPM): s is a fixed spindle speed in RPM. G96 (constant surface speed): s is a cutting speed (m/min or ft/min); RPM changes with diameter.

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