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.

By cnccode · Updated

Cuts an external M12 × 1.75 thread 20 mm long with the single-pass G92 threading cycle, reducing the depth of each pass.

ItemValue
MachineCNC lathe (Fanuc G-code system A)
UnitsMetric (G21)
Lines14

Program

G-code
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

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