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.
| Property | Value |
|---|---|
| Code | G34 |
| Function | Variable Lead Thread Cutting |
| Modal group | 01 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Lathes |
| Syntax | G34 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
G34 X_ Z_ F_ K_| Address | Meaning |
|---|---|
F | Lead at the start |
K | Lead increment (+) or decrement (−) per revolution |
G34 example program
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.