G-code reference

G34 G-Code: Variable Lead Thread Cutting

Variable Lead Thread Cutting — Fanuc lathe threading move whose lead increases or decreases by K every revolution. It is used for feed screws and special threads with variable pitch.

By cnccode · Updated
PropertyValue
CodeG34
FunctionVariable Lead Thread Cutting
Modal group01
TypeModal — stays active until replaced by another code of the same group
Used onLathes
SyntaxG34 X_ Z_ F_ K_

What does G34 do?

Fanuc lathe threading move whose lead increases or decreases by K every revolution. It is used for feed screws and special threads with variable pitch.

G34 is modal: once programmed it remains in effect for the following blocks until another code from modal group 01 replaces it or the control is reset.

Syntax and parameters

Format
G34 X_ Z_ F_ K_
AddressMeaning
FLead at the start
KLead increment (+) or decrement (−) per revolution

G34 example program

Example
G00 X30.0 Z5.0
G34 Z-60.0 F4.0 K0.05
G00 X35.0

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Each pass must be programmed like G32.

Controller compatibility

G34 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G34 modal?
Yes. G34 belongs to modal group 01 and stays active until another code of that group is programmed.
What does G34 mean in CNC?
G34 means Variable Lead Thread Cutting. Fanuc lathe threading move whose lead increases or decreases by K every revolution. It is used for feed screws and special threads with variable pitch.
What is the difference between G34 and G32?
G34 is Variable Lead Thread Cutting, while G32 is Thread Cutting (Single Pass, Lathe). See the G32 page for its syntax and examples.
Can I use G34 on a mill?
Usually not with the same meaning: G34 is documented here for lathes. Check your control manual for the equivalent.