G34 Variable Lead Threading is the advanced function used to cut special threads where the thread lead (the distance between two threads) does not end as it began — it continuously increases or continuously decreases along the thread. While in G32 the lead stays constant along the thread path, in G34 the lead changes by a set rate on every revolution.
📷 IMAGE AREA — G34 variable lead: thread pitch increasing (K>0) or decreasing (K<0) on each revolution along the thread
Suggested alt text: G34 variable lead thread increasing decreasing pitch diagram
1. What is the G34 function? Working principle
Just as in G32, in G34 the precise position coder on the spindle is active; the system locks the spindle rotation to the axial feed of the tool. But thanks to a special mathematical algorithm inside G34, as the tool advances along the thread the control increases or decreases the speed of the axis motors step by step; so the lead changes by the rate you set on each revolution.
2. G34 programming form and format
G34 X(U)_ Z(W)_ F_ K_ ;| Address | Function |
|---|---|
| X(U) / Z(W) | The coordinates where the threading move ends. On straight variable-lead threads X stays the same as the start diameter; on tapered variable-lead threads the end diameter is written. |
| F | The starting lead (initial pitch). The tool starts with this lead on the first revolution as it enters the thread. |
| K | The most critical parameter that makes G34 special: the amount of lead change (increase/decrease) on each spindle revolution. |
Lead-change rules: K > 0 (increasing lead): if K is entered positive, the thread pitch grows by K on each revolution as the tool advances (the gap between two threads opens up). K < 0 (decreasing lead): if K is entered negative, the thread pitch shrinks by K on each revolution (the threads move closer together).
3. Example programming application
Let us cut a straight variable-lead thread on a Ø50 cylindrical shaft. The starting lead is F4.0, the increase per revolution is K0.5 (so the tool advances 4 mm on the first turn, 4.5 mm on the second, 5 mm on the third), and the thread length is Z-60. Since G34, like G32, is not a canned cycle, we write each pass manually with plunge, threading and retract moves; for the first pass:
O0034 (G34 VARIABLE LEAD THREADING EXAMPLE) ;
G21 ;
G28 U0 W0 ;
G97 S600 M03 ; (600 rpm CONSTANT rpm)
T0202 ;
(SAFE APPROACH)
G00 X55.0 Z5.0 M08 ;
(PASS 1 - G34)
G00 X49.0 ; (first depth of cut)
G34 Z-60.0 F4.0 K0.5 ; (start at 4 mm lead, +0.5 mm per turn, go to Z-60)
G00 X55.0 ; (retract in X)
G00 Z5.0 ; (return to the start)
(Subsequent passes repeat the same loop manually with a reduced X diameter...)
G00 X100.0 Z100.0 M09 ;
M05 ;
M30 ;📷 IMAGE AREA — G34 increasing lead: F4.0 start, thread pitch growing 4 → 4.5 → 5 mm per turn with K0.5
Suggested alt text: G34 increasing lead F K parameter example
4. Error codes, solutions and limits
The source documents do not contain the specific alarm/error code numbers of G34 or the unit parameter setting numbers (which parameter bit activates G34). However, based on the limit-value logic and general CNC principles, the likely errors you may encounter:
- Exceeding the maximum feed-rate limit: because the lead keeps increasing on each revolution (with K0.5, etc.), if you cut the thread over a very long length the lead reaches enormous values; the axial speed of the tool is forced to exceed the axis motor capacity (the maximum cutting-feed limit) and the machine faults. Solution: lower the spindle speed (S) or bring the lead increase (K) to a more reasonable level.
- Out of definable value range: when the lead is programmed in the decreasing direction (K negative), the lead value drops mathematically to zero or minus before the thread length ends (the lead cannot be zero). Solution: calculate the thread length (Z) with the decrease amount (K) and make the cycle finish before the pitch approaches zero.