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.
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
| Feature | Technical Details |
|---|---|
| Command Codes | Fanuc: G25 / Siemens: G25 / Mitsubishi: G163 |
| Modal Group | Fanuc: Group 08 (Lathe), Group 19 (Machining Center) (Modal) / Siemens: Group 03 (Modal) / Mitsubishi: Group 00 (Modal cancel) |
| Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Fanuc No. 3402 Bit 6 (CLR) / Siemens SD 43410 ($SA_WORKAREA_MINUS_ENABLE) / Mitsubishi #43071 (sp_spd_flc_dtc_p) |
| Main Constraint | Siemens 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 / Parameter | System / Brand | Description |
|---|---|---|
| X, Y, Z | Siemens | Lower coordinate limits in the basic coordinate system (BCS) defining the working area. |
| S | Siemens | Minimum spindle speed limit in RPM for the master spindle. |
| S1, S2 | Siemens | Minimum spindle speed limits in RPM for additional spindles. |
| S | Mitsubishi | Target spindle name or number (typically 1 to 9) for deactivation. |
| P | Mitsubishi | Detection start delay time in seconds (programmed with G162). |
| Q | Mitsubishi | Spindle up-to-speed detection width percentage (programmed with G162). |
| R | Mitsubishi | Allowable spindle speed fluctuation rate percentage (programmed with G162). |
| I | Mitsubishi | Allowable 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.
| Category | Item / Value | Description |
|---|---|---|
| Parameter | No. 3402 Bit 6 (CLR) | Restores default clear state G-codes (G25) upon boot or reset when set to 1. |
| Parameter | No. 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). |
| Alarm | Alarm PS0010 | "IMPROPER G-CODE" triggers if G25 or G26 is specified without the monitoring option installed. |
| Alarm | Alarm PS0200 | "ILLEGAL S CODE COMMAND" triggers if commanded speed exceeds gear range or G96 tapping is run. |
| Alarm | Alarm PS0202 | "POSITION LSI OVERFLOW" triggers if serial spindle pulse rate exceeds 32,768 pulses per 4ms or 8ms. |
| Version | Series 30i/31i/32i-B Plus | G25 is Group 08 in Lathe Systems and Group 19 in Machining Center Systems. |
| Version | Multi-spindle configs | G26 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.
| Category | Item / Value | Description |
|---|---|---|
| Parameter | SD 43430 $SA_WORKAREA_LIMIT_MINUS | Axis-specific setting data defining the lower working area limit in BCS. |
| Parameter | SD 43410 $SA_WORKAREA_MINUS_ENABLE | Axis-specific setting data to enable (1) or disable (0) lower working area limit check. |
| Parameter | MD 10604 $MN_WALIM_GEOAX_CHANGE_MODE | Determines if working area limits are kept (1) or cleared (0) during geometry axis switch. |
| Parameter | MD 10710 $MN_PROG_SD_RESET_SAVE_TAB | Determines if programmed G25 setting data limits persist after reset or power-on. |
| Parameter | MD 20150 $MC_GCODE_RESET_VALUES | NCK reset values of G groups. Index [14] corresponds to Group 3 (G25). |
| Alarm | Alarm 61816 | "Axes not on reference point" occurs when axis position deviates from reference point during G27 check. |
| Alarm | Alarm 14800 | "Channel %1 Set %2 programmed path velocity <= 0" occurs if feedrate F is programmed to 0. |
| Alarm | Alarm 14060 | "Impermissible skip level" occurs if block skip level is outside /1 to /9. |
| Alarm | Alarm 22280 | "Programmed run-in path too short" occurs during G33 if run-in distance is insufficient. |
| Alarm | Alarm 16748 | Tapping speed under G331 exceeds active gear stage limits. |
| Version | SINUMERIK 802D sl | System parameters MD 10604 and MD 10715 are write-protected and cannot be modified. |
| Version | 802D sl vs 840D sl | G27 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.
| Category | Item / Value | Description |
|---|---|---|
| Parameter | #1242 set14/bit2 | Configures whether the control outputs Operation Error M01 1105 to the HMI screen. |
| Parameter | #43071 sp_spd_flc_dtc_p | Default monitoring start delay time in seconds (0 to 99.999) when address P is omitted. |
| Parameter | #3105 sut | Default spindle up-to-speed detection width (1 to 100%) when Q is omitted. |
| Parameter | #43072 sp_spd_flc_dtc_r | Default allowable spindle speed fluctuation rate (1 to 100%) when R is omitted. |
| Parameter | #43073 sp_spd_flc_dtc_i | Default allowable spindle speed fluctuation range (0 to 999,999 RPM) when I is omitted. |
| Alarm | Operation Error (M01 1105) | Spindle feedback speed deviates beyond R or I limits, sending PLC signal. |
| Alarm | Program Error (P35) | Programmed S, P, Q, R, or I out of range, or target spindle is not mounted. |
| Alarm | Program Error (P45) | Travel or auxiliary command programmed in same block as G162 or G163. |
| Version | M800V/M80V (vA9+) | Supports vibration cutting (G08.5) and cutting reduction, keeping G162/G163 syntax. |
| Version | MTB specifications | Supports 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.
| Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Function of G25 | Spindle Speed Fluctuation Detection OFF | Lower Working Area / Spindle Speed Limitation | Not Used (unrecognized) |
| Active Commands for Spindle Speed Fluctuation | G26 (ON), G25 (OFF) | — (no source) | G162 (ON), G163 (OFF) |
| Alarm Response | Automated safety stops / PLC signals | Limit 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 statedry 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 G26dry 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 modaldry 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.
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | Alarm PS0010 | Programming 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. |
| Fanuc | Alarm PS0200 | Commanded 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. |
| Fanuc | Alarm PS0202 | Commanded 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. |
| Siemens | Alarm 61816 | Running 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. |
| Siemens | Alarm 14800 | Programmed 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. |
| Siemens | Alarm 14060 | Block 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. |
| Siemens | Alarm 22280 | Run-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. |
| Siemens | Alarm 16748 | Commanded 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. |
| Mitsubishi | Operation 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. |
| Mitsubishi | Program 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. |
| Mitsubishi | Program 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.

- 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
G73 High-Speed Peck Drilling Cycle: The CNC Milling Guide
Optimize CNC milling operations with the G73 high-speed peck drilling cycle. Compare Fanuc, Siemens, and Mitsubishi parameters, alarms, and syntax.
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.