Home/Articles/G74 Left-Hand Tapping Cycle: Milling Programming and Multi-Brand Setup
G74 · MILLING

G74 Left-Hand Tapping Cycle: Milling Programming and Multi-Brand Setup

ProgrammingFanucSiemensMitsubishi·Updated Jul 22, 2026·17 min read
Quick answer

How is the G74 left-hand tapping cycle programmed and executed on CNC milling machines The G74 cycle executes left-hand tapping by feeding a counterclockwise spindle (M04) to Z-depth, dwelling, and reversing to clockwise (M03) for retract. Rigid tapping is activated via parameter 5200 bit 0 or M29, while axis overload triggers alarm PS0564 if depth exceeds 4096 times the lead.

Introduction

A single coordinate offset mismatch or an incorrectly defined clearance height during a reverse tapping operation will cause the spindle head to bypass soft safety limits and crash directly into a machine vise jaw or fixture clamps. Because the CNC preprocessor overrides manual overrides and disables immediate feed hold stops once tapping starts, the operator cannot abort this motion, resulting in a shattered tap, a damaged spindle, and a completely scrapped workpiece. The G74 left-hand (counter) tapping cycle requires absolute coordinate precision and proper synchronization parameters to safely execute reverse threads. Establishing a robust setup process, verifying the active coordinate offsets, and configuring the control-specific parameters are essential to prevent catastrophic crashes during high-speed machining center runs.

Left-hand tapping demands a counterclockwise spindle rotation (M04) during the downward plunge to cut reverse threads. When the tool reaches the programmed bottom depth, the spindle stops, reverses to clockwise rotation (M03), and retracts out of the hole at a matched feedrate. This precise synchronization between spindle RPM and Z-axis feedrate is critical; any discrepancy will strip the threads or snap the tool. By understanding the command structure of the G74 cycle, programmers can optimize rigid and peck tapping configurations across major control systems.

Technical Summary

FieldTechnical Specification
Command CodeG74 (Fanuc, Mitsubishi, Siemens ISO Dialect), CYCLE84 (Siemens Native)
Modal GroupGroup 09, Modal (Milling canned cycle)
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersParameter No. 5200 (Fanuc), PIT / VARI (Siemens), Parameter #8159 / #8018 (Mitsubishi)
Main ConstraintCannot be interrupted immediately by manual feed hold or single block until retraction is complete. Active tool radius compensation (G41/G42) or constant surface speed (G96) must be cancelled.

Quick Read

  • Directionality: G74 requires counterclockwise spindle rotation (M04) to feed in, and automatically reverses to clockwise (M03) to retract.
  • Manual Override Ignored: Spindle speed and feedrate override dials are ignored during the cycle to maintain mathematical sync and prevent stripped threads.
  • Uninterruptible Feed: Pressing feed hold or single-block stop will not halt the axes mid-cut; the control completes the tap and retracts before stopping.
  • Rigid vs. Floating: Use M29 or control parameters to enable rigid tapping (synchronous) for modern machines, or use compensating floating chucks for older gantries.
  • Safe Offsets: Clear all active tool offsets and verify coordinate systems before cycle execution to avoid driving the tool into the vise jaw or clamps.
  • Dwell Application: Define bottom dwells (P) carefully to allow the spindle to decelerate and reverse without scoring the bottom threads.

Basic Concepts

Left-hand tapping cycles automate reverse-thread cutting by coordinating counterclockwise spindle rotation with Z-axis feed. Tapping tools are fed into the pre-drilled holes at a feedrate that matches the thread pitch precisely. Once the bottom depth is reached, the spindle reverses direction to clockwise, backing the tool out of the cut. This prevents tool bind and thread damage during the retraction phase.

Modern CNC machines utilize rigid tapping, which creates a synchronous electronic link between the spindle encoder and the Z-axis servo motor. This eliminates the need for floating compensating holders and allows higher feedrates and deeper holes. In contrast, older machines or light-duty mills may require a compensating chuck to absorb the axial mismatch during spindle reversal, which is handled via specific cycles or floating G-codes.

To safeguard tooling, the CNC preprocessor automatically locks out the feedrate and spindle speed overrides during cycle execution. This means any manual adjustments by the operator are ignored until the tool exits the workpiece. If the operator presses feed hold during the cycle, the machine will not immediately stop the Z-axis slide. It completes the tapping motion and retracts the tool safely before pausing, preventing the tap from freezing under load and shattering.

Command Structure

The G74 command initiates the left-hand canned cycle, modal to G-code Group 09, meaning it remains active across subsequent coordinate coordinates until cancelled by a G80 block. When programming, the controller reads the hole center coordinates, the safety clearance point R, and the final Z-depth. A dwell parameter can be included to pause the tool at the bottom, which is crucial for spindle deceleration and thread completion before reversal.

For deep-hole operations, peck rigid tapping can be programmed using an incremental depth value. The control feeds the tool in segments, retracting by a small clearance distance after each peck to break chips. This chip-breaking action prevents chip buildup and tool clogging, reducing thermal stress on the tap.

G74 X_ Y_ Z_ R_ P_ F_ K_ ;

Or for peck rigid tapping:

G74 X_ Y_ Z_ R_ P_ Q_ ,D_ F_ K_ ;
AddressDescriptionUnit / Value Range
X, YHole center coordinates on the active coordinate plane (typically G17)Coordinate value (mm or inch)
ZAbsolute final hole depth or incremental depth from point RCoordinate value (mm or inch)
RClearance level (point R) where cutting feed beginsCoordinate value (mm or inch)
PDwell time at the hole bottom (and at point R return in rigid tapping)Milliseconds (e.g., P500 is 0.5 seconds)
QIncremental peck depth per pass (for peck rigid tapping)Positive incremental distance (mm or inch)
,DEscape/clearance retraction amount after each peck feedIncremental distance (requires comma prefix in rigid tapping)
FCutting feedrate (pitch of the thread in mm/rev or inches/rev)Feed value (mm/rev, mm/min, or pitch)
KNumber of cycle repetitions (L in Series 15 format)1 to 9999

Brand Applications

Fanuc

Fanuc systems manage G74 under G-code Group 09, allowing both standard and rigid modes. Key configuration options are managed through registers such as Parameter No. 5200.

Standard syntax is G74 X_ Y_ Z_ R_ P_ F_ K_ ;. In rigid mode, programmers call M29 S_ ; before the G74 block to synchronize the spindle.

TypeIdentifier / FormatDetails / Value Range
ParameterNo. 5200 Bit 0 (G84)Toggles automatic rigid tapping execution (0: inactive, 1: active)
ParameterNo. 5200 Bit 5 (PCP)Peck tapping type (0: high-speed chip break, 1: standard point R retract)
ParameterNo. 5200 Bit 6 (FHD)Feed hold and single-block active in tapping (0: disabled, 1: enabled)
ParameterNo. 5213Default escape retraction amount when ,D is omitted
ParameterNo. 3402 Bit 5 (CLR) & No. 3407 Bit 1 (C09)Clears Group 09 state and cancels canned cycle to G80 upon reset
AlarmAlarm PS0564'ILLEGAL COMMAND OF SMART RTAP' - Programmed travel exceeds 4096 times the thread lead
AlarmAlarm PS0368'OFFSET REMAIN AT OFFSET COMMAND' - Shift executed while tool offset values are active
VersionSeries 15 CompatibilityG74 is replaced by G84.3 (Reverse Rigid Tapping). Repetitions are defined with address L instead of K.
WARNINGApplying tool length offsets (G43/G44) directly within the G74 cycle block rather than in preceding positioning blocks will cause the tool to shift path during Point R positioning, potentially leading to a physical crash.

Siemens

Siemens controls execute left-hand tapping through the native parameter-driven CYCLE84 cycle. It integrates coordinate offsets, speeds, and dwell controls in a single block.

The native syntax is MCALL CYCLE84 (RTP, RFP, SDIS, DP, DPR, DTB, SDAC, MPIT, PIT, POSS, SST, SST1, _AXN, _PTAB, _TECHNO, VARI, DAM, VRT). A negative PIT value determines the left-hand direction.

TypeIdentifier / FormatDetails / Value Range
ParameterPITThread pitch value; negative sign forces left-hand rotation (-2000.000 to 2000.000 mm)
ParameterMPITMetric pitch sizes (negative metric sizes, e.g. -3 for M3 to -48 for M48)
ParameterSDACSpindle direction after cycle completion (3: CW, 4: CCW, 5: stop)
ParameterVARIMachining type (0: one pass, 1: chip break, 2: chip removal)
Parameter_PTABThread pitch evaluation type (0: default, 1: mm, 2: threads/inch, 3: inches/rev)
ParameterMD 18800Channel-specific machine data MN_MM_EXTERN_LANGUAGE for G291 ISO dialect compiler switch
AlarmAlarm 61800'External CNC system missing' - Switching to G291 interpreter while MD 18800 is disabled
AlarmAlarm 61102'No spindle direction programmed' - Spindle rotation direction (M03/M04) is missing from active registers
AlarmAlarm 61101'Reference plane defined incorrectly' - Retraction plane (RTP) or safety clearance (SDIS) defined behind RFP
AlarmAlarm 61003'No feed programmed in the cycle' - Active feedrate is missing
Version840D sl vs. 802D slWidescreen HMI showing real-time axis loads, alarms, and modal G-groups on 840D sl only; 802D sl lacks Group 20 multi-edge turning
VersionCYCLE840Compensating chuck mode adding ENC parameter for machines with floating holders
WARNINGForgetting to program an empty MCALL block after cycle completion leaves the modal cycle active. Subsequent coordinate moves will trigger unintended cycle plunges.

Mitsubishi

Mitsubishi systems execute left-hand tapping via G74 modal cycles under G-code Group 09. Program format configuration relies on parameters such as #1265.

Syntax supports the Label L and Label O formats, typically structured as G74 X_ Y_ Z_ Q_ R_ F_ P_ ,R_ S_ ,Ss_ ,I_ ,J_ LI_ J_ K_ ; where repetitions are defined via LI (Label L) or Pp (Label O).

TypeIdentifier / FormatDetails / Value Range
ParameterParameter #8159Default synchronous mode when ,Rr is omitted (0: asynchronous, 1: synchronous)
ParameterParameter #8018Return retract amount ($m$) during peck tapping (0 to 199999998 in 0.5 micron units)
ParameterParameter #1272Toggles peck selection (0: peck tapping, 1: deep-hole tapping)
ParameterParameter #1313Default synchronous tapping hole bottom wait time (milliseconds)
ParameterParameter #1172Spindle retract override percentage (active if retract speed ,Ss is not 0)
ParameterParameter #1265Toggles special format compilation (0: standard, 1: special format)
ParameterParameter #1080Boring axis selector Dril_Z (0: unlocked, 1: locked to G17 plane)
ParameterParameter #19444 / #19445Cutting reduction and minimum cutting defaults
AlarmProgram Error (P186)Spindle speed command inside active synchronous block, or constant surface speed (G96) active concurrently
AlarmProgram Error (P182)Synchronous tapping cycle commanded while constant surface speed (G96) is active
AlarmProgram Error (P111)G74/G84 tapped in G18/G19 when Dril_Z is set to 1 under G125 format
WARNINGRunning a synchronous tapping cycle with feedrates below 0.01 mm/rev will cause the spindle servo to rotate unsmoothly, resulting in irregular thread pitches.

Brand Comparison

TopicFanucSiemensMitsubishi
Spindle Direction RulesCCW (M04) to enter, CW (M03) to retractControlled by parameter sign or HMI selection. Retract direction SDAC defaults to 3 (CW)CCW (M04) to enter, CW (M03) to retract
Rigid Tapping TriggerActive via M29 S_ block before G74 or Parameter No. 5200 Bit 0Automatically rigid by calling native CYCLE84 cycleActive via inline ,R1 parameter or Parameter #8159
Peck Tapping SyntaxG74 ... Q_ ,D_ ... (using incremental peck depth and clearance)Managed within CYCLE84 parameters using VARI (0: single pass, 1: chip break, 2: chip removal)G74 ... Q_ ... (using depth of cut and retract amount Parameter #8018)
Retract Speed Override— (no source)— (no source)Supports direct inline speed override via ,Ss2 address
Position/Drill check widths— (no source)— (no source)Supports block-specific positioning check width ,I and drilling check width ,J
Bilingual InterpreterStandard G-code systems (G-codes Systems A/B/C via #1037 cmdtyp)Toggle native Siemens mode (G290) and external ISO mode (G291)Bimodal Program Format Switch (G188/G189) switches lathe and machining center tables

Technical Analysis

Analytically, the primary difference in left-hand tapping execution lies in how the controllers define direction and block modalities. Fanuc and Mitsubishi maintain a dedicated canned cycle code (G74) that is structurally distinct from the right-hand equivalent (G84). Spindle rotation direction is hardcoded in the cycle preprocessor to enter CCW and retract CW. Siemens, however, decouples direction from the cycle name, utilizing a single parametric block (CYCLE84) where the sign of the pitch parameter (PIT or MPIT) dictates the thread hand. A negative pitch indicates a left-hand thread, which commands the spindle to enter counterclockwise and retract clockwise. This unified approach simplifies program lists but demands careful sign validation from programmers.

Another major architectural variance is the modal call method. While Fanuc and Mitsubishi coordinates trigger cycles inline on the same block, Siemens utilizes the MCALL command to separate the cycle call from coordinate positions. Once MCALL CYCLE84 is programmed, the cycle remains active on every subsequent coordinate move until cancelled by an empty MCALL block. In contrast, Fanuc and Mitsubishi rely on G80 to cancel canned cycles. Siemens also handles peck tapping parameters differently; instead of calling distinct commands or prefix-encoded variables like Fanuc's ,D or Mitsubishi's ,Ss, Siemens compiles chip-breaking and retract strategies into the VARI parameter of CYCLE84.

Finally, bimodal interpretability and safety overrides differ significantly. Mitsubishi features a bimodal Program Format Switch (G188/G189) that reallocates modal G-code tables, allowing G74 to transition between lathe face-grooving and milling tapping modes. Siemens relies on G290/G291 interpreter switches to execute ISO G74, while Fanuc uses the command compiler structure CMDTYP to toggle G-code Systems A, B, and C. Mitsubishi also supports block-specific positioning check width overrides (,I and ,J) and retract speed overrides (,Ss) directly inline, providing local control that Fanuc and Siemens only manage globally via parameters.

Program Examples

Fanuc Example

Standard counter tapping cycle absolute coordinate move returning to point R (G99):

G90 G99 G74 X100.0 Y150.0 Z-25.0 R3.0 P500 F1.5 ;

Dry run: During a dry run, the operator verifies tool length offsets and clearance plane safety. With single block enabled, the axis positions to X100.0 Y150.0, plunges to point R (Z3.0), feeds counterclockwise (M04) to Z-25.0, dwells for 500ms, reverses to clockwise (M03), and retracts to Z3.0 before terminating the block.

Rigid counter tapping cycle synchronized spindle rotation:

M29 S400 ;
G74 X100.0 Y150.0 Z-30.0 R5.0 P200 F1.25 ;

Dry run: With single block active, the first block commands spindle rigid mode at 400 RPM. The second block executes the synchronized plunge and retract, ignoring feed rate and spindle speed overrides, and dwells for 200ms at both the hole bottom and point R before stopping.

Siemens Example

Native mode left-hand thread cycle calling CYCLE84:

G290 G17 G94 F150.0 S800 M3 ;
MCALL CYCLE84(110.0, 102.0, 4.0, -35.0, 0, 0.5, 3, , -1.5, , 800, 800) ;
X120.0 Y85.0 ;
MCALL ;

Dry run: In Siemens mode, the first block switches the controller compiler and activates the spindle. The MCALL block modally binds the left-hand CYCLE84 cycle. Moving to X120.0 Y85.0 triggers the tap: Z axis feeds down to -35.0 at a synchronized pitch of -1.5mm, reverses spindle rotation direction, and retracts to the retraction plane before the empty MCALL cancels the cycle.

Mitsubishi Example

Synchronous left-hand tapping cycle using inline synchronization parameter:

G74 X100.0 Y100.0 Z-30.0 R3.0 F1.25 ,R1 S600 ;

Dry run: During test run, the control parses the inline ,R1 parameter to initiate synchronous tapping. The Z-axis feeds to Z-30.0 under synchronized CCW spindle rotation at 600 RPM with a 1.25mm pitch. At Z-30.0, the spindle reverses to CW and retracts to R3.0. Single block pauses execution at R3.0 for verification.

Error Analysis

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0564Programmed axis travel distance is larger than 4096 times the thread leadThe controller halts immediately before initiating the G74 cycle, displaying the preprocessor fault code on the screen.Adjust the programmed Z-depth or correct the thread lead (pitch) value in the G-code program.
FanucAlarm PS0368Tool length compensation type parameter shift executed while tool offset values are still activeThe machine alarms out during program initialization or tool change, halting the automatic execution.Clear all active tool offset values (G49) before executing parameter shift commands.
SiemensAlarm 61800Switching to G291 interpreter while MD 18800 option is disabledThe controller throws an interpreter error when G291 is read, and program execution is aborted.Enable MD 18800 $MN_MM_EXTERN_LANGUAGE or purchase the external compiler option from the manufacturer.
SiemensAlarm 61102Spindle rotation direction (M03 or M04) is missing from active registersCycle execution halts with an alarm before the tool starts feeding into the hole.Program a spindle rotation command (M03 or M04) prior to or inside the cycle call.
SiemensAlarm 61101Retraction plane (RTP) or safety clearance (SDIS) defined behind reference plane (RFP)The cycle halts instantly upon activation, showing the coordinate reference fault code.Correct the values of RTP, RFP, or SDIS so that retraction and safety levels are located above the reference plane.
SiemensAlarm 61003Active feedrate (F function) is missing during cycle callThe cycle fails to execute and displays a missing feed rate error.Program a valid feedrate (F) prior to the cycle block or within the block.
MitsubishiProgram Error (P186)Spindle speed command (S) inside active synchronous block, or constant surface speed (G96) active concurrentlyThe cycle execution halts immediately at the G74 block with an active P186 display.Remove the S command from the G74 block, or cancel G96 by commanding G97 before the cycle.
MitsubishiProgram Error (P182)Synchronous tapping cycle commanded while constant surface speed (G96) is activeExecution is interrupted and the controller throws the G96 conflict fault.Program G97 to cancel constant surface speed before executing the G74 tapping block.
MitsubishiProgram Error (P111)G74/G84 tapped in G18/G19 when Dril_Z is set to 1 under G125 formatThe machine halts before starting the tool movement and displays plane selection conflict.Switch to the G17 plane or configure parameter #1080 to unlock other drilling axes.

Application Note

Breaking a solid carbide tap and ruining the raw stock will occur if the operator attempts to trigger a manual feed hold or single-block stop during the tapping pass when Fanuc Parameter No. 5200 Bit 6 (FHD) is set to 0. Because the controller by default overrides any slide interruption to prevent the tool from freezing under load, the axis will drive relentlessly to the programmed depth. To prevent this outcome during program testing, operators must set FHD to 1, which enables a controlled deceleration at block boundaries. Additionally, programmers must clear active tool length offsets (G43/G44) using G49 before performing parameter shifts to prevent Alarm PS0368, and ensure that the Z-axis travel distance in a single block does not exceed 4096 times the thread lead to avoid triggering Alarm PS0564.

  • G63 Tapping Mode: Toggles the tapping mode that overrides feedrate and spindle overrides on Fanuc and Siemens controls, establishing a synchronous connection prior to canned cycle execution.
  • G73 High-Speed Peck Drilling Cycle: Employs a similar chip-breaking motion where the Z-axis retracts by a small parameter-defined distance, making it the precursor to peck rigid tapping.
  • G64 Continuous Path Mode: Configures the transition behavior between linear paths and cycles, defining whether exact-stop positioning is active at coordinates or smoothed out.
  • G84 Right-Hand Tapping Cycle: Serves as the clockwise counterpart to the G74 cycle, utilizing standard M03 entry spindle rotation and M04 retract rotation to cut standard right-hand threads.

Conclusion

Successful left-hand tapping relies on maintaining perfect synchronization between spindle rotation and axis feed, while verifying control parameters before executing the program. Setting safe clearance planes and clearing tool length offsets prior to the cycle ensures the spindle head avoids workholding collisions. Incorporating dry runs and configuring parameter bits like Fanuc's FHD or Mitsubishi's return speed overrides enhances both safety and tool life in production environments.

FAQ

Why does G74 ignore the feedrate override dial during cycle execution?

Overriding either the spindle speed or feedrate independently would disrupt the synchronized pitch, immediately stripping the cut threads or breaking the tap. The control preprocessor forces the feedrate and spindle speed overrides to remain at 100% to protect the workpiece. If you need to modify the cycle speed, edit the spindle speed (S) parameter in the program block and regenerate the corresponding feedrate (F) beforehand.

How does peck tapping in G74 improve tool life in deep holes?

Deep tapping accumulates high torque and clogs the flute with long chips, which can snap the tap near the bottom. Utilizing the peck parameter (Q) breaks the chips into small segments and clears them, reducing torque and heat buildup. When programming deep threads, set a peck depth (Q) of two to three times the thread diameter and verify that the retract amount is adjusted in parameters like #8018.

What is the difference between G74 standard tapping and M29 rigid tapping on Fanuc?

Standard tapping requires a compensating chuck to absorb minor axis delays during spindle reversal, whereas rigid tapping electronically locks the spindle and Z-axis movements together. Rigid tapping eliminates the need for floating tool holders and allows faster retraction speeds. To use rigid tapping, program M29 S_ prior to the G74 block, and confirm that Parameter 5200 Bit 0 is enabled to avoid axis synchronization alarms.

HG

Hakan Gündoğdu

CNC CARE CO-FOUNDER

CNC uzmanı, 25+ yıl saha tecrübesi, Mitsubishi Electric Türkiye geçmişi.