Home › G-codes › LinuxCNC Tormach › G96
G96 Constant surface speed
LinuxCNC Tormach G-code · Lathe
Spindle speed changes with X so the cutting speed stays at S. D limits the top RPM.
Format
G96 S [D] [$]
Addresses
| Address | What it does |
|---|---|
S | Surface speed, feet per minute in G20, meters per minute in G21 |
D | Maximum spindle RPM |
$ | Spindle number |
How it works
Modal, spindle mode group. Cancel with G97.
Example program
G20 G18 G7 G40 G80 G90 G94 (INCH, XZ PLANE, DIAMETER MODE)
T1 M6 G43 (TURNING TOOL)
G96 D2500 S500 M3 (500 SFM, MAX 2500 RPM)
G0 X2.1 Z0.05
…
T1 M6 G43 (TURNING TOOL)
G96 D2500 S500 M3 (500 SFM, MAX 2500 RPM)
G0 X2.1 Z0.05
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Always give D. Near X0 the RPM climbs toward the machine limit.
- X must be set so X0 is the spindle center, or speeds are wrong.
- Error if the spindle is not turning during a feed move.
Related codes
G96 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Constant surface speed |
| Haas NGC | Constant surface speed on |
| Mazak (EIA) | Constant surface speed |
| Okuma OSP | Constant surface speed on |
| Mitsubishi M70 M80 | Constant surface speed on |
| Siemens 840D 828D | Constant cutting speed |
| Fagor 8055 8065 | Constant feed at cutting point (mill) |
| Mach3 Mach4 | Constant surface speed, Mach4 |
| Centroid CNC12 Acorn | Constant surface speed |
| Swiss (Citizen Star) | Constant surface speed |
Every G-code for LinuxCNC Tormach in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G96 in the app All LinuxCNC Tormach G-codes