Skip to main content
CNC.wiki

G32 Thread Cutting: Constant Lead turning on Fanuc, Siemens, Mitsubishi

Master G32 constant lead thread cutting on Fanuc, Siemens, and Mitsubishi. Avoid spindle synchronization errors, parameter mismatch, and turret collisions.

Hakan Gündoğdu
Hakan Gündoğdu

CNC CARE Co-founder

Spindle Sync Failures and Turret Collisions in G32 Threading

A major programming slip or spindle encoder synchronization failure during a G32 constant-lead thread-cutting pass will instantly drive the toolholder into the rotating chuck jaws. The machine servo loop locks the Z-axis feedrate to the spindle rotation via a rigid electronic gear synchronization. If the spindle speed fluctuates or if the programmer mistakenly leaves constant surface speed control (G96) active, the resulting servo lag damages the thread lead, producing a scrap part. More catastrophically, if the operator presses the feed hold button near the end of the thread, the CNC control overrides the stop signal, continuing the linear motion until it reaches the next non-threading block. The tool turret will slam directly into the workpiece fixture or rotating spindle chuck at high speed, shattering the threading insert, bending the spindle axis, and causing severe machine downtime.

G32 Constant Lead Threading Technical Summary

Technical SpecificationDetails
Command CodeG32 (Standard System A turning), G33 (Siemens native, Fanuc System B/C, Mitsubishi G-code lists 3, 5, 7)
Modal GroupGroup 01, non-modal (one-shot) / unmodal motion command
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersParameter No. 3401 (Fanuc), MD 18800 (Siemens), Parameter #1037 (Mitsubishi)
Main ConstraintSpindle speed must remain constant (G97 active) and tool nose radius compensation (G41/G42) must be cancelled (G40) beforehand.

Quick Read: G32 Operational Decision Matrix

  • Deactivate constant surface speed (G96) and switch to constant spindle speed (G97) to prevent thread pitch errors due to spindle acceleration lag.
  • Deactivate tool nose radius compensation using G40 beforehand, as G32 ignores compensation offsets, shifting the programmed trajectory.
  • Enter Fanuc starting angle shift Q as an integer representing thousandths of a degree (e.g., Q180000), as decimal points are strictly forbidden.
  • Ensure the spindle speed is below the #2619 thr_clamp parameter speed on Mitsubishi systems to avoid an M01 0107 operation error.
  • Program a positive non-zero feedrate in Siemens to avoid Alarm 14800, and ensure MD 18800 is active.
  • Provide sufficient clearance at the thread end, as feed hold and single block stops are disabled during the threading pass.

Basic Concepts of G32 Constant Lead Thread Cutting

G32 constant lead thread cutting establishes a rigid electronic gear synchronization between the spindle position encoder and the feed axis servo motors. This synchronization guarantees that the tool tip repeats the exact same path on consecutive roughing and finishing passes, ensuring pitch integrity. The spindle position coder reads spindle speed in real-time, and the control converts it into a feed per minute to feed the tool.

Programmers must deactivate constant surface speed control (G96) and switch to constant spindle speed (G97) before executing thread cutting. Spindle speed changes during threading lead to servo/encoder-to-servo lag, producing threads with incorrect leads and creating completely ruined scrap parts.

Standard feedrate overrides are completely disabled and fixed at 100% during threading travel blocks to protect the pitch. Feed hold and single block stop switches do not halt the axes immediately during a thread cutting block. The axis will continue to translate until it reaches the end point of the next non-threading block.

Programmers must cancel any active tool nose radius compensation (G41/G42) using G40 beforehand, as the motion controller bypasses compensation offsets during thread travel. Leaving it active can shift the programmed trajectory and result in a toolpath mismatch.

G32 Syntax and Command Structure

The G32 command is programmed with target coordinates for the thread end point and a feedrate that defines the thread lead. The motion controller monitors the spindle encoder's index pulse (Z-phase) to synchronize the start of the axis motion. For tapered threads, the coordinate values for both X and Z axes are programmed, with the lead direction determined by the taper angle. Scroll threads are programmed by specifying X-axis motion on the workpiece face.

When machining multi-start threads, the starting angle parameter Q shifts the synchronization point relative to the spindle's index pulse. This allows the tool to enter the part at offset angles on subsequent passes without mechanical repositioning. The exact formatting of the starting angle and feed addresses varies by control manufacturer, requiring careful syntax adjustments.

Fanuc: G32 X(U)__ Z(W)__ F__ Q__ ;
Siemens: G32 X(U)... Z(W)... F... Q... ;
Mitsubishi: G32 X(U)... Z(W)... F... Q... ;
Address AddressDescription
X(U), Z(W)Target coordinates for the thread endpoint. X(U) is diameter, Z(W) is longitudinal position.
FThread lead (pitch) of the major axis, specified in mm/rev or inches/rev.
QThread starting angle shift (Fanuc: integer in thousandths of a degree, 0 to 360000; Siemens/Mitsubishi: decimal allowed).
EPrecision lead or ridges per inch (Mitsubishi specific, configured by parameter #8156).

Brand-Specific G32/G33 Implementations

Fanuc

Fanuc lathe systems utilize G32 for System A turning, while System B and C command constant lead thread cutting via G33, configured via Parameter No. 3401.

The G-code syntax for a threading block is programmed as G32 target coordinates and a lead.

DetailTypeIdentifierDescription
Parameter 3401ParameterNo. 3401 Bit 7 (GSC), Bit 6 (GSB)Selects G-code system A, B, or C.
Parameter 3453ParameterNo. 3453 Bit 4 (FRC)Enables thread lead/inch check (causes Alarm PS0009 if address E is used).
Parameter 5130ParameterNo. 5130Thread chamfering retraction amount based on thread lead (0.1L to 12.7L).
Interpolation ParametersParameterNo. 1626 / 1627Acceleration/deceleration time constant and FL feedrate for thread interpolation.
Corner Chamfering AlarmAlarmAlarm PS0050Corner chamfering (C) or corner rounding (R) programmed directly in G32 block.
Tool Offset AlarmAlarmAlarm PS0509Tool offset command (T code or G43.7 shift) programmed inside G32 block or threading mode.
Retraction Axis AlarmAlarmAlarm PS0429Major threading axis is specified as the tool retraction axis during tool retract and recover.
Address E AlarmAlarmAlarm PS0009Address E or ,E commanded in G32 block while Parameter No. 3453 Bit 4 (FRC) is enabled.
G-code Group SystemsVersion DifferenceSystem A vs B/CG32 is standard under System A. Systems B and C command constant lead thread cutting via G33.
Starting Angle ShiftVersion DifferenceQ-address FormatAddress Q is supported for multi-start shifting in G32, G34, G35, and G36. However, in G76 cycles, Q is supported only in legacy Series 15 program format (Parameter No. 0001 Bit 1 FCV = 1).

Warning: Placing a tool offset change in the G32 block will trigger Alarm PS0509 immediately, halting operation.

Siemens

On Siemens controls, constant lead thread cutting is native to G33. External ISO Dialect Mode maps G32 to G33 blocks using MD 18800.

The programmed block specifies the target coordinates and the thread lead.

DetailTypeIdentifierDescription
Thread Start AngleParameterSD 42000 $SD_THREAD_START_ANGLESets default thread starting angle when address Q (or SF) is omitted (0.0000 to 359.999 degrees).
External Language InterpreterParameterMD 18800 $MN_MM_EXTERN_LANGUAGEEnables external language interpreter (ISO Dialect Mode). Must be set to 1.
Reset Values G-codeParameterMD 20154 $MC_EXTERN_GCODE_RESET_VALUES[n]Sets default G-code systems (A, B, C) and feedrate modes (G94/G95) active at reset/power-up.
Path Velocity AlarmAlarmAlarm 14800Programmed path velocity is zero or negative (e.g., F0 programmed or no active feedrate).
Language Option AlarmAlarmAlarm 61800External language compiler (MD 18800) is not active when calling G32.
Thread Lead Cycle AlarmAlarmAlarm 61001Thread lead is specified incorrectly during CYCLE376T cycle setup.
SINUMERIK 840D sl vs 802D slVersion DifferenceModel OptionsAdvanced Group 20 multi-edge turning functions (G51.2 Multi-edge turning ON and G50.2 OFF) are supported only on 840D sl and omitted on 802D sl.

Warning: Setting a zero or negative feedrate will trigger Alarm 14800, causing the system to abort the threading cycle.

Mitsubishi

Mitsubishi systems determine whether G32 or G33 is compiled based on active G-code list selection via parameter #1037.

Thread cutting utilizes either standard feedrate address F or precision lead address E.

DetailTypeIdentifierDescription
G-code List SelectionParameter#1037 cmdtypActive G-code list selection. G32 is used in lists 2, 4, 6; G33 in lists 3, 5, 7. Value range: 2 to 7.
Thread Acceleration TimeParameter#2620 thr_tThread cutting acceleration/deceleration time constant.
Thread Clamp SpeedParameter#2619 thr_clampThread cutting clamp speed. Clamps feedrate if calculated feed exceeds this.
Z-Phase Sync ModeParameter#1260 set32/bit4Determines if axis movement starts immediately (1) or waits for Z-phase zero-point sync (0).
General Cut ClampParameter#2002 clampGeneral cutting feed clamp speed (overrides #2619 if #2619 is set higher).
Fine Thread Cut EParameter#8156 Fine thread cut EConfigures address E as precision lead (1) or ridges per inch (0).
Special Single BlockParameter#1265 ext01/bit0Activates Mitsubishi CNC special single-block format for G76 compound cycles.
Spindle Clamp ErrorAlarmOperation Error (M01 0107)Programmed spindle rotation speed at threading start is faster than #2619 thr_clamp limit.
Machining Condition ErrorAlarmProgram Error (P128)Attempting to command machining condition selection (G120.1 or G121) during thread cutting mode.
Starting Angle ErrorAlarmProgram Error (P35)Starting angle Q value programmed is out of range (greater than 360.000).
M800 Series CyclesVersion DifferenceZigzag optionZigzag thread cutting (via address P2 in G76) is omitted on the M800 Series.
C80 Series MacrosVersion DifferenceG26 Macro MappingMaps G26 to Machining Interruption (Selected point return/tapping retract) macro.

Warning: Exceeding the spindle speed limit set in parameter #2619 triggers Operation Error M01 0107, clamping axis feedrate.

Technical Analysis and Cross-Brand Differences

The underlying motion kernel of Fanuc turning centers exhibits several distinct behaviors that clearly separate it from other major CNC control brands. First, Fanuc lathe controls strictly enforce G-code Group Systems (A, B, and C), where G32 is the designated constant lead thread cutting command under the standard G-code System A. In contrast, Siemens SINUMERIK controls (as well as Fanuc B and C systems) universally utilize G33 for constant lead thread cutting. Second, Fanuc strictly prohibits any decimal points when specifying the thread starting angle under the address Q for multi-start threads. While other systems allow decimal point inputs, a Fanuc control will reject a decimal point in address Q, requiring the programmer to input the shift value as an integer representing thousandths of a degree (such as Q180000 for a 180-degree shift), otherwise generating an address format alarm code. Third, Fanuc's G32 features a highly rigid tool offset protection logic. If a programmer attempts to combine a tool offset change in the same block as a thread cutting command or while in threading mode, the Fanuc control immediately stops processing and triggers Alarm PS0509, whereas Siemens and Mitsubishi controls allow more flexible modal offset changes between continuous threading blocks.

The underlying architecture of Siemens SINUMERIK controls exhibits distinct behaviors that separate its thread-cutting execution. Siemens supports a robust thread interlinking function; by writing consecutive G32/G33 blocks while continuous-path mode G64 is active, the control uses its advanced pre-read buffer and look-ahead velocity control to smoothly chain thread segments together without experiencing any sudden velocity jumps or dwell-like pauses at the block transitions. Additionally, Siemens maps the starting angle offset programmed via address Q (or SF) directly to the system setting data SD 42000 $SD_THREAD_START_ANGLE, which ensures that any subsequent block without an explicit angle call will default to the recorded value, preventing indexing drift. In native Siemens programming, conversational thread cycles such as CYCLE97 or CYCLE98 are translated under the hood into native G33 travel blocks, allowing a seamless transition between conversational cycle parameterization and raw motion execution.

Mitsubishi controls incorporate a bilingual G-code list switch via parameter #1037 cmdtyp, which determines whether the physical constant lead thread cutting instruction is compiled as G32 or G33, whereas Fanuc lathe controls default strictly to G32 under System A, and Siemens SINUMERIK controls natively utilize G33. Furthermore, Mitsubishi enables a specialized acceleration/deceleration curve parameter #2620 thr_t specifically for G33/G32, allowing the tool to reach programmed cutting speed with minimal lag to reduce the incomplete thread area on the shop floor. Under the Mitsubishi CNC special format (activated by parameter #1265 ext01/bit0), compound threading cycles (G76) are executed as a streamlined single-block command utilizing alternative addresses, which simplifies the program structure compared to the standard double-block format common on Fanuc controls, ensuring efficient memory utilization and clearer troubleshooting for setup operators.

Technical Comparison Matrix

TopicFanucSiemensMitsubishi
Thread Cutting G-codeG32 under G-code System A (System B/C uses G33)Native G33 (ISO Dialect Mode System A maps G32 to G33)G32 or G33 depending on parameter #1037 cmdtyp (G-code list selection)
Multi-start starting angle address & formatAddress Q, integer only, no decimal point allowed (e.g. Q180000 for 180 degree shift).Address Q or SF, allows decimal points (e.g. Q180. or SF=180.0). Defaults to SD 42000 $SD_THREAD_START_ANGLE if omitted.Address Q, supports decimal points (e.g. Q180.000). Range 0.001 to 360.000.
Tool offset behavior during threadingRestrictive tool offset protection: Combining tool offset (T code or G43.7) in G32 block or threading mode immediately triggers Alarm PS0509.Flexible modal offsets allowed between blocks.Flexible modal offsets allowed between blocks.
Acceleration/deceleration parametersParameters No. 1626 and 1627 for acceleration time constant and FL feedrate.Custom acceleration/deceleration via system settings.Specialized acceleration/deceleration curve parameter #2620 thr_t for threading.
Feedrate clampDynamic clamp based on max axis feedrate.Native velocity limits check.Feedrate clamped by #2619 thr_clamp (or #2002 clamp). Exceeding it triggers Operation Error (M01 0107) but thread cutting continues.

G32 G-Code Program Examples

Fanuc

G97 S500 M03 ; Deactivates CSS and stabilizes spindle speed at 500 rpm before threading
G00 X41.0 Z72.0 ; Positions tool at rapid traverse to the starting point of the thread
G32 X41.0 Z29.0 F3.5 ; Executes the first constant lead taper threading pass with 3.5mm lead
G00 X50.0 ; Retracts the tool radially away from the workpiece
G00 Z72.0 ; Returns Z-axis to the starting longitudinal position
G00 X39.0 ; Positions tool 1mm deeper for the second pass
G32 X39.0 Z29.0 F3.5 Q180000 ; Second threading pass shifted by 180 degrees for a double-start thread

dry run

The Fanuc program begins by executing a constant spindle speed command (G97 S500 M03), ensuring the spindle does not accelerate during diameter changes. The tool is positioned to the starting point (X41.0 Z72.0). The control reads the spindle encoder index pulse and begins synchronizing the axes to execute G32 X41.0 Z29.0 F3.5, cutting a thread with a 3.5mm lead. After reaching Z29.0, the tool is retracted to X50.0 and returned to Z72.0. The second pass positions the tool at X39.0. The control executes the next G32 block with Q180000, shifting the starting position by 180.000 degrees to produce the second lead of a double-start thread.

Siemens

G291 ; Switches interpreter parser to ISO Dialect Mode
G32 W-68. F5.0 ; Cylindrical thread cutting with 5.0mm lead using incremental Z coordinate
G32 X38. W-35. F4.0 ; Taper thread cutting with 4.0mm lead, where taper angle determines lead direction
G32 W-68. F5.0 Q180. ; Cuts the second start of a double-start thread with a 180-degree starting angle offset
G290 ; Switches interpreter parser back to Siemens native mode

dry run

The Siemens program enters ISO Dialect Mode using G291 to interpret G32 commands. The tool travels incrementally along the Z-axis by -68mm (W-68.0) at a 5.0mm lead. The second block commands a tapered thread cutting pass to X38.0 and W-35.0 at a 4.0mm lead. The third block cuts the second start of the thread by specifying Q180., shifting the starting angle by 180 degrees. Finally, G290 restores the native SINUMERIK programming mode.

Mitsubishi

G32 X90.0 Z40.0 E12.34567 ; Absolute command precision lead of 12.34567 mm/rev
G32 U70.0 W-50.0 E12.34567 ; Incremental command precision lead of 12.34567 mm/rev
G32 Z40.0 F6.0 ; Standard thread lead of 6.0 mm/rev

dry run

The Mitsubishi program commands high-precision thread cutting. The first block moves the axes to X90.0 and Z40.0 using a precision lead of 12.34567 mm/rev specified by address E. The second block executes an incremental move (U70.0 W-50.0) with the same precision lead. The third block cuts a standard thread to Z40.0 using a standard feedrate F6.0 representing a 6.0mm lead.

Error Analysis and Common Alarm Codes

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0050Corner chamfering (C) or corner rounding (R) programmed directly in G32 block.Control halts and cycle aborts.Remove C or R from G32 block.
FanucAlarm PS0509Tool offset command (T code or G43.7 shift) programmed inside G32 block or threading mode.Control halts and cycle aborts.Remove tool offsets and T-codes from G32 blocks.
FanucAlarm PS0429Major threading axis is specified as the tool retraction axis during tool retract and recover.Control halts with retraction alarm.Choose a non-major axis for tool retraction.
FanucAlarm PS0009Address E or ,E commanded in G32 block while Parameter No. 3453 Bit 4 (FRC) is enabled.Control halts and cycle aborts.Use F lead address or set Parameter 3453.4 to 0.
SiemensAlarm 14800Programmed path velocity is zero or negative (e.g. F0 or no active feedrate).Axis travel does not start.Program a positive, non-zero lead value in the block.
SiemensAlarm 61800External language compiler (MD 18800) is not active when calling G32.Compiler error occurs.Activate MD 18800 option.
SiemensAlarm 61001Thread lead is specified incorrectly during CYCLE376T cycle setup.Setup error occurs.Correct lead parameters in cycle call.
MitsubishiOperation Error (M01 0107)Programmed spindle speed at threading start is faster than #2619 thr_clamp limit.Spindle speed is clamped.Reduce spindle speed or increase parameter #2619 limit.
MitsubishiProgram Error (P128)Attempting to command machining condition selection (G120.1 or G121) during thread cutting mode.Machining stops.Execute G120.1/G121 only when not in threading mode.
MitsubishiProgram Error (P35)Starting angle Q value programmed is out of range (greater than 360.000).Control halts.Correct Q to range between 0.001 and 360.000.

G32 Application Note and Pitch Integrity

Programming G32 thread cutting requires strict spindle speed control. Fluctuating spindle speeds during a threading pass lead to encoder-to-servo interpolation lag, producing an inconsistent thread lead and creating completely ruined scrap parts. Operators must disable constant surface speed (G96) and program constant spindle speed (G97) before executing G32. If an operator presses the feed hold button during a G32 travel block, the axis does not halt immediately; it continues translating until it reaches the end point of the next non-threading block. This delay can drive the tool turret directly into the rotating spindle chuck or workpiece clamps, resulting in a hard collision that shatters the threading insert, bends the spindle axis, and triggers a system overload alarm.

Related Commands in the Threading Network

  • G00: Rapid positioning is used to clear the tool from the workpiece and return to the starting coordinates between threading passes.
  • G01: Linear interpolation provides standard straight cutting paths for roughing and turning the stock diameter prior to thread cutting.
  • G34: Variable lead thread cutting allows programmers to generate threads with increasing or decreasing leads by specifying a lead change rate.
  • G40: Tool nose radius compensation cancel must be commanded before starting G32 because the controller ignores tool nose radius vectors during threading.
  • G97: Constant spindle speed control cancel stabilizes spindle rotation speed, preventing encoder-to-servo lag that corrupts the thread lead.
  • For reference returns, the machine may execute G29 Return from Reference Position to return the tool to its start position.
  • Programmers command G30 Reference Position Return to retract axes to secondary tool change positions.
  • When checking part coordinates before threading, operators run G31 Skip Function Probing to safely capture reference positions.

G32 constant lead turning Summary Takeaway

To maintain thread pitch integrity and avoid turret collisions, programmers must always decouple spindle acceleration from feedrates by commanding G97, cancel tool nose radius compensation, and ensure sufficient clearance for axis deceleration at the end of the threading path.

G32 Thread Cutting FAQ

What happens if I forget to deactivate Constant Surface Speed (G96) before executing G32?

If G96 remains active, the controller dynamically adjusts spindle speed as the cutting tool changes diameter. This spindle speed fluctuation introduces electronic gear and servo interpolation lag, causing the actual feedrate to go out of sync with the spindle rotation, resulting in a completely ruined scrap part. Switch to G97 constant spindle speed prior to executing G32.

Can I use a decimal point when specifying the thread starting angle offset on Fanuc controls?

No. Fanuc controls strictly prohibit decimal points in the starting angle address Q. Programmers must specify the offset as an integer value representing thousandths of a degree (e.g., Q180000 for a 180-degree shift). Command formatting errors will trigger an address format alarm code, whereas Siemens (using Q or SF) and Mitsubishi (using Q) support decimal inputs (e.g., Q180.0 or SF=180.0).

How does G32 handle axis deceleration and feedrate overrides at the end of a thread cycle?

Standard feedrate overrides are completely disabled and locked at 100% during G32 thread blocks to protect the pitch. Furthermore, feed hold and single block stops are bypassed during threading; the axes will continue moving until they complete the threading block and reach the end of the next non-threading block. Programmers must ensure adequate retraction clearance to prevent the tool turret from colliding with the rotating chuck or tailstock.

Still not resolved?

Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

Ask AI Assistant
Hakan Gündoğdu
Hakan Gündoğdu
  • CNC CARE Co-Founder (May 2025 - Present)
  • Mitsubishi Electric NC Sales & Service Section Manager (2008 - 2025)
  • Reis CNC Service Engineer (2003 - 2008)
  • Ören Kalıp CNC Mold Line Team Leader (1999 - 2002)

With over 25 years of experience working in all areas of the CNC machine industry, I continue my activities as a co-founder of CNC CARE, where we offer brand-independent consulting, engineering, and original spare parts services.

Related Articles

Other articles on this topic