Example program · Lathe
Lathe Threading with G92 (M12 × 1.75) — G-Code Example
Cuts an external M12 × 1.75 thread 20 mm long with the single-pass G92 threading cycle, reducing the depth of each pass.
Cuts an external M12 × 1.75 thread 20 mm long with the single-pass G92 threading cycle, reducing the depth of each pass.
| Item | Value |
|---|---|
| Machine | CNC lathe (Fanuc G-code system A) |
| Units | Metric (G21) |
| Lines | 14 |
Program
O2101 (M12 X 1.75 WITH G92)
G21 G18 G40 G99
T0303 (60 DEG THREADING INSERT)
G97 S900 M03
G00 X14. Z5.25 M08
G92 X11.3 Z-20. F1.75
X10.8
X10.4
X10.1
X9.9
X9.853
X9.853 (SPRING PASS)
G00 X100. Z100. M09
M30▶ Simulate in the G-code viewer
How it works
- Minor diameter = 12 − 2 × 0.6134 × 1.75 = 9.853 mm.
- Each X line is a new pass; the depth per pass decreases.
- G76 does the same in two lines with automatic depth reduction.
Codes used in this program
- G92 — Coordinate System Setting (Mill) / Threading Cycle (Lathe)
- G97 — Constant RPM (CSS Cancel)
- G76 — Threading Cycle (Lathe) / Fine Boring (Mill)
Always check feeds, speeds, offsets and clearances for your own machine and tooling, and prove new programs with single block and reduced rapid.
More lathe programs
- Lathe OD Roughing and Finishing (G71 / G70)
- Lathe Facing Program with CSS
- Lathe Threading M20 × 2.5 with G76
- Lathe OD Grooving with G75
- Peck Drilling on a Lathe (G74)
- Lathe Internal Boring (G71 for ID)
- Lathe Parting Off a Part
- Lathe Taper Turning Program
- Lathe OD Turning Box Cycle (G90)
- Lathe Facing Box Cycle (G94)
- Lathe Stock Removal in Facing (G72)