Skip to main content
CNC.wiki

How to Use the G80 Canned Cycle Cancel Command in CNC Programming

Master the G80 canned cycle cancel command for Fanuc, Siemens, and Mitsubishi. Learn parameters, avoid tool collisions, and troubleshoot system alarms.

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

CNC CARE Co-founder

Introduction

Resuming automatic program execution after an emergency stop or manual reset without ensuring that active modal registers are initialized will trigger an unintended machining plunge at the first coordinate block the machine encounters. During modal hole-machining cycles such as spot drilling or tapping, the CNC preprocessor retains coordinate data and cycle states in the NC registers. If an operator bypasses safety protocol and runs the subsequent coordinate block, the spindle head or indexable tool turret will execute a rapid, uncompensated descent along a shifted path. The spindle tool drives directly into physical barriers and workpiece workholding, crashing the tool turret into a machine vise jaw, table-mounted fixture clamps, or the rotating jaws of a spindle chuck. This sudden, high-speed axis deviation shatters the indexable tool, damages the spindle assembly, halts slide movement with a high-current axis overload alarm, and converts expensive casting raw stock into a completely ruined scrap part.

Technical Summary

Parameter/FieldSpecification / Value
Command CodesG80 (ISO Dialect Mode / Fanuc / Mitsubishi), MCALL (Siemens Native Mode)
Modal GroupGroup 10 (Fanuc / Siemens ISO Dialect), Group 09 (Mitsubishi)
Supported BrandsFanuc, Siemens (SINUMERIK), Mitsubishi
Critical ParametersFanuc Parameter No. 3402 Bit 6 (CLR), Parameter No. 3407 Bit 1 (C09); Siemens MD 18800, MD 20154; Mitsubishi Parameter #1151 rstinit, #1210 RstGmd/bitF
Main ConstraintHole-machining canned cycles are modal and repeat at every positioning command until cancelled. Spindle rotation (M03/M04) must be active before calling a cycle. Mitsubishi locks out all spatial coordinate conversions and sub-part system commands while canned cycles are active.

Quick Read

  • Always program a standalone G80 block immediately after completing a hole pattern to clear Z-axis depth and R-axis clearance variables from the modal memory.
  • Ensure that active rigid or punch tapping cycles are cancelled with G80 to clear the active spindle speed modal value to zero (S0) and prevent subsequent non-tapping coordinate moves from executing at high RPM.
  • Verify compiler states on Siemens systems using G291 to enable ISO Mode for compiling legacy G80, or use MCALL standalone commands in native G290 mode.
  • Avoid commanding auxiliary functions like coolant M-codes or tool turret T-codes on separate blocks during active modal cycles, as the preprocessor will execute an extra plunge at the current coordinates.
  • Monitor coordinate and modal registers on the HMI screen during a single-block dry run to verify that all canned cycle modal states are fully deactivated.
  • Command G80 prior to axis transformations (G111), axis exchanges (G140–G142), or synchronization commands (G122/G144) to prevent system lockouts and axis alarms.

Basic Concepts of Canned Cycle Cancellation

Modal canned cycles represent a powerful programming convenience that simplifies hole-machining operations such as drilling, tapping, and boring. Once a canned cycle is activated via commands like G81 or G84, the CNC preprocessor retains the cycle details—including final depth Z, point R clearance plane, dwell time, and feedrate—in its modal memory. This means the machine will automatically execute the complete drilling sequence at every subsequent coordinate programmed in the code, without requiring the cycle parameters to be restated.

This modal behavior introduces significant operational risks if the cycle is not deactivated after the hole pattern is finished. Any coordinate movement programmed for tool changes, positioning, or auxiliary moves will be interpreted as a new hole location, causing the spindle to plunge. To counter this risk, G80 acts as a standalone deactivation code that clears the preprocessor's active modal registers, resets Point R and Point Z coordinate registers, and restores the machine tool to normal linear or rapid positioning states.

Command Structure and Syntax

The command structure of G80 is designed to be straightforward and is programmed without coordinate arguments or auxiliary functions. It represents a standalone preparatory command that cancels all active hole-machining cycles in the active block and resets the tool trajectory to standard linear interpolation (G01) or rapid traverse (G00) positioning modes.

When the CNC interpreter parses a G80 block, it immediately flushes the active cycle's variables, including Z-axis depth values, R-axis retraction offsets, dwell registers, and repeat loops. In specific tapping cycles, the cancellation command also resets the active spindle speed modal register to protect tool integrity during subsequent transitions.

Standard Syntax

G80 ;

Siemens Native Syntax

MCALL ;

Active Addresses Reset by G80

Address / RegisterStatus After G80 CancellationFunction Description
Point Z (Z-axis Depth)Cleared to 0 / modal memory resetDetermines the final hole depth at the bottom of the drill stroke.
Point R (Clearance Plane)Cleared to 0 / modal memory resetSets the coordinate height where rapid feed transitions to cutting feed.
Feedrate (F)Reset / modal memory clearedThe cutting feed rate applied during canned hole-machining.
Dwell Time (P / X)Reset to zeroDuration the tool remains at the bottom of the hole for chip-breaking or counterboring.
Spindle Speed (S)Reset to zero (Tapping mode only)Spindle RPM modal value, cleared to zero under rigid/punch tapping cancellation.

Brand Applications: Fanuc, Siemens, and Mitsubishi

Fanuc

On Fanuc systems, G80 is a Group 10 modal G-code that deactivates Group 09 hole-machining cycles. The system preprocessor handles canned cycles dynamically based on central control parameters such as Parameter 3402 and Parameter 3407.

The code must be programmed on a standalone block or in conjunction with a safe retraction coordinate to ensure modal variables are flushed before subsequent tool paths are executed.

Parameter / Alarm / VersionValue / CodeDescription
System ParameterParameter No. 3402 Bit 6 (CLR)Toggles whether Group 01 modal G-codes reset to default states (G00/G01) upon system reset.
System ParameterParameter No. 3407 Bit 1 (C09) / Bit 2 (C10)Set to 0 to automatically reset the active canned cycle state to G80 during system reset.
System ParameterParameter No. 0001 Bit 1 (FCV)Set to 1 to enable the Series 15 program format in memory operations.
System ParameterParameter No. 5102 Bit 3 (F16)Configures format check: 0 for Series 15 cycle format, 1 for standard Series 16/30i cycle structure.
System ParameterParameter No. 5102 Bit 6 (RAB)Controls Point R coordinate type in Series 15 format (0 = incremental, 1 = absolute).
System AlarmAlarm PS0206Triggered when trying to switch the drilling axis without first canceling the cycle with G80.
System AlarmAlarm PS5561Triggered on lathes when a repetitive roughing cycle is called during active grinding cycles.
System AlarmAlarm PS0010Invalid preparatory command or compile error.
Version DifferenceSeries 15 vs. Series 16/30iSeries 15 uses address L for repetition count and incremental R coordinates by default; Series 16 uses K for repetition.
Version DifferenceDrilling vs. Grinding CyclesDrilling cycles belong to Group 09 and are cancelled by G80. Grinding cycles belong to Group 01 and must be cancelled by G00/G01.

Warning: Failure to clear tapping cycles (G84) on Fanuc systems will keep the high-RPM spindle active, but G80 deactivation will automatically drop the active speed modal value (S) to S0 to prevent unexpected high-speed movements.

Siemens

Siemens SINUMERIK systems process canned cycle cancellations through a bimodal compiler. When running in external ISO Mode, G80 is supported, whereas native Siemens mode uses the MCALL command.

Programmers must configure channel data parameters MD 18800 and MD 20154 to compile external dialect codes correctly.

Parameter / Alarm / VersionValue / CodeDescription
System ParameterMD 18800 $MN_MM_EXTERN_LANGUAGEMust be set to 1 to enable external ISO Dialect Mode compilation.
System ParameterMD 20154 $MC_EXTERN_GCODE_RESET_VALUES[n]Defines default G-group modal states upon system reset in ISO Dialect mode.
System ParameterMD 20150 $MC_GCODE_RESET_VALUES[n]Defines active G-group modals upon reset or power-up in native Siemens mode.
Global Variable_ZSFIChannel-specific GUD7 global user variable pre-allocating default cycle parameters.
System AlarmAlarm 61800Triggered if switching to ISO Mode (G291) is attempted while MD 18800 is disabled.
System AlarmAlarm 14011Occurs when executing multiple repetitive roughing cycles in MDA mode.
System AlarmAlarm 61102Triggered during cycle compilation if the spindle speed direction is not programmed.
System AlarmAlarm 61101Inconsistent definition of retraction plane, reference plane, or safety clearance.
Version DifferenceG290 Native vs. G291 ISOG290 uses native MCALL (standalone block cancel); G291 supports G80 and Group 01 motion cancels.
Version Difference802D sl vs. 840D sl802D sl reset variables are write-protected; 840D sl supports high-end graphics and simulation.

Warning: Siemens controls retain the active spindle speed modal value after a canned cycle is cancelled, meaning subsequent motion commands will inherit the high RPM of the previous tapping cycle if not manually overridden.

Mitsubishi

Mitsubishi systems map G80 directly to Group 09 rather than Group 10, meaning it behaves as a direct override of active canned cycles G81–G89. Memory modals are initialized during reset based on parameters #1151 and #1210.

Safe deactivation requires G80 to be commanded before initiating part synchronization or arbitrary axis exchange functions.

Parameter / Alarm / VersionValue / CodeDescription
System ParameterParameter #1151 rstinitSet to ON to initialize modal registers (including Group 09) to default states upon reset.
System ParameterParameter #1210 RstGmd/bitFDetermines whether active modal G-codes are retained or cleared upon a system reset.
System ParameterParameter #1037 cmdtypG-code command type configuration parameter mapping G80 natively into Group 09.
System AlarmProgram Error (P411)Triggered if Axis Name Switching (G111) is commanded while a fixed cycle is active.
System AlarmProgram Error (P501)Triggered if Arbitrary Axis Exchange (G140–G142) is commanded during a fixed cycle.
System AlarmProgram Error (P652)Triggered if Sub Part System Control I (G122) or II (G144) is called while Group 09 is active.
Version DifferenceGroup 09 AllocationNatively overrides G81–G89 codes due to same-group mapping, unlike Fanuc Group 10.
Version DifferenceProgram Format SwitchG188 Machining Center System command resets the Group 09 registers to default G80 modal state.

Warning: Mitsubishi enforces a strict lockout policy. Attempting coordinate plane transitions or coordinate transformations during active canned cycles will immediately trigger alarm locks and freeze machine motions.

Brand Comparison

Comparison TopicFanucSiemensMitsubishi
Modal Group AllocationGroup 10 (Canned Cycle Cancel group)Group 10 (under G291 ISO Dialect mode); Native mode deactivates G80Group 09 (Fixed Cycle group), directly overriding G81–G89
Native Cancellation CommandG80 ; (standalone)MCALL ; (standalone empty block in G290 mode)G80 ; (standalone)
On-the-fly Group 01 CancelYes. Motion codes (G00, G01, G02, G03) cancel active canned cyclesYes in G291 (ISO mode); No in G290 mode (requires MCALL ;)Yes. Group 01 motion codes deactivate active canned cycles
Spindle Speed (S) Modal ResetRigid/punch tapping G84 deactivation clears modal speed (S) to S0Spindle speed modal is retained upon cycle cancelSpindle speed modal is retained (except punch tapping cancel sets S to 0)
Spatial Transformation LockoutCan switch axis under rigid parameters with manual safety checksManaged via shell cycle macros (cycle328.spf) and TRAFOOF commandStrict preprocessor lockout; triggers program errors (P411/P501/P652)

Technical Analysis of Preprocessor Behaviors

The allocation of G80 within G-code modal groups represents a fundamental architectural difference in how Fanuc, Siemens, and Mitsubishi handle register clearing. Fanuc compiles G80 as a Group 10 preparatory command, separating the cancel function from the Group 09 canned cycles. Because of this group separation, the preprocessor allows Group 01 motion commands such as G00 or G01 to perform an implicit cancellation of the drilling cycles. Mitsubishi, in contrast, maps G80 directly inside Group 09. Under Group 09 rules, only one G-code can remain active at a time, meaning that commanding G80 directly overrides the modal status of drilling cycle codes like G81 or G83. For Siemens controls operating in native G290 mode, G80 is entirely bypassed; the control relies instead on the standalone MCALL instruction to terminate modal cycle calls, preventing motion-based cancellations from interfering with custom cycles.

Another major point of divergence is spindle control reset behavior. When a rigid tapping or punch tapping cycle is cancelled, the spindle speed register must be handled carefully to avoid safety hazards. On Fanuc controls, executing G80 at the end of a tapping cycle automatically wipes the active spindle speed modal register to S0. This safety reset prevents the spindle from unexpectedly spinning at high speeds during subsequent rapid positioning blocks. Siemens SINUMERIK systems do not share this behavior; they retain the active spindle speed in memory after MCALL or G80 deactivation, requiring the programmer to manually command a spindle stop (M05) or assign a new speed. Mitsubishi operates on a split behavior: standard tapping cycles retain the spindle speed modal, but punch tapping canned cycles reset the active speed to zero upon G80 cancellation.

Preprocessor safety lockouts also vary significantly between the controllers. Mitsubishi systems execute a strict, preemptive look-ahead check on active modal cycles before compiling coordinate transformations or part-synchronization commands. Attempting to run axis switches (G111), arbitrary axis exchanges (G140–G142), or multi-part synchronization (G122/G144) while Group 09 is active results in immediate program errors and motion stops. Fanuc systems permit axis switches with manual parameter configurations. Siemens systems handle safety boundaries and reference returns through background macro cycles rather than rigid hardware control. Reference returns (G28/G30) call the cycle328.spf script, which automatically executes the TRAFOOF command to disable active transformations and protect the machine from trajectory errors, while safety zones are managed via text commands like WALIMON and WALIMOF instead of binary codes.

Program Examples and Dry Run Walkthroughs

Fanuc Spot Drilling and Tapping Canned Cycle Example

O1001 ;
G90 G54 G00 X100.0 Y-150.0 Z50.0 S1000 M03 ;
G99 G81 Z-30.0 R3.0 F150.0 ;
X120.0 Y-180.0 ;
G80 G00 Z50.0 M05 ;
M30 ;

Dry Run Analysis: In block 2, the controller switches to absolute programming (G90) and rapids (G00) to coordinates X100.0, Y-150.0, Z50.0 while starting the spindle clockwise at 1000 RPM (M03). Block 3 activates the modal spot drilling canned cycle (G81) with a final depth of Z-30.0, point R clearance at 3.0, and a feedrate of 150.0 mm/min. The preprocessor sets G99 (retract to point R). The Z-axis rapid-travels to Z3.0, feeds to Z-30.0, and rapid-retracts to Z3.0. Block 4 shifts coordinates to X120.0, Y-180.0. Because G81 is modal, the preprocessor detects coordinate change, rapids to X120.0 Y-180.0, plunges the drill to Z-30.0 at feed, and retracts to Z3.0. Block 5 commands G80, which immediately cancels the Group 09 canned cycle, flushes point R and Z depth from the registers, and coordinates with G00 to retract the Z-axis to the safe Z50.0 clearance plane while the spindle is stopped by M05.

Siemens Bimodal Native and ISO Mode Canned Cycle Example

%_N_CYCLE_EXAMPLE_MPF
G291 ;
G90 G99 G81 X100.0 Y-150.0 Z-30.0 R3.0 F150.0 ;
G80 M05 ;
G290 ;
MCALL CYCLE82 (2.0, 0.0, 3.0, -15.0, , 0.5) ;
X100.0 Y-150.0 ;
MCALL ;
M30 ;

Dry Run Analysis: The preprocessor begins by executing G291 in block 2, switching the interpreter to ISO Dialect Mode. In block 3, the G81 cycle is initiated, rapid-positioning the axis to X100.0, Y-150.0, plunge-feeding the tool to Z-30.0 from a clearance plane of R3.0, and retracting to point R. Block 4 compiles G80, which terminates the ISO modal cycle and halts the spindle with M05. In block 5, G290 switches the interpreter back to native Siemens mode. Block 6 calls MCALL CYCLE82 (drilling and counterboring cycle) modally, setting the reference plane to 2.0, safety clearance to 3.0, final drilling depth to -15.0, and dwell time to 0.5 seconds. In block 7, coordinate X100.0 Y-150.0 is programmed, triggering the Siemens CYCLE82 macro plunge. Block 8 executes a standalone MCALL command to deactivate the native modal call and restore the control to standard motion states.

Mitsubishi Fixed Cycle and Safety Lockout Example

O2002 ;
G90 G99 G83 Z-40.0 R-5.0 Q10.0 F120.0 ;
X120.0 Y-180.0 ;
G80 M05 ;
M30 ;

Dry Run Analysis: Block 2 activates the modal peck drilling fixed cycle (G83) incrementally along the Z-axis. The tool rapid-travels to point R (-5.0), executes a deep peck of Q10.0 at a feedrate of 120.0, retracts to point R, pecks again until reaching final depth Z-40.0, and retracts to point R. Block 3 commands a new coordinate position X120.0, Y-180.0. Since G83 is modally active under Group 09, the machine positioning axes rapid to the new coordinates and perform the peck drilling sequence. Block 4 commands a standalone G80 to cancel the active Group 09 cycle, clearing Z depth, point R clearance, dwell registers, and peck parameters, and stopping the spindle via M05.

Error Analysis and Diagnostic Codes

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0206Attempting to switch the drilling axis (e.g. Z-axis to X-axis) while a canned cycle is active.The machine axis halts immediately mid-program with a red alarm light flashing on the operator panel.Program a standalone G80 block to cancel the active modal canned cycle before executing coordinate plane switching commands.
FanucAlarm PS5561Commanding a repetitive turning cycle (like G71) while a grinding cycle is modally active.Program compilation stops at the active block, displaying an axis motion lockout message.Use a Group 01 command (such as G00 or G01) to cancel the active grinding cycle before calling turning cycles.
SiemensAlarm 61800Attempting to execute an ISO Dialect switchover (G291) while the MD 18800 parameter is disabled.The interpreter rejects the G291 block and displays an "External CNC system missing" error.Configure the channel-specific machine data parameter MD 18800 $MN_MM_EXTERN_LANGUAGE to 1.
SiemensAlarm 61102Starting a drilling or tapping cycle when no spindle rotation direction is active.The cycle compiles but stops execution before the tool makes contact with the workpiece.Program M03 or M04 in the startup block or prior to the cycle command block.
MitsubishiProgram Error (P411)Commanding Axis Name Switching (G111) while a Group 09 fixed cycle is active in modal registers.The controller halts execution, displaying a program error warning on the HMI screen and disabling feed.Program a standalone G80 block to cancel the drilling cycle before executing the axis-switching command.
MitsubishiProgram Error (P501)Issuing an Arbitrary Axis Exchange command (G140–G142) while a fixed canned cycle is active.Axis motion stops instantly, and the HMI locks coordinate updates, requiring system reset.Deactivate the active canned cycle with G80 before commanding axis exchange parameters.

Application Notes: Advanced Programming Safety

A tool turret collision will result if auxiliary functions, such as coolant M-codes or tool turret index T-codes, are programmed on separate lines while a hole-machining canned cycle is modally active. The CNC controller compiles coordinate-free blocks as empty instructions, forcing the tool turret to execute a redundant, full-depth plunge at its current X-Y position. If the tool has already reached its final depth in a previous block, this redundant descent drives the drill or tap directly into the vise jaw, table clamps, or spindle chuck. The tool shatters under high load, causing axis ball screw damage and throwing high-current axis-overload alarms. To prevent this outcome, programmers must verify that G80 is programmed immediately after the last hole coordinate, and operators must perform single-block dry runs while monitoring coordinate registers on the HMI screen before enabling high-speed automatic cycles.

Related Command Network

  • G81 to G89 (Modal Canned Cycles): The primary group of hole-machining commands that remain active in modal memory until canceled by G80.
  • MCALL: The native Siemens modal cycle call and deactivation command used in G290 mode to clear active parameters.
  • G290 / G291: The bimodal switches that toggle the Siemens control between native mode and ISO Dialect mode, where G80 is compiled.
  • G00 / G01 / G02 / G03 (Group 01 Motion Codes): Preparatory codes that automatically deactivate active canned cycles in Fanuc and Mitsubishi configurations.
  • G80.4 / G80.5: Synchronization commands used to cancel electronic gear box (EGB) and synchronization pairs.
  • Internal Reference Slugs: View details about drilling and threading cycles: G76 Fine Boring Cycle, G76 Threading Cycle, and G75 Fixed Point Approach.

Conclusion

A robust CNC program must treat G80 not as an optional clean-up code, but as a critical safety barrier. Programming standalone deactivation blocks at the end of every hole pattern and at the start of each tool path ensures that modal memory is completely purged before coordinate changes occur. By establishing this programming habit and validating registers via single-block dry runs, operators can eliminate unintended coordinate plunges and protect machine components from catastrophic collisions.

Frequently Asked Questions (FAQ)

How does G80 affect spindle speed registers during cycle cancellation?

Canceling a rigid tapping or punch tapping cycle with G80 behaves differently across control brands. On Fanuc systems, deactivating the tapping cycle resets the spindle speed modal register to zero (S0) as a built-in safety measure. To run subsequent motions, you must explicitly program a new spindle speed (S-value) and direction command. On Siemens and Mitsubishi controls, the spindle speed modal is retained in memory after G80 or MCALL execution, meaning the machine will continue running at high RPM unless you command a spindle stop (M05) in the cancellation block.

Can Group 01 motion commands safely replace a G80 block?

While commanding G00, G01, G02, or G03 will implicitly cancel active canned cycles in Fanuc and Mitsubishi controllers, relying on motion codes instead of G80 is a risky programming practice. If a program is restarted or manual operation is resumed mid-program, the motion code may be bypassed, leaving the preprocessor modal registers in an active drilling state. The safest approach is to always program a standalone G80 block to ensure that modal memory is fully flushed regardless of interpreter state changes.

What is the difference between G80 and MCALL on Siemens SINUMERIK controls?

The choice between G80 and MCALL depends on the active interpreter mode of the Siemens control. When the interpreter is running in external ISO Mode (G291), G80 cancels the active canned cycle. In native Siemens Mode (G290), G80 is ignored, and the controller requires a standalone MCALL block with no arguments to cancel modal cycle calls. Always verify that your interpreter mode matches your cycle deactivation command to prevent syntax errors and unwanted axis motion.

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