Skip to main content
CNC.wiki

G25 Lower Working Area and Spindle Speed Limit: Siemens CNC

Master G25 lower working area and spindle speed limits on Siemens SINUMERIK controls. Avoid chuck collisions and configure safety parameter SD 43430.

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

CNC CARE Co-founder

Introduction

A catastrophic hard collision, destroyed tooling, a scrap part, or damaged spindle bearings can occur if a CNC programmer fails to establish virtual axis travel limits or minimum spindle speed restrictions. When a turret carries a tool too far in the negative direction, it can crash directly into the chuck or workpiece clamping structure, bypassing mechanical hardware limit switches if they are misaligned or failed. On Siemens SINUMERIK controls, G25 serves as the critical safety envelope defining either a Lower Working Area Limitation or a Lower Spindle Speed Limitation. Without these boundary parameters configured and activated via WALIMON, the controller will not interrupt automatic motion or manual jogging before a physical crash occurs.

Technical Summary

FeatureTechnical Details
Command CodeG25
Modal GroupGroup 03 (Modal)
BrandsSiemens
Critical ParametersSD 43430 $SA_WORKAREA_LIMIT_MINUS, SD 43410 $SA_WORKAREA_MINUS_ENABLE
Main ConstraintMust be programmed in a separate NC block; coordinates apply to the basic coordinate system (BCS).

Quick Read

  • G25 establishes a virtual boundary in Siemens controls to restrict the traversing range of axes and define minimum spindle speed limits.
  • When G25 is used for lower working area limitation, the command must be programmed in a separate NC block in the basic coordinate system (BCS).
  • Working area limitations set by G25 must be explicitly activated by executing the WALIMON command.
  • Siemens controls allow programmers to define up to three independent spindle speed limits (S, S1, S2) within a single G25 block.
  • The axis-specific setting data SD 43410 ($SA_WORKAREA_MINUS_ENABLE) activates or deactivates the working area limitation in the negative direction.
  • Unlike Fanuc controls which use G25 to disable spindle speed fluctuation monitoring, Siemens uses G25 strictly for physical coordinate and speed limits.
  • On SINUMERIK 802D sl controls, critical safety parameters like MD 10604 are write-protected and cannot be modified.

Basic Concepts

Establishing programmatic lower working area limits with G25 has a vital practical programming effect on machine safety and collision avoidance. By defining a virtual boundary, the programmer can restrict the traversing range of the axes in addition to physical hardware limit switches. This serves to protect the turret, workpiece, and other sensitive surrounding equipment (such as measuring stations) from physical damage.

When the working area limitation is active (via WALIMON), any manual jog or automatic program command that attempts to position the tool tip outside the specified G25/G26 coordinates will cause the program to stop executing immediately. This prevents a catastrophic hard collision where the turret or cutting tool crashes into the chuck or other workpiece clamping structures, which would otherwise result in a scrap part, broken tooling, or damaged spindle bearings.

Spindle speed limits under G25 operate as safety thresholds to prevent the spindle from running below a minimum speed. This is particularly crucial during constant surface speed control (G96), where the control automatically accelerates the spindle as the tool nose on the turret approaches the workpiece center (X0) to maintain a constant cutting rate. G25 ensures the spindle does not drop below required torque speeds, whereas G26 and LIMS establish the upper safety clamps to prevent the spindle from reaching speeds that exceed the chuck's mechanical holding capacity.

Command Structure

The command structure of G25 on Siemens controls differs based on whether it is used to restrict axis travel limits or clamp spindle speed. When defining a working area limitation, G25 is followed by the coordinates of the target axes, such as X and Z. Coordinate limits must be programmed in their own dedicated NC block without any motion commands.

When G25 is used to define spindle speed limits, the command accepts speed arguments for one or more spindles. Siemens allows up to three spindle speed limitations to be configured simultaneously in a single G25 block. This multi-spindle capability is useful for multi-axis machines or machines with sub-spindles, ensuring that each spindle maintains its required minimum operational speed.

Command Syntax

  • Lower Working Area Limitation: G25 X... Y... Z...;
  • Lower Spindle Speed Limitation: G25 S... S1=... S2=...;

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.
SD 43430 $SA_WORKAREA_LIMIT_MINUSSiemensAxis-specific setting data that defines the lower working area limitation minus.
SD 43410 $SA_WORKAREA_MINUS_ENABLESiemensAxis-specific setting data that activates (1) or deactivates (0) the working area limitation in the negative direction.
MD 10604 $MN_WALIM_GEOAX_CHANGE_MODESiemensDetermines whether an active working area limitation is retained (1) or deactivated (0) during a geometry axis interchange.
MD 10710 $MN_PROG_SD_RESET_SAVE_TABSiemensUsed to determine whether the values written by the parts program into the setting data remain effective after a control RESET or power cycle.
MD 20150 $MC_GCODE_RESET_VALUESSiemensNCK reset position of G groups, including Group 03, which sets the default G-code state upon boot-up or reset.

Brand Applications

Siemens

In Siemens controls, 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, while SD 43410 activates or deactivates the working area limitation in the negative direction. Under constant surface speed control (G96), minimum spindle speed values under G25 can be assigned between 0.1 rpm and 99999999.9 rpm.

Programming G25 with coordinate axes must occur in a separate block. The virtual boundaries set by G25 must be enabled by executing WALIMON. Performing a geometry axis switchover without verifying MD 10604 can result in the active G25 working area limitation being deactivated silently, leaving the machine vulnerable to a tool stall and turret crash.

Warning: Because Siemens G25 coordinate limits persist after program reset unless MD 10710 is configured to clear them, tool crashes can occur during setup if an operator incorrectly assumes the travel boundaries are inactive.

Brand Comparison

The table below highlights the differences in command modifiability, feedrate options, and reference check support across different Siemens SINUMERIK controller versions.

TopicSINUMERIK 840D slSINUMERIK 828DSINUMERIK 802D sl / 808D
Parameter Modifiability (MD 10604)Fully modifiable and programmableFully modifiable and programmableWrite-protected (cannot be modified)
G93 Inverse-Time FeedrateFully supportedFully supportedNot implemented (uses standard feedrates)
G27 Referencing Check / Axis LimitsFully active and maps to cycle328.spfFully active and mappedUnder development or restricted, not fully active

Technical Analysis

The functional behavior of G25 on Siemens controls differs significantly across controller models. On advanced platforms like the SINUMERIK 840D sl and 828D, programmers have full read and write access to machine parameters like MD 10604, which determines how working area limits behave during a geometry axis interchange. By setting this to 1, the limit is safely retained, preventing tool crashes when switching coordinates. On lower-end systems like the SINUMERIK 802D sl, this parameter is write-protected, forcing programmers to manually re-program and re-verify G25 boundaries after axis swaps.

Version differences extend to feedrate types and reference checks. While the SINUMERIK 840D sl fully implements G93 inverse-time feedrate for complex multi-axis contours, the 802D series lacks G93 support entirely. Similarly, referencing checks via G27—which verify if axes lie exactly on the machine reference point—are fully active on the 840D sl (mapping to internal cycles like cycle328.spf), whereas G27 is restricted or under development on the 802D sl. These discrepancies mean programs using advanced motion and boundary checks must be carefully audited when ported to entry-level SINUMERIK controllers.

Program Examples

The following example demonstrates how to program lower working area limits and minimum spindle speed limits on Siemens controls, followed by activation and deactivation blocks.

; Siemens: N10 G25 X-80 Z30 ; Sets lower working area limits for the X and Z axes
; Siemens: N20 G26 X80 Z330 ; Sets upper working area limits for the X and Z axes
; Siemens: N30 G25 S300 S2=450 ; Sets the lower speed limit of the master spindle to 300 RPM and spindle 2 to 450 RPM
; Siemens: N40 WALIMON ; Activates the working area limitations set by G25 and G26
; Siemens: N50 G01 X50 Z100 F0.2 ; Moves tool inside the safe envelope
; Siemens: N60 WALIMOF ; Temporarily deactivates the limits for tool change or setup

dry run: During dry run verification without a workpiece, 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.

Error Analysis

The table below lists the common errors, triggers, and fixes related to Siemens controls under G25 configuration.

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
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 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.

Application Note

A catastrophic hard collision, destroyed tooling, a scrap part, or damaged spindle bearings will occur if the operator attempts manual jog or automatic movements outside the physical boundaries without active boundary validation. Programmers must enforce virtual limits using G25 and G26 and activate them using WALIMON to restrict axis travel. Under constant surface speed control (G96), the spindle automatically accelerates as the tool tip on the turret approaches the workpiece center (X0). If the programmer fails to configure a maximum spindle speed clamp using G26 or LIMS, the extreme rotation speed can exceed the chuck jaws' holding capacity, throwing the workpiece out and causing severe tooling damage.

Similar to how stored stroke limit check on (G22) and stored stroke limit check off (G23) manage virtual coordinate boundaries in Fanuc, G25 in Siemens regulates lower working area limitations. Additionally, while other controls map G25 to spindle speed fluctuation detection, Siemens controls dedicate G25 entirely to axis and spindle travel clamps.

Related Command Network

  • G26 (Upper Limit): Sets upper working area limitation coordinates and upper spindle speed limitations.
  • WALIMON (Working Area Limit ON): Universally enables the working area limitation for all validated axes.
  • WALIMOF (Working Area Limit OFF): Deactivates the working area limitation for all validated axes.
  • LIMS (Spindle Speed Clamp): Programs a maximum spindle speed limit for the master spindle under Constant Surface Speed (G96).
  • G96 (Constant Surface Speed): Activates constant surface speed control, which dynamically increases spindle speed as the cutting diameter decreases.

Conclusion

Configuring G25 lower working area and spindle speed limits is a fundamental safety practice for Siemens CNC programming. Properly defining these virtual boundaries prevents tool collisions and spindle overspeeds during heavy operations. Operators should audit active setting data and verify parameter states before executing programs to guarantee safety features remain functional.

FAQ

How does G25 differ between Siemens and Fanuc controls?

Siemens uses G25 to define a lower working area limit or a minimum spindle speed limit, whereas Fanuc uses G25 to disable spindle speed fluctuation monitoring. Executing a Fanuc G-code program with G25 on a Siemens machine will set coordinate limits instead of turning off monitoring. The practical action is to convert Fanuc G25 commands to Siemens WALIMON/WALIMOF or LIMS instructions.

Why must the G25 working area limit be programmed in a separate block?

Siemens SINUMERIK controllers require G25 coordinate limits to be set independently of tool path movements to update the setting data before any motion begins. Programming G25 in the same block as a motion command like G01 will trigger a syntax or parsing error. The practical action is to write G25 X... Z... in its own NC block before any tool positioning or cutting commands.

What happens to G25 limits when a geometry axis interchange is executed?

The behavior of G25 limits during an axis switchover depends on machine parameter MD 10604. If set to default (0), the working area limits are automatically deactivated, creating a collision risk during the interchange. The practical action is to set MD 10604 to 1 so limits are retained, or explicitly reprogram G25 after the axis interchange.

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