G96 / G97 G-Code: Constant SFM vs. Constant RPM

What is Constant Surface Speed (G96 CNC Code)?

G96 G97 Turning

In machining, constant surface cutting speed means programming a CNC lathe to maintain a constant relative velocity between the cutter and the workpiece (Known as the “Cutting Speed”). It is achieved by letting the machine control the spindle RPM according to the working diameter. As the cutting edge gets closer to the center of the workpiece (smaller diameter), the RPM increases to maintain a constant cutting speed.

G96 is the modal Gcode command that instructs the CNC controller to enter a “constant surface cutting speed”. Any motion CNC code that will be entered afterward will behave accordingly. (See the Gcode examples below)

Formulas to calculate the required RPM that will yield the needed cutting speed.

The formulas below calculate the spindle speed that the CNC controller will request when a certain cutting speed is entered in G96 mode. (Pay attention that the formulas are different for Imperial and Metric units.)

Imperial Units Formula

\( \large RPM = \huge \frac{12 \times V_c}{\pi \times d} \)
  • Vc in SFM (Surface Feet per minute)

Metric Units Formula

\( \large RPM = \huge \frac{1,000 \times V_c}{\pi \times d} \)
  • Vc in meters per minute.

Learn more about cutting speed formulas and units in our Cutting Speed Page

What is Constant RPM (G97 CNC Code)?

In machining, constant RPM means programming a CNC lathe to maintain the spindle’s RPM constant. Because of this, the Surface Speed (SFM / Vc) varies when machining at different diameters. As the cutter gets further away from the center of the workpiece, the cutting speed increases.

G97 is the modal Gcode command that instructs the CNC controller to enter “constant spindle speed” mode. Any motion CNC code that will be entered afterward will behave accordingly. (See the Gcode examples below)

Formulas to determine the cutting speed for a certain RPM

The formulas below calculate the obtained cutting speed (SFM / Vc) when a certain spindle speed is programmed in G97 mode. (Pay attention that the formulas are different for Imperial and Metric units.)

Imperial Units Formula

\( \large V_c= \huge \frac{RPM \times \pi \times d}{12} \)
  • Vc in SFM (Surface Feet per minute)

Metric Units Formula

\( \large V_c= \huge \frac{RPM \times \pi \times d}{1000} \)
  • Vc in meters per minute

When to use G96?

  • The default is to use constant cutting speed mode (G96) since the cutting tool is “feeling” the cutting speed, not the spindle speed.
  • Recommended cutting conditions and carbide grades provided by cutting tools suppliers are charted according to the cutting speed. Therefore, it is easier to program accordingly.
  • It will improve tool-life reliability.
  • Maintaining a known cutting condition in different applications will be easier without re-calculating the spindle speed.

When to use G97?

  •  When face turning, the cutter gets closer and closer to the axis of the workpiece, eventually reaching zero diameter. Using G96, the RPM will increase as the cutting edge gets closer to the center, ultimately reaching the machine’s maximum spindle speed limit. Therefore, using G97 enables more control.
  • The same arguments apply when parting of a workpiece.
  •  Vibrations are directly affected by the spindle speed and not the cutting speed. Therefore, when vibration issues occur, it is easier to control them when the RPM is constant. Once you find an RPM that eliminates the vibrations, it might be better to maintain it.

G96 & G97 – CNC Programming Examples.

Choose units

Imperial Metric

G96 Vs G97 Gcode Example

Constant SFM (G96 G code Example)

N10 G20; (Imperial Inch Units)
N20 G96 S300; (CSS – Constant SFM=300)
N30 G00 Z0 X1.0; (Positioning)
N40 G01 Z2.0 F0.01 (Turning 1")
N50 G00 Z3 X2.0; (Positioning)
N60 G01 Z4.0 F0.01 (Turning 2")

Explanation:

  • Line N20 – The cutting speed is defined as 300 SFM
  • The spindle speed is calculed by the formulas:
\( \large RPM = \LARGE \frac {12 \,\times\, SFM}{ \pi \,\times\, d} \)
  • Line N40 – As a result at a diameter of 1″, the spindle speed will be 1146 RPM.
  • Line N60 – As a result at a diameter of 2″, the spindle speed will be 573 RPM.
  • The Surface Speed (SFM) stayed constant and the spindle speed varied by 50%.
  • Notice: In reality, the actual speed might be slower if the calculated RPM is higher than the machine’s maximum or is larger than the limit set in G50.
G96 Vs G97 Gcode Example

Constant SFM (G97 G code Example)

N10 G20; (Imperial Inch Units)
N20 G97 S700; (Constant RPM n=700)
N30 G00 Z0 X1.0; (Positioning)
N40 G01 Z2.0 F0.01 (Turning diameter 1")
N50 G00 Z3 X2.0; (Positioning)
N60 G01 Z4.0 F0.01 (Turning diamaeter 2")

Explanation:

  • Line N20 – The Spindle Speed is defined as 700 RPM
  • The cutting speed (SFM) at each diameter is calculated by the formula:
\( \large SFM = \LARGE \frac {n\,\times\,\pi \,\times\, d}{12} \)
  • Line N40 – As a result at a diameter of 1″, the Surface Speed will be 183 SFM
  • Line N60 – As a result at a diameter of 2″, the spindle speed will be 365 SFM
  • As you can see, the cutter will “feel” a different cutting speed at different diameters.

Learn about more G-Codes

Scroll to Top