G32 is the basic threading function that tells the control unit to “cut a constant-lead thread now with very precise synchronisation.” An important point: G32 is not a canned cycle. G32 is a G code that locks the spindle rotation and the tool feed together over a single straight or tapered move. All the steps — the tool plunging into the thread, advancing along it, retracting and returning to the start point — must be written one by one (block by block).
📷 IMAGE AREA — G32 constant-lead threading: position-coder synchronisation, block-by-block plunge-cut-retract and multiple passes
Suggested alt text: G32 constant lead threading synchronisation diagram
1. What is the G32 function? Basic logic
The moment the machine reads the G32 command, it takes the feed to a completely different level from the normal F feed. It does this via the position coder sensor on the spindle: as the spindle turns, the sensor reads the instantaneous speed and position of the spindle to the CNC in real time; the control passes this data to the Z and X axis motors and moves the tool synchronised with the cutting. Thanks to this synchronisation, even if you change the depth of cut (pass amount) and run the same thread path again and again (with multiple passes), the tool enters exactly the same thread groove each time; there is no risk of thread damage or a double thread.
Types of use: G32 is used not only for straight threads but in three geometries — (1) straight threading (constant-lead cylindrical threads, the tool moves only in Z), (2) tapered threads (the tool moves synchronised in both X and Z at the same time — e.g. pipe threads), (3) shifted threads (multi-start or start-point-shifted special threads).
2. Programming form and parameter settings
G32 X(U)_ Z(W)_ F_ ;| Address | Function |
|---|---|
| X(U) | The X coordinate (diameter) where the threading move ends. On a straight thread it is not written or stays the same as the start diameter; on a tapered thread the end diameter is written. |
| Z(W) | The Z (length) coordinate where the threading move ends. |
| F(L) | The most critical parameter: in G32 mode F is not the feed but directly the thread lead (pitch). E.g. F2.0 for a 2 mm pitch metric thread. |
3. Direction and sign combinations in taper threading
If you write the program in the incremental (U, W) system instead of absolute (X, Z), you must pay close attention to the direction signs (+/-) of the tool paths. The main direction combinations and geometric rules for tapered threads:
- The tool can move conically to minus in X and minus in Z.
- The tool can move conically to plus in X and minus in Z.
- Special geometric limit: the absolute value of the entered radius (taper) difference must be less than or equal to half of the X-axis move amount (the taper difference cannot exceed half the total X move). This rule applies in both direction cases.
4. Example programming application (multi-pass straight thread)
Let us cut a 2 mm pitch, Z-50 long straight metric thread on a Ø40 cylindrical steel. We finish the single-flank thread height in 3 passes. Because G32 is not a canned cycle, we write the plunge, threading, retract and axial return blocks one by one for each pass.
O0032 (G32 THREADING EXAMPLE) ;
G21 ;
G28 U0 W0 ;
G97 S800 M03 ; (800 rpm CONSTANT rpm - G97 mandatory for threading)
T0101 ;
(SAFE APPROACH)
G00 X45.0 Z5.0 M08 ;
(PASS 1)
G00 X39.4 ; (first depth of cut)
G32 Z-50.0 F2.0 ; (synced with spindle, enter the thread at 2 mm lead)
G00 X45.0 ; (retract in X)
G00 Z5.0 ; (return to the start)
(PASS 2)
G00 X38.2 ;
G32 Z-50.0 F2.0 ;
G00 X45.0 ;
G00 Z5.0 ;
(PASS 3 - FINISH)
G00 X37.6 ; (final root diameter)
G32 Z-50.0 F2.0 ;
G00 X45.0 ;
G00 Z5.0 ;
(END)
G00 X100.0 Z100.0 M09 ;
M05 ;
M30 ;Critical: because G32 is used, on each pass plunge we first move in, cut the thread, move out and travel back along Z — each pass requires 4 blocks of manual work. That is why G32 is laborious; but because control is entirely yours, it is the code with which you command the machine the most.
📷 IMAGE AREA — G32 multi-pass thread: decreasing pass diameters X39.4 → X38.2 → X37.6 and the 4-block plunge-cut-retract-return per pass
Suggested alt text: G32 multi-pass threading block structure
5. Missing-information note
The source documents do not contain the multi-start-angle details of G32 in terms of spindle rotation angle (the exact angular equivalent in G32 of the Q parameter used for multi-start threads) or the micro-parameter numbers of G32. For these, confirm the relevant parameter numbers from the FANUC (or Siemens) manual according to your machine model.
Related tool: If the tool chatters or the insert breaks on coarse-pitch, trapezoidal or multi-start threads, the FANUC Macro Threading Simulator and NC Code Generator gives you a load-split pass plan and ready-to-check G32 code.