G34 Variable Lead Threading G-Code: Fanuc, Siemens, and Mitsubishi Guide
Master G34 variable lead thread cutting on Fanuc, Siemens, and Mitsubishi. Prevent PS0429 and 14800 alarms, configure parameters, and avoid turret collisions.
Introduction
A catastrophic hard collision, where the toolholder or tool turret slams directly into a rotating spindle chuck at high speed, is the direct physical consequence of coordinate misalignment or an unexpected feed-hold failure during variable-lead thread cutting (G34). Because the CNC controller locks the linear servo motors in a rigid, real-time synchronization with the spindle encoder, manual feedrate overrides are completely deactivated and locked at 100%. Pressing the feed hold button does not stop the axis immediately; the tool carriage continues moving until it reaches the end coordinate of the next non-threading block. If a programming typo, coordinate shift, or incorrect tool offset places the thread end coordinate within the path of rotating chuck jaws, a tailstock clamp, or a table-mounted vise jaw, the operator will be unable to halt the slide in time. This results in shattered carbide threading inserts, bent spindles, ruined raw stock, and severe axis overload alarms that stop production for days.
Beyond the danger of physical collisions, attempting to machine variable-lead threads while constant surface speed control (G96) remains active forces the spindle speed to fluctuate dynamically as the tool moves radially. The resulting computation lag between the encoder feedback and axis servo response destroys the synchronization, leading to pitch deviation and turning expensive workpieces into scrap. Deactivating tool nose radius compensation (G40) and switching to constant spindle speed control (G97) are critical prerequisites to guarantee physical machine safety and meet the strict dimensional tolerances of extruder screws and progressive worm gears.
Technical Summary
| Specification | Details |
|---|---|
| Command Code | G34 (and G35 on Siemens for native degressive) |
| Modal Group | Group 01 / Modal motion command |
| Brands Covered | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Fanuc: Parameter No. 3401, No. 3453 Bit 4, No. 5130; Siemens: SD 42000, SD 42010, MD 18800; Mitsubishi: #1037, #8156, #2619 |
| Main Constraint | Manual feedrate override is locked at 100% and feed hold is disabled during threading. The starting lead change rate K must be configured to prevent the pitch from reducing to a negative value. Constant surface speed (G96) and tool nose radius compensation (G40) must be inactive. |
Quick Read
- Deactivate Constant Surface Speed: Always program a constant spindle speed (G97) before calling G34 to prevent spindle RPM fluctuations from introducing lag and corrupting the thread pitch.
- Deactivate Radius Compensation: Ensure tool nose radius compensation is turned off (G40) before executing G34 blocks to prevent tool path calculation errors.
- Validate Lead Change Rates: Calculate the lead decrease rate K on degressive threads to ensure the pitch does not reach zero or evaluate to a negative value before the tool reaches the final Z-coordinate.
- Configure Starting Angle Format: Format the starting angle Q as an integer (e.g., Q180000 for 180 degrees) on Fanuc controls, as decimal points are strictly prohibited and will trigger immediate syntax alarms.
- Set Up Return to Reference Point: Complete all physical axis reference point returns before calling G34 on Mitsubishi controls to prevent Program Error P484 from aborting the cycle.
- Manage Run-in and Run-out Zones: Program DITS and DITE on Siemens controls to adjust run-in and run-out acceleration zones dynamically, avoiding axis acceleration overload alarms on short threads.
Basic Concepts
Variable lead thread cutting establishes a mechanically rigid, real-time synchronization between the workpiece spindle's rotation and the linear axis servo motors. The position encoder on the spindle reads the actual rotational speed of the spindle in real-time, directing the CNC kernel to adjust the axial feedrate dynamically. This synchronization coordinates the changing rate of the lead per turn, which is essential for machining progressive-pitch extruder screws, degressive feed screws, and specialized worm gears. Because of this lockstep, any manual feedrate overrides are completely disabled and fixed at 100% during threading blocks to preserve pitch integrity. Similarly, the feed hold button is inactive during G34 blocks; if pressed, the axis will not stop immediately but will continue to the end coordinate of the next non-threading block.
If the thread end coordinate is programmed too close to a rotating spindle chuck, chuck jaws, a tailstock clamp, or a table-mounted vise jaw, a programming typo or coordinate shift will prevent the operator from stopping the slide in time. This lack of immediate feed interruption can result in a catastrophic hard collision where the toolholder or turret slams directly into the rotating chuck or workpiece clamps, shattering the threading insert, bending the spindle, and triggering a severe axis overload alarm code, turning the raw stock into a ruined scrap part. Programmers and setup operators must ensure that tool nose radius compensation is deactivated (G40) and that constant spindle speed control (G97) is established before calling G34. Leaving G96 active on tapered or face variable threads forces the spindle speed to change as the tool moves radially, causing calculation lag that destroys pitch accuracy and results in a scrap part.
Command Structure
The G34 command requires coordinates for the thread's end position, the starting nominal lead, and the pitch change rate per spindle revolution. When executing a G34 block, the CNC interpolates the motion by adding or subtracting the lead change rate from the nominal lead for each rotation of the spindle. If the pitch change rate is positive, the lead increases (progressive thread), whereas a negative rate decreases the lead (degressive thread).
Depending on the active control system, coordinate inputs can be absolute or incremental. The controller interprets these addresses to construct the physical tool path. To ensure accurate spindle synchronization, the block may also include a starting angle offset parameter, which is crucial for machining multi-start variable-lead threads.
Syntax of Diagnostics and Configurations:
- Fanuc (System A):
G34 X(U)__ Z(W)__ F(E)__ K__ Q__ ; - Fanuc (System B/C):
G90/G91 G34 X__ Y__ Z__ F(E)__ K__ Q__ ; - Siemens (Native Progressive):
G34 X... Y... Z... I... J... K... F... SF=... ; - Siemens (Native Degressive):
G35 X... Y... Z... I... J... K... F... SF=... ; - Siemens (ISO Mode):
G291 ; G34 X(U)... Z(W)... F... K... Q... ; - Mitsubishi:
G34 X(U)__ Z(W)__ F(E)__ K__ Q__ ;
The parameters of control primarios and configurations that govern execution of G34 are detailed below:
| Address / Parameter | Brand Context | Description |
|---|---|---|
| X(U), Z(W) | Fanuc / Mitsubishi / Siemens (ISO) | End point coordinates of the thread. X/Z represent absolute positions, while U/W represent incremental distances. |
| X, Y, Z | Siemens (Native) | End point coordinates in native Siemens workplane. |
| F(E) | Fanuc / Mitsubishi / Siemens (ISO) | Starting thread lead (nominal pitch) at the beginning of the threading path. |
| I, J, K | Siemens (Native) | Thread lead in X, Y, Z axis direction. |
| F | Siemens (Native) | Pitch change rate (lead change per revolution) in mm/rev2 or inch/rev2. |
| K | Fanuc / Mitsubishi / Siemens (ISO) | Pitch change rate (lead change value per spindle revolution). Positive value increases pitch; negative value decreases pitch. |
| Q | Fanuc / Mitsubishi / Siemens (ISO) | Starting angle offset (shift angle) for multi-start threads. Fanuc requires integer format in units of 0.001 degrees (no decimal points). Mitsubishi accepts 0.001 to 360.000 degrees. |
| SF= | Siemens (Native) | Starting angle offset for multi-start thread cutting. Accepts decimal input in degrees (0.0000 to 359.9999). |
Brand Applications
Fanuc
On Fanuc turning controls, variable-lead threading is executed under coordinate systems determined by Parameter No. 3401. Programmers must also manage Parameter No. 3453 to control how feedrate addresses are parsed.
A typical Fanuc G34 block is written as follows: G34 Z-70.0 F4.0 K0.5 Q180000 ; where the tool cuts a thread to Z-70.0 with a starting lead of 4.0 mm, increasing by 0.5 mm per revolution, starting at a 180-degree offset.
| Category | Identifier / Parameter | Details and Description |
|---|---|---|
| Parameters | Parameter No. 3401 Bits 7 (GSC), 6 (GSB) | Selects active G-code system (A, B, or C). G34 is available across all three systems. |
| Parameters | Parameter No. 3402 Bit 6 (CLR) | Determines whether modal G-codes reset to clear states upon power-up or reset. |
| Parameters | Parameter No. 3453 Bit 4 (FRC) | Configures if feed speed of chamfer/corner R section uses E or ,E. If 1, E is disabled in G34, triggering Alarm PS0009. |
| Parameters | Parameter No. 5130 | Configures the thread chamfering value based on lead (L), ranging from 0.1L to 12.7L. |
| Alarms | Alarm PS0429 | Triggered during tool retract and recover sequence if the major axis for thread cutting is specified as the retraction axis. |
| Alarms | Alarm PS0050 | Triggered if corner chamfering (C) or corner rounding (R) is specified directly in a G34 block. |
| Alarms | Alarm PS0009 | Triggered if address E or ,E is commanded during a threading block while Parameter No. 3453 Bit 4 (FRC) is set to 1. |
| Version Differences | Parameter No. 0001 Bit 1 (FCV) | Legacy Series 15 program format is active when set to 1, restructures canned cycles. |
Warning: Specifying a decimal point in the starting angle Q-address (such as Q180.0) is strictly prohibited on Fanuc controls and will cause an immediate syntax alarm. Always write the value as a six-digit integer.
Siemens
Siemens SINUMERIK controls handle variable lead thread cutting through specific machine data settings. Activation of the external language parser is configured in machine data MD 18800.
In native Siemens mode, progressive variable threading is programmed using: G34 Z-100.0 K5.0 F0.25 SF=180.0 ; where the lead change rate is expressed in mm/rev2 under address F, and the starting angle uses SF=.
| Category | Identifier / Parameter | Details and Description |
|---|---|---|
| Parameters | SD 42000 $SD_THREAD_START_ANGLE | Default starting angle offset position when SF= or Q is omitted from the G34 block. Range is 0.0000 to 359.999 degrees. |
| Parameters | SD 42010 $SD_THREAD_RAMP_DISP | Stores the run-in and run-out path values specified by DITS and DITE to control acceleration and deceleration ramp lengths. |
| Parameters | MD 18800 $MN_MM_EXTERN_LANGUAGE | Must be set to 1 to activate the external ISO Dialect interpreter (required for ISO G34). |
| Parameters | MD 20154 $MC_EXTERN_GCODE_RESET_VALUES | Channel-specific machine data defining G-code group defaults when running in an external language. |
| Alarms | Alarm 14800 | Triggered during a G34/G35 sequence if path velocity is zero (e.g. F0 is active) and 'Fixed feedrates' function is disabled. |
| Alarms | Alarm 61800 | Triggered if G34 is called in ISO Dialect mode but machine data options parameter MD 18800 is not activated. |
| Alarms | Alarm 61001 | Triggered within high-level thread cycles if the thread lead or pitch parameters contain contradictory or invalid values. |
| Version Differences | SINUMERIK 840D sl vs. 802D sl | 840D sl supports Group 20 multi-edge turning (G51.2 / G50.2) and high-level 'Collision avoidance' software option, whereas 802D sl does not. |
Warning: Ensure that a valid feedrate is defined prior to or within the threading block. If G34/G35 is executed with a path velocity of zero, the controller will halt with Alarm 14800.
Mitsubishi
Mitsubishi systems govern variable-lead threading behavior through parameter settings. The command type selection is determined by Parameter #1037.
A Mitsubishi G34 command is written as: G34 Z-70.0 F4.0 K0.5 Q180.000 ; with the starting shift angle Q programmed as a decimal value representing degrees.
| Category | Identifier / Parameter | Details and Description |
|---|---|---|
| Parameters | Parameter #1037 cmdtyp | G-code List Selection (controls active G-code system type). |
| Parameters | Parameter #8156 Fine thread cut E | Configures address E interpretation: 1 for high-precision decimal thread lead; 0 for threads per inch. |
| Parameters | Parameter #1260 set32/bit4 | Spindle synchronization mode: 0 to start cutting only after spindle Z-phase zero-point; 1 to start cutting immediately. |
| Parameters | Parameter #2619 thr_clamp | Thread cutting feed clamp speed limit, defining the maximum allowable axis feedrate during threading. |
| Parameters | Parameter #2620 thr_t | Configures the acceleration/deceleration time constant specifically applied to thread-cutting blocks. |
| Parameters | Parameter #2010 fwd_g | Thread cutting feed forward gain setting. |
| Alarms | Operation Error (M01 0107) | Triggered if the calculated thread cutting feedrate at the start of G34 exceeds the maximum cutting feedrate clamp speed parameter #2619. |
| Alarms | Operation Error (M01 1113) | Triggered if constant surface speed (G96) is active on the threading spindle or issued from another part system during G34 threading. |
| Alarms | Program Error (P128) | Triggered if Machining Condition Selection (G120.1 or G121) is executed while the G34 modal is active. |
| Alarms | Program Error (P35) | Triggered if a value exceeding 360.000 is programmed for the thread starting angle Q. |
| Version Differences | M80V TypeB controls | Triggers dedicated Program Error P260 (for G10 K) or P39 (for G10 I_J) if parameter overrides are attempted while G34 modal is active. |
| Version Differences | Turning / Lathe controls | G34 is strictly blocked from executing a reverse run (marked as 'x *3' in system variables), unlike G33 constant-lead threading. |
| Version Differences | C80 Series | G26 is mapped to the Machining Interruption (tapping retract and tool recovery) macro, whereas legacy series handle it as Spindle Speed Fluctuation Detection. |
Warning: Attempting to modify machining condition parameters using G120.1 or G121 while the G34 modal is active will result in Program Error P128, halting the machine cycle instantly.
Brand Comparison
| Technical Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Sign of Pitch Change (K or F) | K (positive = increase, negative = decrease) | F in native Siemens mode (progressive G34, degressive G35). K in ISO mode (G34). | K (positive = increase, negative = decrease). |
| Multi-Start Angle Decimal Input | Strictly prohibited (address Q as integer, e.g., Q180000) | Allowed natively via address SF= (e.g., SF=180.0) | Allowed natively via address Q (e.g., Q180.000) |
| Dimensioning Mode Switch | Coordinate addresses (X/Z vs. U/W in G-code System A) | Modal G90/G91 blocks | Modal G90/G91 blocks |
| Run-in/Run-out Acceleration Ramps | Locked inside CNC/PLC parameters (Parameter No. 1626, No. 1627) | Programmatic setting data overrides (DITS/DITE writing to SD 42010) | Locked inside CNC parameters (Parameter #2620, #2010) |
| Block-to-Block Transitions | Enforce rigid unmodal G-code boundaries (can cause pause) | Smooth path linking via Continuous-path mode (G64) | Enforce rigid unmodal G-code boundaries (can cause pause) |
| Manual Axis Interrupt | Restricted/blocked during threading | Restricted/blocked during threading | Allowed via specialized automatic handle interrupt (handwheel jog) |
Technical Analysis
The fundamental differences in variable lead thread cutting across Fanuc, Siemens, and Mitsubishi center on syntax, programming flexibility, transition behavior, and real-time operator control. On Fanuc turning centers, absolute or incremental movements are determined strictly by the coordinate address letters programmed (X/Z vs. U/W) under G-code System A, rather than relying on modal G90/G91 blocks, which are standard for Siemens and Mitsubishi's coordinate lists. Fanuc also enforces a strict decimal point prohibition on the starting angle shift address Q (requiring Q180000 rather than Q180.0), a format check that will immediately halt Fanuc controls but is accepted natively on Siemens and Mitsubishi systems. Fanuc incorporates a highly rigid tool retract check where specifying the major threading axis as the retract axis fails to perform retraction, triggering Alarm PS0429 once the threading block finishes and stopping the tool abruptly.
Siemens, by contrast, handles G34 and general threading via setting data parameters (like SD 42010) and background cycle macros (such as cycle328.spf in ISO mode) which manage acceleration and retraction profiles dynamically in software. Siemens utilizes a unique, dual-syntax bilingual model to separate progressive and degressive threads. In native Siemens mode, progressive variable threading is explicitly commanded via G34 and degressive via G35, with the pitch change rate programmed under the address F (expressed in mm/rev2) and starting angle under SF=. When switched to ISO Dialect mode (G291), however, G34 is used for both progressive and degressive threads, with the lead change per revolution programmed under address K and starting angle under Q. Siemens supports advanced continuous-path linking (G64) across threading transitions. By programming consecutive G33 and G34/G35 blocks under continuous-path mode G64, the Siemens motion kernel uses its advanced pre-read buffer and look-ahead velocity control to smoothly link the blocks, adjusting transition velocities to completely eliminate sudden velocity jumps or deceleration pauses at block transitions, whereas Fanuc and Mitsubishi controls enforce rigid unmodal G-code boundaries that can pause the axis at the transition.
Siemens also enables direct programmatic control of run-in and run-out paths within the part program using DITS and DITE. These commands write directly to setting data SD 42010 $SD_THREAD_RAMP_DISP, allowing programmers to customize acceleration and deceleration ramp lengths dynamically to prevent axis acceleration overload alarms on short workpieces. This is a feature managed only through machine-builder-locked PLC parameters in Fanuc and Mitsubishi controls. On the other hand, Mitsubishi offers unique real-time flexibility by integrating a specialized automatic handle interrupt feature that remains actively valid during thread cutting blocks. This allows operators to manually override axis movement via the handwheel during execution, a level of real-time manual intervention that is restricted or completely blocked on Fanuc and Siemens controls during rigid G34/G33 threading passes to prevent pitch corruption. Mitsubishi also utilizes a parameter-configurable E-address selector (#8156 Fine thread cut E) to toggle the E command dynamically between a high-precision decimal thread lead (up to six decimal places) and a threads-per-inch (ridges/inch) value. In Fanuc, precision lead formats are rigidly predefined. Mitsubishi also enforces strict program-level restrictions that output specific Program Errors (like P128) if a machining condition parameter selection (G120.1 or G121) is called while the G34 variable lead thread cutting modal is active, whereas Fanuc and Siemens do not have native machining condition selection cycles linked directly to their motion kernels in this manner.
Program Examples
Fanuc G34 Threading Example
; Fanuc G34 Variable Lead Threading Example
G97 S400 M03 ; Stabilizes spindle speed at 400 rpm, canceling constant surface speed control
G00 X45.0 Z5.0 ; Rapidly positions the tool turret to the thread starting point
G34 Z-70.0 F4.0 K0.5 ; Variable lead thread cutting to absolute Z-70.0, starting lead 4.0mm, increasing lead by 0.5mm/rev
Dry Run Walkthrough:
- The tool turret rapidly positions to X45.0 Z5.0 with spindle rotating at 400 RPM (G97 cancels CSS).
- Spindle rotation and Z-axis motion are synchronized. The tool moves toward Z-70.0.
- In the first spindle revolution, the lead is 4.0 mm.
- For every subsequent revolution, the pitch increases by 0.5 mm due to K0.5 (e.g., 4.5 mm, 5.0 mm, 5.5 mm).
- The tool reaches Z-70.0, and synchronization is maintained until the end of the block. Feed hold is disabled during this movement.
Siemens G34 ISO Mode Example
; Siemens G34 Variable Lead Threading (ISO Mode) Example
G291 ; Switches the interpreter parser to ISO Dialect Mode
G97 S400 M03 ; Cancels constant surface speed, locks spindle speed
G00 X45.0 Z5.0 ; Positions to start point
G34 Z-100.0 F5.0 K0.25 ; Progressive variable lead thread to Z-100.0, starting lead 5mm, lead change of 0.25mm/rev
G290 ; Switches back to native Siemens mode
Dry Run Walkthrough:
- G291 activates the external ISO Dialect interpreter to parse standard G-code.
- Spindle speed is stabilized at 400 RPM (G97) to eliminate radial calculation lag.
- The tool is positioned to the starting coordinate X45.0 Z5.0.
- Upon calling G34, the spindle encoder synchronizes Z-axis travel.
- Z-axis advances from Z5.0 to Z-100.0, starting with a pitch of 5.0 mm.
- For each spindle revolution, the pitch increases by 0.25 mm (specified by K0.25).
- Z-axis reaches Z-100.0, and the interpreter reverts to Siemens native mode via G290.
Mitsubishi G34 Threading Example
; Mitsubishi G34 Variable Lead Threading Example
G97 S500 M03 ; Stabilizes spindle speed at 500 rpm, canceling constant surface speed control
G00 X45.0 Z5.0 T0101 ; Rapidly positions the tool turret to the starting point of the thread
G34 Z-70.0 F4.0 K0.5 ; Variable lead progressive thread to absolute Z-70.0, starting lead 4.0mm, pitch increases by 0.5mm/rev
Dry Run Walkthrough:
- The spindle speed is set to 500 RPM under G97 to prevent dynamic feedrate errors.
- The turret moves to start coordinates X45.0 Z5.0 with tool 1 offset active (T0101).
- G34 initiates spindle synchronization.
- The tool traverses along the Z-axis toward Z-70.0.
- Starting lead is 4.0 mm (F4.0), and it increases by 0.5 mm (K0.5) per spindle revolution.
- Manual axis override via handwheel is active if handle interrupt is enabled, permitting operator adjustments during the threading cycle.
Error Analysis
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause & Fix |
|---|---|---|---|---|
| Fanuc | Alarm PS0429 | Major thread cutting axis specified as the retraction axis during G10.6 retraction. | The CNC halts with an alarm and the tool stops abruptly inside the thread, potentially scrapping the part. | Change the retraction axis or configure G10.6 parameters correctly to prevent axis conflicts. |
| Fanuc | Alarm PS0050 | Corner chamfering (C) or corner rounding (R) specified directly in a G34 block. | Program halts immediately before the block is executed. | Remove C or R coordinates from the G34 block and program chamfering in separate blocks. |
| Fanuc | Alarm PS0009 | Address E or ,E commanded in threading block while Parameter No. 3453 Bit 4 (FRC) is set to 1. | The controller rejects the feed command and stops execution. | Disable FRC parameter (Parameter No. 3453 Bit 4) or use the standard F command for lead input. |
| Siemens | Alarm 14800 | Path velocity evaluates to zero (e.g., F0 active) during G34/G35 when fixed feedrates are disabled. | Z-axis fails to move and the program generates a motion halt. | Define a valid feedrate value before or within the variable threading block. |
| Siemens | Alarm 61800 | G34 is called in ISO Dialect mode (G291) but option parameter MD 18800 is not enabled. | System aborts and reports interpreter language fault. | Ensure machine data MD 18800 is set to 1 to activate external language parsing. |
| Siemens | Alarm 61001 | Thread lead or pitch change rate parameters contain contradictory or invalid values. | High-level cycles abort with pitch parameter mismatch. | Verify cycle parameters and pitch definitions to ensure consistent values. |
| Mitsubishi | Operation Error (M01 0107) | Calculated thread feedrate at start of G34 exceeds axis feed clamp speed. | The machine halts before starting the cut, preventing axis movement. | Reduce spindle RPM, reduce lead change rate K, or increase feed clamp limit parameter #2619. |
| Mitsubishi | Operation Error (M01 1113) | Constant surface speed (G96) active on the spindle during G34 thread cutting. | Spindle speed changes during radial motion, calculation lags, and the CNC aborts. | Insert G97 before G34 to lock spindle speed at a constant value. |
| Mitsubishi | Program Error (P128) | G120.1 or G121 machining condition selection executed while G34 modal is active. | Program execution stops immediately on the illegal condition block. | Deactivate the G34 modal state before attempting to toggle machining condition parameters. |
| Mitsubishi | Program Error (P35) | Thread starting angle Q is programmed with a value exceeding 360.000. | Program fails validation and stops. | Keep the starting angle Q address within the range of 0.001 to 360.000 degrees. |
Application Note
Shearing the carbide insert tip and scratching the raw stock into a ruined scrap part is the immediate consequence of attempting to manually jog or backtrack the tool turret out of a variable thread on Mitsubishi controls, because G34 strictly blocks manual arbitrary reverse runs (marked as 'x *3' in system variables) unlike standard constant-pitch G33 threading. If the axis halts due to a power fluctuation or block interruption, attempting to backtrack the tool without backing off radially first will drag the tool tip across the threads, destroying the workpiece.
Similarly, on Fanuc controls, specifying the major thread cutting axis as the retraction axis in a rapid retract sequence prevents the retract from executing, causing the control to halt with alarm code PS0429 'ILLEGAL COMMAND IN G10.6' upon reaching the subsequent block and stopping the tool abruptly inside the metal. On Siemens controls, if a G34/G35 progressive or degressive block is executed without a valid feedrate defined, the control immediately triggers Alarm 14800, stopping the Z-axis slide and causing tool dwelling that mars the workpiece surface. Therefore, programmers must strictly verify retraction axes and verify feedrates before execution to avoid component scrap.
Related Command Network
- G32 Constant Lead Threading (Turning): G32 is the standard constant-lead threading command in G-code System A, serving as the constant-pitch baseline for variable lead G34.
- G33 Constant Lead Threading (Milling): G33 performs constant-pitch thread cutting in milling and lathes (System B/C) and must be deactivated before executing variable lead commands.
- G31 Skip Function (Probing): G31 is used for probe measurement and tool setter calibration to establish the precise coordinate datums required before threading.
- G96 / G97 (Constant Surface Speed ON/OFF): Constant surface speed (G96) must be deactivated and constant RPM (G97) activated before executing G34 to prevent spindle speed fluctuations that corrupt the pitch synchronization.
- G290 / G291 (Interpreter Switch in Siemens): G291 activates the external ISO Dialect interpreter, allowing Siemens systems to execute the standard Fanuc-style G34 syntax rather than native Siemens commands.
Conclusion
Successful variable-lead threading requires rigorous parameter checking, precise syntax format validation, and active synchronization control. Operators must establish constant spindle speed (G97) and deactivate radius compensation (G40) as a standard setup protocol before executing any G34 blocks. Verifying control-specific details—such as Fanuc's integer starting angle format, Siemens' DITS/DITE ramp definitions, and Mitsubishi's axis feedrate clamps—prevents unexpected motion interrupts and tooling damage. Setting up dry runs with Z-axis offsets is a reliable method to verify progressive or degressive pitch changes and avoid turret collisions.
Frequently Asked Questions
Why does my Fanuc controller trigger Alarm PS0429 during thread retraction?
Alarm PS0429 "ILLEGAL COMMAND IN G10.6" occurs if the major axis for thread cutting is specified as the retraction axis in a rapid retract sequence. This locks the retract routine and halts the control. Practical Action: Change the retraction axis in the parameter settings or verify that the retraction coordinates are programmed along the radial (X) axis rather than the longitudinal (Z) axis to ensure clean tool withdrawal.
How do I prevent Mitsubishi Operation Error M01 0107 during progressive threading?
This error is triggered when the calculated feedrate at the start of G34 exceeds the maximum cutting feedrate clamp speed of the axis, which is defined by parameter #2619. Practical Action: Reduce the spindle speed (G97 RPM) or the lead change rate (K-address) in the CNC program, or increase the feedrate clamp value in parameter #2619 to accommodate the axis speed requirements.
What causes Siemens Alarm 14800 during a G34/G35 cycle?
Siemens Alarm 14800 occurs if the path velocity is zero (such as when F0 is active or not defined) during a variable threading block, and the "Fixed feedrates" function is inactive. Practical Action: Explicitly program a valid nominal feedrate (F-address) within or immediately prior to the G34/G35 block to provide the motion controller with a starting velocity value.
Still not resolved?
Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

- 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
G71 Metric Dimensioning Guide for Siemens SINUMERIK Controls
Learn how to program G71 and G710 metric dimensioning on Siemens SINUMERIK controls, including parameter MD 10240, alarm codes, and G-code syntax errors.
G69 Balance Cut Cancel: Coordinate Recovery & Crash Prevention
Learn how to program the G69 balance cut cancel command for Fanuc, Siemens, and Mitsubishi turning centers. Cancel dual slide synchronization and prevent crashes.
G70 CNC Finishing Cycle Guide for Fanuc, Siemens, and Mitsubishi
Learn the G70 finishing cycle for CNC turning. Master syntax, parameters, and alarm codes for Fanuc, Siemens CYCLE95, and Mitsubishi controls to avoid crashes.
G69 Coordinate System Rotation Cancel: Modals, Alarms, and Setup
Learn to cancel G68 facing turret mirrors and coordinate rotations using G69 on Fanuc, Siemens, and Mitsubishi CNCs to prevent turret crashes.