CNC lathe · G-code

G32: thread cutting

G32 cuts a thread one move at a time, with the feed locked to the spindle; taper and lead can change from line to line. Haas lists it in modal group 01. Formats below from Haas and Fanuc, each from its maker. LinuxCNC has no such code.

Worked example

One pass of a 12 TPI thread, then back out. Written for this page in the Haas format.

G99 G00 X0.95 Z0.2G32 Z-1. F0.0833 (one pass, 12 TPI)G00 X1.1Z0.2

For 12 TPI the lead is 1 ÷ 12 = 0.0833", so F0.0833.

How each control writes it

Haas G32 X- Z- F- Q-

One source: Haas Automation, the control's maker

X
X target (diameter) (optional)
Z
Z target (optional)
U
Incremental X (optional)
W
Incremental Z (optional)
F
Thread lead, inches (mm) per revolution: G99 must be active
Q
Thread start angle in 0.001° steps, no decimal point (Q180000 = 180°); not modal (optional)
  • There is no automatic return at the end: program the retract.
  • Feed hold and single block wait for the last line of a G32 sequence, and feed override is ignored.
  • Passes follow the same path only if the spindle RPM stays exactly the same.

Source: Haas Automation, lathe G32

Fanuc G32 IP_ F_ ;

One source: FANUC, the control's maker

IP
End point of the thread
F
Lead along the long axis
  • FANUC 0i-TF (lathe), G code system A (U and W are incremental), from its operator’s manual. On another FANUC model or G code system, check that control’s manual.
  • A multi-start thread adds Q, the start angle (§3.6).

Source: FANUC B-64604EN-1/01, Operator's Manual, 0i-TF (lathe), §3.2

Controls without it

  • LinuxCNC: LinuxCNC has no G32. G33 X- Z- K- does the same: K is the distance per spindle revolution, so G33 Z-1 K0.0625 cuts 16 TPI. Source (archived Oct 29, 2026)

How the controls differ

  • Only Haas takes Q, U, W, X, Z.
  • Only Fanuc takes IP.
  • A word two controls share can still mean different things: read each control's list above.

Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.