Advanced G-Code Motion Control: G93, G94, G95, G96, G97 and Feed/Speed Synchronization Explained
In CNC machining, feedrate and spindle speed control are the foundation of surface finish, tool life, and dimensional accuracy.
G-codes like G93, G94, G95, G96, and G97 allow you to precisely synchronize linear motion with spindle speed — ensuring consistent cutting conditions across materials and diameters.
This guide explains real G-code motion control examples, their functions, and when to use each mode for maximum performance.
📌 1. Overview of Motion Control G-Codes
| G-Code | Function | Typical Application |
|---|---|---|
| G93 | Inverse time feedrate | 5-axis and complex interpolation |
| G94 | Feed per minute (mm/min or in/min) | Milling, drilling |
| G95 | Feed per revolution (mm/rev) | Turning |
| G96 | Constant surface speed (CSS) | Lathe — maintains constant cutting speed |
| G97 | Cancel CSS (fixed RPM mode) | Lathe — manual speed control |
📌 2. G93 — Inverse Time Feedrate Mode
In G93 mode, the F value specifies the inverse of time required to execute a motion block.
Example (5-Axis or High-Speed Milling):
G93
G01 X50. Y50. Z-20. A30. F0.002
The motion is completed in 1 / 0.002 = 500 seconds⁻¹ (2 seconds per move).
Commonly used in simultaneous 5-axis machining for smooth tool motion.
Note:
Return to normal mode with:
G94
📌 3. G94 — Feed per Minute (Standard Mode)
This is the default mode for milling machines.
Example:
G94
G01 X100. F300
Moves at 300 mm/min regardless of spindle RPM.
| Machine Type | Typical Use |
|---|---|
| Milling center | Linear tool feed |
| Drilling | Constant feed |
| Tapping (G84) | Combined with M29 for sync |
📌 4. G95 — Feed per Revolution (Turning Mode)
Used on lathes — feedrate per spindle revolution.
Ensures consistent chip load regardless of spindle speed.
Example (Fanuc / Haas Lathe):
G95
G01 Z-20. F0.25
Feeds 0.25 mm per spindle revolution — constant chip thickness even as diameter changes.
| Operation | Advantage |
|---|---|
| Facing | Uniform surface finish |
| Threading | Required for synchronization |
| Grooving | Prevents overfeed at small diameters |
📌 5. Switching Between G94 and G95
G94 (Feed per Minute)
G01 X100. F150
G95 (Feed per Revolution)
G01 Z-50. F0.25
Always specify feed mode when switching from milling to turning operations — especially in mill-turn machines.
📌 6. G96 — Constant Surface Speed (CSS)
Automatically adjusts spindle RPM to maintain constant cutting speed at the tool tip, regardless of diameter.
Example:
G96 S200 M03
Keeps the cutting speed at 200 m/min, dynamically adjusting RPM.
Formula:
RPM = (1000 × Cutting Speed) / (π × Diameter)
| Diameter | RPM (approx) |
|---|---|
| 200 mm | 318 RPM |
| 100 mm | 636 RPM |
| 50 mm | 1273 RPM |
As diameter decreases, RPM increases to maintain the same surface speed.
📌 7. G97 — Cancel CSS (Fixed RPM)
G97 S800 M03
Disables G96 mode and fixes spindle speed at 800 RPM — ideal for drilling or parting operations.
Typical Workflow:
G96 S200 M03 (CSS ON)
G01 Z-30. F0.25
G97 S1200 M03 (CSS OFF)
M30
📌 8. Combining G96 and G95 — True Feed Synchronization
G95
G96 S180 M03
G01 Z-50. F0.20
Maintains both constant chip load (G95) and constant surface speed (G96) — optimal for turning.
📌 9. Safety Limit — G50 Spindle Speed Cap
Always define a maximum RPM when using G96:
G50 S2000
G96 S180 M03
Prevents over-speed when machining small diameters.
📌 10. Fanuc Example — Complete Motion Control Block
%
O5001 (FANUC G94 G95 G96 EXAMPLE)
G21 G40 G80
T0101
G97 S800 M03
G00 X60. Z2.
G50 S2000
G96 S200
G95
G01 Z-30. F0.25
G97 S1000
G00 X200. Z200.
M30
%
Combines G95 (feed/rev), G96 (CSS), and G50 (RPM limit) for full dynamic control.
📌 11. Haas Example — Constant Surface Speed with Limit
G50 S2500
G96 S250 M03
G95
G01 Z-40. F0.2
G97 S1000
M30
Haas follows the same logic — G96 adjusts RPM, G50 limits max speed, G97 returns to manual.
📌 12. Siemens Example — CSS and Feed per Rev
SPINDLE[1]=SPEED(VC=200,DM=100)
FEEDRATE(FPR=0.25)
Siemens allows direct declaration of cutting speed (VC) and feed per revolution (FPR).
📌 13. Heidenhain Example — CSS & Feed Control
L FMAX M3
CYCLE800(VC=180, DM=80)
L Z-20 F0.25
Automatically computes RPM from cutting speed and diameter — ideal for contour turning.
📌 14. Macro Example — Dynamic Feed Adjustment by Diameter
#100 = 200. (Cutting speed)
#101 = #5021 (Current X position)
#102 = [1000*#100]/[3.1416*#101]
S[#102]
Calculates spindle RPM dynamically based on current X position — advanced real-time CSS control.
📌 15. G93 vs G94 — When to Use Each
| Mode | Description | Application |
|---|---|---|
| G93 | Inverse time (F = 1/time) | 5-axis, high-speed surfacing |
| G94 | Feed per minute | Standard milling |
| G95 | Feed per revolution | Turning / Threading |
Always ensure your post-processor outputs correct feed mode for the active machine type.
📌 16. Advanced Example — 5-Axis Inverse Time Motion
G93
G01 X50. Y50. Z-20. A20. C45. F0.002
G01 X75. Y60. Z-10. A25. C60. F0.003
G94
Each block executes within inverse time (smooth simultaneous motion).
📌 17. Common Mistakes & Troubleshooting
| Mistake | Cause | Solution |
|---|---|---|
| Unstable chip load | Mixing G94/G95 incorrectly | Match feed mode to operation |
| Overspeed alarm | Missing G50 limit in G96 | Always set G50 |
| Poor finish on taper | Incorrect CSS setup | Enable G96 before cutting |
| Feed too slow in G93 | Wrong inverse F value | Adjust F proportionally |
| Rough feed transition | Mode switch mid-motion | Cancel and reissue G-code cleanly |
📌 18. AI-Driven Feedrate Control (2025–2030)
- Adaptive feedrate optimization via spindle torque sensors
- AI CSS regulation based on surface temperature
- Predictive chatter avoidance using real-time vibration data
- Digital twin feed simulation for multi-axis motion tuning
- Smart acceleration control for smoother contouring at high speeds
✅ Conclusion
By mastering G93–G97, you gain full control over motion physics in CNC machining.
Feedrate synchronization, constant surface speed, and intelligent speed limits transform your CNC from a simple machine into a precision-optimized motion system ready for Industry 4.0 automation.
Leave a comment