Skip to main content
CNC.wiki

G25 Spindle Speed Fluctuation Detection OFF: CNC Programming Guide

Learn how to program G25, G163, and G26 spindle speed fluctuation detection OFF commands on Fanuc, Siemens, and Mitsubishi CNC controls to prevent machine crashes.

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

CNC CARE Co-founder

Introduction

Turret crash, tool breakage, or a workpiece thrown from the chuck jaws are direct consequences of disabling spindle speed fluctuation detection during heavy roughing or threading. When an operator runs a program with fluctuation monitoring turned off, the CNC controller ignores physical load variations such as tool stall, scale buildup, or cutting hard spots. Under these conditions, the spindle speed drops drastically, but the feed axes continue their programmed movement, driving the turret into the stalled workpiece or the chuck jaws.

Technical Summary

FeatureTechnical Details
Command CodesFanuc: G25 / Siemens: G25 / Mitsubishi: G163
Modal GroupFanuc: Group 08 (Lathe), Group 19 (Machining Center) (Modal) / Siemens: Group 03 (Modal) / Mitsubishi: Group 00 (Modal cancel)
BrandsFanuc, Siemens, Mitsubishi
Critical ParametersFanuc No. 3402 Bit 6 (CLR) / Siemens SD 43410 ($SA_WORKAREA_MINUS_ENABLE) / Mitsubishi #43071 (sp_spd_flc_dtc_p)
Main ConstraintSiemens and Mitsubishi require programming in separate blocks; Siemens G25 functions as a lower working area or speed limit, not fluctuation deactivation.

Quick Read

  • Deactivating spindle speed fluctuation detection cancels the control's ability to trigger feed hold when actual speed drops due to cutting resistance.
  • In Fanuc systems, G25 is modally OFF by default upon power-on or control reset when parameter 3402 Bit 6 is enabled.
  • In Siemens controls, G25 does not turn off speed fluctuation monitoring but instead sets a Lower Working Area or Lower Spindle Speed Limitation.
  • In Mitsubishi systems, G163 is the command to turn OFF speed fluctuation detection, while G162 turns it ON with parameters for delay and tolerance.
  • Mitsubishi controls automatically bypass spindle speed fluctuation detection during synchronous tapping, spindle orientation, or C-axis mode.
  • Cross-brand transfer of G25 or G26 causes severe errors: G26 triggers a tapping retract sequence on Mitsubishi, and G25 sets unexpected travel limits on Siemens.

Basic Concepts

Spindle speed fluctuation detection operates as an electronic watchdog within the CNC system. When active, the controller monitors the actual feedback speed from the spindle encoder and compares it to the programmed speed setpoint. If the spindle speed deviates beyond a predefined threshold because of material variations or heavy cutting loads, the control registers a fault to protect the machine hardware.

Deactivating this monitoring watchdog by programming a G25 or G163 command changes how the controller handles feedback variations. Once monitoring is disabled, the controller does not verify if the spindle feedback speed matches the programmed target. If the tool nose on the turret encounters hard spots, scale, or a tool stall, the spindle speed drops drastically while the axes continue feeding at the programmed rate, forcing the turret to drive the tool into the stalled workpiece.

The command configuration varies significantly between CNC manufacturers. Fanuc utilizes G25 to turn off the monitoring initiated by G26, while Mitsubishi relies on G163 to cancel G162. Siemens SINUMERIK completely repurposes G25 and G26 to define physical coordinate boundaries and spindle speed clamps, rather than monitoring velocity fluctuations.

Command Structure

The syntactic rules for deactivating spindle speed fluctuation detection depend on the control manufacturer's architecture. In Fanuc systems, G25 is a standalone modal command that takes no address parameters, operating globally to cancel a previously active G26 monitoring mode.

In Siemens controls, G25 must be written in a separate block and requires axis coordinates to set working area boundaries, or spindle addresses to set minimum speed limits. Mitsubishi systems command G163 with an optional spindle address to cancel detection on a targeted spindle, or without parameters to deactivate monitoring on all spindles simultaneously.

Command Syntax

  • Fanuc: G25 ;
  • Siemens (Working Area Limit): G25 X... Y... Z... ;
  • Siemens (Spindle Speed Limit): G25 S... S1=... S2=... ;
  • Mitsubishi: G163 S... ;

Parameters and Addresses

Address / ParameterSystem / BrandDescription
X, Y, ZSiemensLower coordinate limits in the basic coordinate system (BCS) defining the working area.
SSiemensMinimum spindle speed limit in RPM for the master spindle.
S1, S2SiemensMinimum spindle speed limits in RPM for additional spindles.
SMitsubishiTarget spindle name or number (typically 1 to 9) for deactivation.
PMitsubishiDetection start delay time in seconds (programmed with G162).
QMitsubishiSpindle up-to-speed detection width percentage (programmed with G162).
RMitsubishiAllowable spindle speed fluctuation rate percentage (programmed with G162).
IMitsubishiAllowable spindle speed fluctuation range in RPM (programmed with G162).

Brand Applications

Fanuc

In Fanuc systems, G25 deactivates Spindle Speed Fluctuation Detection. System parameter No. 3402 Bit 6 determines whether the control defaults to G25 at startup or reset, while parameter No. 3401 determines the active G-code system.

The G25 command is modal and belongs to Group 08 in lathe configurations or Group 19 in machining centers. It remains active until canceled by G26.

CategoryItem / ValueDescription
ParameterNo. 3402 Bit 6 (CLR)Restores default clear state G-codes (G25) upon boot or reset when set to 1.
ParameterNo. 3401 Bit 6 (GSB), Bit 7 (GSC)Selects G-code system A, B, or C. Setting GSC=0 and GSB=1 selects G-code System A (default).
AlarmAlarm PS0010"IMPROPER G-CODE" triggers if G25 or G26 is specified without the monitoring option installed.
AlarmAlarm PS0200"ILLEGAL S CODE COMMAND" triggers if commanded speed exceeds gear range or G96 tapping is run.
AlarmAlarm PS0202"POSITION LSI OVERFLOW" triggers if serial spindle pulse rate exceeds 32,768 pulses per 4ms or 8ms.
VersionSeries 30i/31i/32i-B PlusG25 is Group 08 in Lathe Systems and Group 19 in Machining Center Systems.
VersionMulti-spindle configsG26 accepts address P for specific spindle targeting, whereas G25 is global or turns OFF all spindles.

Warning: Operating with G25 active prevents the controller from verifying actual feedback speed, which can cause the turret to drive a tool into a stalled workpiece or chuck jaws if cutting resistance exceeds spindle motor capacity.

Siemens

Siemens controls do not use G25 for spindle speed fluctuation monitoring. G25 is a Group 03 modal command that sets either the Lower Working Area Limitation or the Lower Spindle Speed Limitation. Parameter SD 43430 defines the negative coordinate limit for each axis.

Programming G25 with coordinate axes must occur in a separate block. The virtual boundaries set by G25 must be enabled by executing WALIMON.

CategoryItem / ValueDescription
ParameterSD 43430 $SA_WORKAREA_LIMIT_MINUSAxis-specific setting data defining the lower working area limit in BCS.
ParameterSD 43410 $SA_WORKAREA_MINUS_ENABLEAxis-specific setting data to enable (1) or disable (0) lower working area limit check.
ParameterMD 10604 $MN_WALIM_GEOAX_CHANGE_MODEDetermines if working area limits are kept (1) or cleared (0) during geometry axis switch.
ParameterMD 10710 $MN_PROG_SD_RESET_SAVE_TABDetermines if programmed G25 setting data limits persist after reset or power-on.
ParameterMD 20150 $MC_GCODE_RESET_VALUESNCK reset values of G groups. Index [14] corresponds to Group 3 (G25).
AlarmAlarm 61816"Axes not on reference point" occurs when axis position deviates from reference point during G27 check.
AlarmAlarm 14800"Channel %1 Set %2 programmed path velocity <= 0" occurs if feedrate F is programmed to 0.
AlarmAlarm 14060"Impermissible skip level" occurs if block skip level is outside /1 to /9.
AlarmAlarm 22280"Programmed run-in path too short" occurs during G33 if run-in distance is insufficient.
AlarmAlarm 16748Tapping speed under G331 exceeds active gear stage limits.
VersionSINUMERIK 802D slSystem parameters MD 10604 and MD 10715 are write-protected and cannot be modified.
Version802D sl vs 840D slG27 is under development on 802D sl, whereas it is fully active and maps to cycle328.spf on 840D sl.

Warning: Because Siemens G25 limits persist after system reset unless configured otherwise, tool crashes can occur during setup if an operator incorrectly assumes the travel boundaries are inactive.

Mitsubishi

Mitsubishi controls ignore G25 for spindle monitoring. Spindle Speed Fluctuation Detection is enabled by G162 and canceled by G163. Parameters such as #1242 and #43071 control the default monitoring settings.

G163 must be programmed in an independent block. Specifying address S targets a specific spindle, while omitting S deactivates monitoring on all spindles modal.

CategoryItem / ValueDescription
Parameter#1242 set14/bit2Configures whether the control outputs Operation Error M01 1105 to the HMI screen.
Parameter#43071 sp_spd_flc_dtc_pDefault monitoring start delay time in seconds (0 to 99.999) when address P is omitted.
Parameter#3105 sutDefault spindle up-to-speed detection width (1 to 100%) when Q is omitted.
Parameter#43072 sp_spd_flc_dtc_rDefault allowable spindle speed fluctuation rate (1 to 100%) when R is omitted.
Parameter#43073 sp_spd_flc_dtc_iDefault allowable spindle speed fluctuation range (0 to 999,999 RPM) when I is omitted.
AlarmOperation Error (M01 1105)Spindle feedback speed deviates beyond R or I limits, sending PLC signal.
AlarmProgram Error (P35)Programmed S, P, Q, R, or I out of range, or target spindle is not mounted.
AlarmProgram Error (P45)Travel or auxiliary command programmed in same block as G162 or G163.
VersionM800V/M80V (vA9+)Supports vibration cutting (G08.5) and cutting reduction, keeping G162/G163 syntax.
VersionMTB specificationsSupports spindle name method (parameter #3077 Sname) instead of number method (1 to 9).

Warning: Deactivating speed monitoring with G163 during high-load cuts eliminates the safety check, allowing feed axes to continue running even if the spindle stalls, causing severe tool breakage.

Brand Comparison

The table below highlights the differences in command functions, monitoring methods, alarm behaviors, and bypass protocols across Fanuc, Siemens, and Mitsubishi systems.

TopicFanucSiemensMitsubishi
Function of G25Spindle Speed Fluctuation Detection OFFLower Working Area / Spindle Speed LimitationNot Used (unrecognized)
Active Commands for Spindle Speed FluctuationG26 (ON), G25 (OFF)— (no source)G162 (ON), G163 (OFF)
Alarm ResponseAutomated safety stops / PLC signalsLimit violation alarms (WALIMON stops motion)Operation Error (M01 1105) does not stop cycle; relies on PLC logic
Auto-Bypass— (no source)— (no source)Automatically bypassed during Tapping, Spindle Orientation, or C-axis mode

Technical Analysis

The functional identity of G25 reveals major architectural differences between the controls. While Fanuc uses G25 as a deactivation code for spindle speed monitoring, Siemens uses it to establish physical axis travel boundaries. Transferring G-code between these systems without modification creates immediate collision hazards: a Fanuc program containing G25 will trigger travel limits on a Siemens machine, while a Siemens program containing G25 will disable spindle monitoring on a Fanuc machine, exposing the turret to a collision if a tool stall occurs.

Mitsubishi controls avoid this command overlap by utilizing G163 and G162 for fluctuation detection. G26, which activates monitoring on Fanuc, is mapped to a tapping retract sequence on Mitsubishi. If a Fanuc program is run on a Mitsubishi CNC, the G26 command will command an immediate retraction, which can drive the cutting tool through raw material and crash the machine.

The response to spindle speed lag also varies. Fanuc registers safety stops, and Siemens halts motion before the coordinate boundaries are breached. Mitsubishi displays an Operation Error (M01 1105) but does not halt the axis feed automatically. The tool path continues until the Machine Tool Builder's PLC logic decides to halt the cycle, making the safety sequence builder-dependent.

Program Examples

The following examples demonstrate how to deactivate spindle speed fluctuation monitoring on Fanuc and Mitsubishi controls, and how to program working area limits on Siemens controls.

Fanuc Example

; Fanuc: G26 ; Activates Spindle Speed Fluctuation Detection to monitor turning
; Fanuc: G01 X100.0 Z-50.0 F0.2 ; Performs linear interpolation while monitoring speed
; Fanuc: G25 ; Deactivates Spindle Speed Fluctuation Detection, returning to clear state

dry run: During dry run verification without a workpiece, the controller executes the G26 block, activating the speed fluctuation watchdog. The tool tip moves along the programmed path under G01 X100.0 Z-50.0 F0.2. Since there is no cutting load, the spindle speed remains stable and no speed lag is detected. Upon reaching the end of the line, the G25 command is read, which deactivates the monitoring mode, clearing the watchdog status. The machine then continues to the next program blocks without monitoring spindle deviations.

Siemens Example

; Siemens: G25 X-80 Z30 ; Sets lower working area limits for the X and Z axes
; Siemens: G26 X80 Z330 ; Sets upper working area limits for the X and Z axes
; Siemens: G25 S300 S2=450 ; Sets the lower speed limit of the master spindle to 300 RPM and spindle 2 to 450 RPM
; Siemens: WALIMON ; Activates the working area limitations set by G25 and G26

dry run: During dry run verification, the controller executes the first two blocks, writing the coordinate values (-80 for X, 30 for Z) and upper limits (80 for X, 330 for Z) directly to the system setting data. The third block sets the minimum speed limits for the master spindle (300 RPM) and spindle 2 (450 RPM). When the WALIMON command is executed, the virtual boundary becomes active. If the programmer commands manual jog or axis movement that drives the tool tip outside the boundaries, the program halts instantly and triggers a working area limit alarm.

Mitsubishi Example

; Mitsubishi: G162 S1 P2.0 Q5 R10 ; Turns ON speed fluctuation detection for spindle 1, with a 2-second start delay, 5% up-to-speed tolerance, and 10% allowable fluctuation rate
; Mitsubishi: S1200 M03 ; Changes the spindle speed to 1200 RPM
; Mitsubishi: G163 S1 ; Turns OFF spindle speed fluctuation detection for spindle 1 modal

dry run: During dry run verification, the G162 block executes, configuring the watchdog parameters for spindle 1, specifying a 2-second start delay, a 5% up-to-speed tolerance, and a 10% fluctuation limit. When the speed is changed to 1200 RPM, the controller temporarily suspends active monitoring to allow the spindle to accelerate. Once the 2-second delay elapses and the speed stabilizes within the 5% window, monitoring is re-established. Finally, G163 S1 deactivates fluctuation detection for spindle 1, allowing the spindle to run without feedback speed monitoring.

Error Analysis

The table below lists the common errors, triggers, and fixes across Fanuc, Siemens, and Mitsubishi systems, including specific alarm codes.

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0010Programming G25 or G26 when the option is disabled or not installed.Cycle halts; alarm message "IMPROPER G-CODE" is displayed on screen.Enable parameter options or remove G25/G26 commands from the code.
FanucAlarm PS0200Commanded spindle speed exceeds maximum gear stage limits, or tapping is programmed under G96.Spindle speed does not reach setpoint; screen displays "ILLEGAL S CODE COMMAND".Modify S code values or deactivate Constant Surface Speed (G96) before tapping.
FanucAlarm PS0202Commanded spindle pulse rate exceeds 32,768 pulses per 4ms or 8ms on the serial spindle unit.Spindle halts immediately; alarm "POSITION LSI OVERFLOW" is displayed.Reduce commanded spindle speed or adjust spindle feedback gear ratio parameters.
SiemensAlarm 61816Running G27 reference check when axis position deviates from the machine zero.Axis motion stops; "Axes not on reference point" alarm is displayed.Perform Homing/Referencing procedure for all axes.
SiemensAlarm 14800Programmed feedrate F is 0 without an active fixed feedrate.Program halts; screen shows "programmed path velocity is less than or equal to zero".Program a non-zero feedrate (e.g., F0.2) in the NC block.
SiemensAlarm 14060Block skip level programmed outside the valid range of /1 to /9.Cycle execution stops; screen shows "Impermissible skip level".Correct the block skip character to be within the valid /1 to /9 range.
SiemensAlarm 22280Run-in or run-out distance is too short for safe acceleration in G33 threading.Axis halts before threading starts; alarm shows "Programmed run-in path too short".Increase the starting point offset to allow sufficient distance for axis acceleration.
SiemensAlarm 16748Commanded tapping speed under G331 exceeds active gear stage limits.Spindle fails to accelerate; cycle stops with alarm 16748.Select the correct gear stage or program a lower spindle speed.
MitsubishiOperation Error (M01 1105)Spindle speed deviates from setpoint beyond allowable fluctuation rate (R) or range (I) under heavy load.Screen displays "M01 1105" or triggers PLC indicator; cycle continues unless PLC halts it.Reduce feedrate, decrease depth of cut, check tool wear, or adjust monitoring tolerances.
MitsubishiProgram Error (P35)Programmed S, P, Q, R, or I arguments exceed input limits, or named spindle is missing.Program fails to start; screen displays "Program Error (P35)".Correct parameter arguments to fit allowed range or specify a valid spindle name/number.
MitsubishiProgram Error (P45)Travel command or auxiliary command programmed in the same block as G162/G163.Cycle halts; screen displays "Program Error (P45)".Place G162/G163 in separate, independent program blocks.

Application Note

A catastrophic hard collision, tool breakage, or a workpiece thrown from the chuck jaws will result if the spindle speed drops under heavy cutting loads while the feed turret continues moving. When spindle speed fluctuation monitoring is disabled, the controller does not verify if the spindle feedback speed matches the programmed setpoint. If the tool encounters hard spots, scale, or experiences a sudden stall, the turret will drive the tool directly into the workpiece or chuck jaws because the feed axes are not halted. This risk is especially severe when using Constant Surface Speed Control (G96), as approaching the centerline will accelerate the spindle without speed checks, risking a workpiece flying out of the chuck jaws.

Similar to how G22 Stored Stroke Limit Check ON and G23 Stored Stroke Limit Check OFF manage physical axis travel envelopes, G25 in Siemens regulates lower working area limitations. Unlike G04 Dwell which pauses axis motion for a programmed duration, the delay time P in G162 only delays the start of monitoring.

Related Command Network

  • G26 (Spindle Speed Fluctuation Detection ON): Activates the electronic watchdog monitoring spindle speed deviations.
  • G92 / G50 (Spindle Maximum Speed Clamp): Establishes a physical speed limit to prevent the chuck from exceeding safe centrifugal force limits.
  • G96 (Constant Surface Speed Control ON): Automatically adjusts spindle RPM based on the tool's radial position on the workpiece.
  • G97 (Constant Surface Speed Control Cancel): Restores constant spindle RPM control, deactivating automatic speed adjustments.
  • WALIMON (Enable Working Area Limits): Activates the virtual boundary coordinate limitations set by G25 and G26 in Siemens controls.

Conclusion

Implementing spindle speed fluctuation detection and understanding when to safely disable it is a core programming discipline. While disabling monitoring prevents false alarms during specialized operations, it removes a critical safety system. Programmers must ensure maximum speed clamps are active and verify cross-brand command compatibility to prevent mechanical collisions.

FAQ

Why would a programmer turn OFF spindle speed fluctuation detection?

Programmers disable speed fluctuation monitoring to prevent false alarms and unwanted cycle interruptions during operations with high torque variation or rapid acceleration. For instance, when executing deep-hole pecking cycles, spindle orientation, or transitioning to C-axis mode, the spindle speed naturally fluctuates. Under these specific conditions, deactivating detection allows the cycle to complete without triggering nuisance alarms. The practical action is to insert G25 (or G163) right before these sections and re-enable G26 (or G162) immediately afterward to restore safety monitoring.

What happens if a G25 command written for a Fanuc controller is executed on a Siemens SINUMERIK control?

Executing a Fanuc G25 command on a Siemens control sets an unintended travel boundary or minimum speed limit instead of turning off speed monitoring. Because Siemens interprets G25 as a lower working area or spindle speed limit, this cross-brand code transfer will trigger unexpected axis travel alarms or lock the spindle speed. The practical action is to inspect and rewrite G-code programs when transferring them between machines, replacing Fanuc G25/G26 commands with the appropriate Siemens WALIMON/WALIMOF and LIMS instructions.

Does Mitsubishi G163 automatically stop the machine if the spindle speed drops?

No, G163 deactivates the monitoring watchdog entirely, meaning the controller will not trigger alarms or stop the machine when the spindle speed drops. Even when monitoring is active under G162, the Mitsubishi control displays Operation Error (M01 1105) but does not stop the cycle automatically; it relies on the Machine Tool Builder's PLC logic to stop the axes. The practical action is to verify the PLC safety logic on your specific machine tool and avoid using G163 during heavy cutting or G96 constant surface speed operations where tool stalls are likely.

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