Skip to main content
CNC.wiki

G26 Spindle Speed Fluctuation Detection ON: CNC Programming Guide

Learn how to configure G26 on Fanuc, Siemens, and Mitsubishi CNC controls to prevent spindle speed fluctuations, set travel limits, and avoid tool crashes.

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

CNC CARE Co-founder

Introduction

If a cutting tool mounted on the turret encounters an unexpected physical overload, such as cutting through hard spots, scale, or experiencing a partial tool stall, the actual spindle feedback speed drops. If spindle speed fluctuation detection is not active because the system defaulted to its clear state or was explicitly turned off, the axes continue feeding at the programmed rate. This driving force pushes the tool into the stalled workpiece, leading to a broken tool, a scrap part, or a catastrophic hard collision where the turret crashes directly into the chuck jaws, the vise jaws, or the spindle assembly.

Constant Surface Speed Control (G96) amplifies this danger. As the cutting tool on the turret moves toward the spindle centerline (X0), the control automatically accelerates the spindle to maintain a constant cutting rate. Without active spindle speed fluctuation detection (G26), actual speed may lag behind the programmed ramp without triggering an alarm. If the programmer fails to configure a maximum spindle speed clamp using G92 or G50, the spindle speed can quickly escalate to excessive velocities, exceeding the physical safety limit of the chuck. The workpiece then flies out of the chuck jaws, resulting in a violent hard collision, destroyed tooling, a scrap part, and severe physical injury to the machine operator.

Technical Summary

Technical AspectSpecification Details
Command CodesG26 (Fanuc monitoring ON, Siemens limit, Mitsubishi C80 machining interruption); G162 (Mitsubishi monitoring ON); G163 (Mitsubishi monitoring OFF); G25 (Fanuc monitoring OFF, Siemens limit)
Modal Group / ModalityFanuc: Lathe Group 08 / MC Group 19 / Group 24 (older); Siemens: Group 03; Mitsubishi: Modal
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersFanuc: Parameter No. 3401 (Bits GSC/GSB), Parameter No. 3402 (Bit CLR); Siemens: SD 43420, SD 43400, MD 10604, MD 10710, MD 20150; Mitsubishi: #1242, #43071, #3105, #43072, #43073, #11020
Main ConstraintFanuc G26 deactivates on reset if CLR=1; Siemens G26 limits permanently overwrite setting data; Mitsubishi G162 automatically bypasses during synchronous tapping, spindle orientation, or C-axis mode.

Quick Read

  • Active Watchdog Monitoring: Spindle speed fluctuation detection halts feed axes if actual spindle feedback speed lags behind the programmed setpoint.
  • Address P Spindle Targeting: Command G26 on Fanuc uses address P to specify the target spindle in multi-spindle systems.
  • Parameter 3402 Reset Trap: Fanuc G26 deactivates on reset or power cycle if Parameter No. 3402 Bit 6 (CLR) is active, reverting to G25.
  • Persistent Siemens Boundaries: Siemens G26 limits permanently overwrite setting data, remaining active after program reset or power cycles.
  • Multi-Spindle Siemens Programming: Up to three independent spindle limits can be programmed in a single Siemens G26 block.
  • Mitsubishi PLC Alarm Action: Mitsubishi G162 outputs a signal to the PLC (Operation Error M01 1105) but does not trigger an automatic CNC halt.
  • C80 Machining Interruption: Standalone G26 on Mitsubishi C80 series triggers a machining interruption program to safely retract a broken tool.

Basic Concepts

Spindle Speed Fluctuation Detection (G26) acts as a critical software watchdog during heavy machining operations. The system actively monitors the actual spindle feedback speed against the programmed setpoint. The control detects any speed lag, halts the feed axes, and triggers an alarm code to prevent mechanical damage. Without active monitoring, the feed axes drive the tool into the stalled workpiece, causing severe mechanical collision.

Implementing G26 upper limitations on Siemens SINUMERIK controls establishes a virtual software boundary. If manual jog controls or programming errors drive the axes past these coordinates, the controller instantly interrupts the program and halts movement. This safety envelope acts as a vital backup to hardware limit switches, protecting high-value machine components like the tool turret and toolholder reference points.

Mitsubishi controls handle speed deviation alarms uniquely. When actual spindle speed deviates beyond the configured thresholds, the control triggers Operation Error M01 1105 and outputs a speed deviation signal. The CNC does not automatically stop the cycle or spindle. Instead, the machine relies on custom PLC logic designed by the Machine Tool Builder to execute the safety stop sequence.

Command Structure

The command structure of G26 varies depending on the control system and mode of operation. On Fanuc systems, G26 is programmed either as a standalone block or with address P to specify the target spindle. In Siemens controls, G26 serves a dual purpose, specifying either physical axis coordinates (X, Y, Z) for travel boundaries or spindle speed limits (S, S1, S2) for up to three spindles.

For Mitsubishi systems, spindle speed monitoring is initialized using G162 with specific addresses for start delay, detection width, fluctuation rate, and deviation range. Conversely, G26 on Mitsubishi C80 controls is a standalone command used exclusively to execute a machining interruption program for safe tool retraction.

Syntax Specifications:

  • Fanuc: G26; or G26 P...;
  • Siemens: G26 X... Y... Z...; (for axis limits) or G26 S... S1=... S2=...; (for spindle limits)
  • Mitsubishi: G162 S... P... Q... R... I...; (for monitoring activation), G163 S...; (for monitoring cancellation), or G26; (for machining interruption)

The primary control parameters governing command execution are outlined below:

BrandParameterFunctional Description
FanucParameter No. 3401 Bits GSC and GSBSelects G-code System A, B, or C to determine modal context.
FanucParameter No. 3402 Bit CLRReverts control to G25 (monitoring OFF) default state on reset.
SiemensSD 43420 $SA_WORKAREA_LIMIT_PLUSDefines upper working area limitation plus for specific axes.
SiemensSD 43400 $SA_WORKAREA_PLUS_ENABLEEnables or disables upper working area limitation in positive direction.
SiemensMD 10604 $MN_WALIM_GEOAX_CHANGE_MODEDetermines if working area limits remain active during axis switchover.
SiemensMD 10710 $MN_PROG_SD_RESET_SAVE_TABDetermines if programmed setting data limits remain effective after reset.
SiemensMD 20150 $MC_GCODE_RESET_VALUESIndex [14] defines default G-code reset position for Group 3.
Mitsubishi#1242 set14/bit2Configures screen output of operation error M01 1105.
Mitsubishi#43071 sp_spd_flc_dtc_pDefault start delay time when address P is omitted from G162.
Mitsubishi#3105 sutDefault spindle up-to-speed detection width when address Q is omitted.
Mitsubishi#43072 sp_spd_flc_dtc_rDefault allowable fluctuation rate when address R is omitted.
Mitsubishi#43073 sp_spd_flc_dtc_iDefault allowable speed deviation range when address I is omitted.
Mitsubishi#11020 Mcngit_Spec/bit0Determines if machining interruption is paused on emergency stop.

Brand Applications

Fanuc

Fanuc controls assign G26 to Group 08 on lathe systems and Group 19 on machining center systems. Spindle speed fluctuation monitoring defaults to the off state (G25) when system parameter 3402 is reset.

The command is written as G26; to activate monitoring on the primary spindle, or G26 P1; to monitor spindle number 1 in multi-spindle machines.

ParametersAlarmsVersions
Parameter No. 3401 (Bits GSC/GSB), Parameter No. 3402 (Bit CLR)Alarm PS0010 (Improper G-code), Alarm PS0200 (Illegal S code), Alarm PS0202 (Position LSI overflow)FANUC Series 30i/31i/32i-B Plus (Lathe Group 08, MC Group 19); Older controls (Group 24)

Warning: Failing to verify parameter 3402 status may cause G26 monitoring to be silently disabled after a reset, leaving the machine unprotected against spindle overload.

Siemens

Siemens controls use G26 to define upper coordinates for geometry axes or speed limits for configured spindles. Limit settings remain active after reset if parameter 10710 is configured.

Use G26 X80 Z330; in a separate block to set travel limits, or G26 S1400 S2=350; to clamp spindle speeds, followed by WALIMON to activate them.

ParametersAlarmsVersions
SD 43420, SD 43400, MD 10604, MD 10710, MD 20150Alarm 22280 (Run-in path short), Alarm 16748 (Tapping speed error), Alarm 14800 (Velocity zero), Alarm 61816 (Axes not on reference), Alarm 10751 (TRC collision)SINUMERIK 802D sl (write-protected MD 10604, no G93); high-end 840D sl and 828D (full support)

Warning: Axis limits will be deactivated during a geometry axis switchover unless MD 10604 is explicitly enabled in the system parameters.

Mitsubishi

Mitsubishi controls utilize G162 and G163 for spindle speed fluctuation detection. The C80 series also supports G26 for machining interruption sequences.

Use G162 S1 P1.5 Q5 R10; to monitor spindle 1 with specific deviation limits, and G163 S1; to deactivate monitoring.

ParametersAlarmsVersions
#1242 set14/bit2, #43071, #3105, #43072, #43073, #11020Operation Error (M01 1105), Program Error (P45), Program Error (P35)M800/M80/E80/C80 series (spindle monitoring via G162/G163); C80 series (G26 machining interruption); M800V/M80V series software A9 or later (Q-address chip removal support)

Warning: Direct execution of a legacy G26 command on Mitsubishi C80 systems will trigger tool retraction, potentially causing crashes if raw material is in the path.

Brand Comparison

TopicFanucSiemensMitsubishi
G26 MeaningSpindle Speed Fluctuation Detection ONUpper Working Area Limitation / Upper Spindle Speed LimitationMachining Interruption (retract tool on C80)
Travel Limiting CapacityNoneYes, via coordinate argumentsNone (G26 does not limit axes)
Reset Modal BehaviorG25 is default clear state (cancels G26)G26 remains active and overwrites setting dataStandard modal resets apply; G162 has auto-bypass
Alarm Action on Speed LagHalts feed axes on spindle speed lag— (no source)Outputs signal to PLC (does not automatically stop cycle)
Multi-Spindle SyntaxAddress P specifies spindle (e.g. G26 P1)Up to three spindle speed limits in one blockG162 uses address S (1 to 9)

Technical Analysis

The divergence in G26 functionality across brands is a critical programming concern. In Fanuc and Mitsubishi systems, G26 lacks any capacity to limit physical axis travel, focusing strictly on spindle monitoring or machining retraction respectively. In contrast, Siemens G26 possesses a dual nature, acting as either a physical coordinate boundary (along X, Y, or Z) or a spindle speed boundary (S) depending on the parameters passed. This dual role makes the command highly versatile but requires separate block programming to avoid syntax errors.

System reset behaviors present another point of deviation. Fanuc controls cancel G26 and revert to G25 (monitoring OFF) depending on Parameter No. 3402 Bit 6, whereas Siemens G26 limits write directly to system setting data and remain active across resets and power cycles. This is a critical trap for operators who assume that resetting the control clears all limits. On Mitsubishi systems, G162 features a unique auto-bypass protocol that temporarily suspends monitoring during synchronous tapping, spindle orientation, or C-axis mode, resuming automatically once these cycles complete.

Alarm handling methods differ fundamentally between systems. Fanuc halts the machine directly upon detecting speed deviation, while Mitsubishi delegates the stop sequence to the Machine Tool Builder's PLC logic via Operation Error M01 1105. This means a Mitsubishi machine's stop behavior is highly dependent on how the builder configured the PLC ladder, whereas Fanuc guarantees immediate CNC-level halts. Siemens controls focus their alarm triggers on axis limit violations rather than speed fluctuations under G26, rendering speed-lag monitoring a brand-specific feature of Fanuc and Mitsubishi.

Program Examples

Fanuc Example:

G26 P1;

dry run: The controller reads G26 P1 and activates spindle speed fluctuation detection specifically for spindle 1. The control monitors actual feedback speed against programmed speed. If a load causes the speed to deviate, the feedrate is halted.

Siemens Example:

G26 S1400 S2=350;
WALIMON;

dry run: The control reads the G26 block and sets the upper spindle speed limit to 1400 rpm for spindle 1 and 350 rpm for spindle 2. WALIMON is then executed to activate these upper working area and spindle speed limitations.

Mitsubishi Example:

G162 S1 P1.5 Q5 R10;

dry run: The control activates spindle speed fluctuation detection on spindle 1. It waits for a 1.5-second start delay (P1.5) before monitoring. The spindle up-to-speed width is set to 5% (Q5) and the allowable fluctuation rate is set to 10% (R10). If actual speed deviates beyond these limits, it triggers Operation Error M01 1105.

Error Analysis

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0010 'IMPROPER G-CODE'G26 is commanded when the option is not installed or enabled.CNC execution halts immediately.Install spindle fluctuation option or enable system parameters.
FanucAlarm PS0200 'ILLEGAL S CODE COMMAND'S speed exceeds maximum gear stage speed or rigid tapping is commanded under G96.Cycle stops and alarm screen displays error.Cancel G96 before rigid tapping; specify valid S code.
SiemensAlarm 16748Programmed tapping speed is outside active gear stage limits during G331.Spindle stops rotating and axis feed halts.Select appropriate gear stage or adjust S value.
SiemensAlarm 14800Path feedrate F0 is programmed without an active fixed feedrate.Axis motion does not start.Specify a positive feedrate value.
MitsubishiOperation Error (M01 1105)Actual spindle speed deviates beyond rate (R) or range (I) limits.Control outputs speed out of range signal to PLC; screen displays error message.PLC-level safety sequence handles shutdown; verify cutting load and speed limits.
MitsubishiProgram Error (P45)Another command (like motion) is issued in the same block as G162/G163/G26.CNC execution stops before executing the block.Program G162, G163, or G26 in a separate, dedicated NC block.

Application Note

A violent collision of the tool turret into the chuck jaws or workpiece clamps occurs if the programmer omits the maximum spindle speed clamp under Constant Surface Speed (G96) while spindle speed monitoring is deactivated. As the cutting tool moves toward the spindle centerline (X0), the CNC control accelerates the spindle. Without a G92 or G50 speed clamp, the rotational speed quickly escalates, exceeding the physical safety threshold of the chuck and causing the workpiece to fly out of the chuck jaws. Operators can mitigate this risk on Mitsubishi M800V controls running software version A9 or later by utilizing advanced fixed cycles for chip removal via address Q, while maintaining active G162 spindle monitoring.

Related Command Network

  • G25 (Spindle Fluctuation OFF / Lower Limit): Deactivates spindle speed fluctuation detection on Fanuc controls (g25-spindle-speed-fluctuation-detection), or defines the lower working area limitation on Siemens systems (g25-lower-working-area).
  • WALIMON / WALIMOF (Working Area Limits ON/OFF): Activates or deactivates the upper and lower working area and spindle speed limitations defined by G26 and G25 on Siemens controls.
  • G163 (Spindle Fluctuation OFF): Cancels the active spindle speed fluctuation detection for specified spindles on Mitsubishi systems.
  • G22 (Stored Stroke Limit Check ON): Enables the stored stroke limit check (g22-stored-stroke-limit-check-on) to establish axis travel boundaries.

Conclusion

Reliable spindle operation requires matching the specific G-code dialect to the machine control before execution. Always verify parameter 3402 status on Fanuc systems to prevent unexpected deactivation, utilize WALIMON/WALIMOF on Siemens to manage persistent boundaries, and ensure custom PLC logic is properly configured to handle Mitsubishi's M01 1105 error signals.

FAQ

Does resetting a Siemens control cancel G26 spindle speed limits?

No. Siemens G26 limits permanently overwrite the system setting data and remain active across resets and power cycles. To clear or modify these limits, operators must explicitly program WALIMOF to turn off limitations or write a new G26 block with updated limits.

Why does commanding G26 on a Mitsubishi control trigger tool retraction?

On Mitsubishi C80 Series controls, G26 is mapped to the Machining Interruption function rather than spindle monitoring. Triggering G26 runs a pre-written retraction macro that pulls the tool away from the part; to monitor spindle speeds, programmers must use the brand-specific G162 command instead.

How does Fanuc parameter 3402 affect spindle speed fluctuation monitoring?

Fanuc parameter 3402 Bit 6 (CLR) determines if the G26 state is maintained after a reset. If CLR is set to 1, resetting the control will automatically cancel G26 and revert the machine to G25 (monitoring OFF), requiring the operator to manually re-issue G26 in the startup blocks.

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