Siemens Gear Ratio Parameters MD31050 & MD31060 Tuning Guide
Configure Siemens gear ratio parameters MD31050 and MD31060. Resolve Alarm 25220, Alarm 149, and Alarm 26003 on SINUMERIK CNC and SIMODRIVE drive modules.
Introduction to Siemens Gear Ratio and Axis Parameters
A sudden, catastrophic tool plunge or hard collision that smashes a cutting tool directly into a workholding vise jaw, a heavy clamp, or a double turret arrangement during multi-channel machining is the direct consequence of a kinematic synchronization loss. When a modulo axis with an absolute encoder and uneven gear factors undergoes a power-down sequence, the control must automatically save the axis position before the DC link voltage decays. If data transmission errors occur or if the hardware fails to maintain the DC link voltage long enough to complete this backup, the actual position value becomes corrupted. Upon subsequent power-up, the controller's spatial positioning becomes incorrect, which can cause a tool to crash during a rigid tapping cycle without a compensating chuck, leaving a ruined scrap part and causing extensive drive train damage.
Technical Summary
| Command Code | MD31050, MD31060 |
| Modal Group / Area | Machine Data (Axis-specific) |
| Supported Brand | Siemens |
| Critical Parameters | MD31060 $MA_DRIVE_AX_RATIO_NUMERA[n], MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] |
| Main Constraint | MD31050 cannot be set to 0. Safe retraction path via ESR is strictly dependent on constant gear ratio; no changes allowed during active ESR. Modulo axis positioning with absolute encoder requires sufficient DC link voltage during power-down to save position values under uneven gear factors. |
Quick Read
- Configure axis gear ratios using MD31060 (numerator) and MD31050 (denominator) to define the exact mathematical ratio between motor revolutions and physical load.
- Prevent division-by-zero errors by ensuring MD31050 is set to a value from 1 to 2,147,000,000.
- Avoid changing gear ratio parameter sets while position control is active or during safety-critical Extended Stop and Retract (ESR) routines to prevent Alarm 25220.
- Meticulously monitor DC link voltage during power-down sequences when using uneven gear factors on modulo axes to avoid Alarm 149.
- Use the executable command NEWCONF to immediately activate modified gear ratio machine data without requiring a full controller reboot.
- Meticulously check ballscrew pitch MD31030 to ensure it is not set to zero when establishing gear ratios to avoid Alarm 26003.
Basic Concepts
The practical programming effect of configuring Siemens gear ratio parameters (MD31050 and MD31060) is the establishment of the exact mathematical ratio between the motor's revolution and the physical load. This defines the ratio of the control-internal computational resolution to the actual-value resolution, indicating exactly how precisely calculated position setpoints can be implemented on the machine. By utilizing up to six parameter sets (indices 0 through 5), developers can dynamically transition the load gear numerators and denominators via PLC to adapt to entirely different mechanical transmission states on the fly without rebooting the controller. This core configuration resides within the Siemens machine data structure.
Programmers and operators must meticulously watch for power-down sequences when using uneven gear factors on modulo axes with absolute encoders. The actual position must be automatically saved when the DC link voltage decreases; if the hardware configuration does not provide enough time for this save, the assumed position will be completely incorrect upon the next power-up. This persistent storage differs from transient parameters configured through the setting data structure, which do not survive a controller restart. Proper gear ratio setup is also critical to synchronize axis feedback with the position control loop, ensuring correct operation of the position loop gain Kv setting.
Command Structure
Siemens structures its axis-specific gear ratio definitions using paired machine data parameters. These parameters represent the load gearbox numerator and denominator, which are organized in indices corresponding to parameter sets. This allows axis-specific array addressing for each individual axis on the machine.
Accessing and updating these parameters is typically done using direct system variables in the control. By writing to these system variables, programmers can change values in the NCK memory. The changes are immediately processed by the system once they are committed.
Format of Address Syntax
$MA_DRIVE_AX_RATIO_NUMERA[n, <axis>]
$MA_DRIVE_AX_RATIO_DENOM[n, <axis>]
Key Parameters
| Parameter Address | Description | Value Range / Settings |
|---|---|---|
MD31060 $MA_DRIVE_AX_RATIO_NUMERA[n] | Numerator of the load gearbox (index n from 0 to 5) | DWORD, -2,147,000,000 to 2,147,000,000 |
MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] | Denominator of the load gearbox (index n from 0 to 5) | DWORD, 1 to 2,147,000,000 |
MD31064 / MD31066 | Denominator and numerator of intermediate gearbox | — (no source) |
MD31070 / MD31080 | Denominator and numerator of measuring gearbox | — (no source) |
Brand Applications
Siemens
Siemens provides advanced control loop flexibility by allowing direct, alphanumeric machine data addressing. Instead of forcing a single, lumped gear ratio, programmers can independently parameterize different stages of the mechanical power train. This granular structure includes the Load Gearbox, an Intermediate Gearbox, and a Measuring Gearbox, allowing exact mathematical modeling of complex physical tool offsets. The core variables are managed within the axis-specific machine data structure.
To handle dynamic manufacturing conditions, the Siemens position control architecture supports up to six independent parameter sets (indices 0 to 5) for each axis. The PLC interface bits (DB31, ... DBX9.0 - DBX9.2) allow the control to dynamically switch parameter sets on the fly. This enables the machine to transition between completely different mechanical gear mappings mid-program in response to spindle gear stage selection commands (M40 to M45) without needing to parse external macro calculations. Changes are applied using the executable command NEWCONF in the program, activating updated gear ratio machine data without requiring a system restart. This is more permanent than changes made to transient values in the setting data structure. These gear settings must align with other control tuning, such as the position loop gain Kv setting, to maintain contour accuracy.
Siemens protects its mechanical safety routines by locking the gear parameters during Extended Stop and Retract (ESR). If the controller detects an attempt to modify the gear ratio parameter set while ESR is active, it actively suppresses the change and throws Alarm 25220, ensuring the hardware always retains a mathematically flawless retraction path during a sudden power outage.
Brand Comparison
| Siemens Controller / Drive Series | Parameterization Method | Gear Ratio Support | Key Alarm / Safety Check |
|---|---|---|---|
| SINUMERIK 840D sl / 828D | NC-level parameters: MD31060 $MA_DRIVE_AX_RATIO_NUMERA[n] and MD31050 $MA_DRIVE_AX_RATIO_DENOM[n] | Supports Load, Intermediate, and Measuring gearbox stages with up to 6 parameter sets (indices 0 to 5) switchable via PLC. | Suppresses changes during active ESR, triggering Alarm 25220. Triggers Alarm 26003 if ball screw pitch is set to zero. |
| SIMODRIVE 611 universal (SW 8.1+) | Drive-level software parameter settings | Allows selection of arbitrary gearbox ratios, eliminating legacy restrictions. | — (no source) |
| SIMODRIVE 611 universal (SW 10.2+) | Drive-level software parameter settings | Actively monitors uneven gear factors on endlessly rotating absolute axes. | Fault 149 / Alarm 149 (triggered if position cannot be saved during power-down due to low DC link voltage). |
Technical Analysis
The division in parameterization across Siemens drive and control series reveals distinct engineering priorities for different classes of hardware and software versions. Advanced Solution Line systems (SINUMERIK 840D sl and 828D) leverage the full NCK machine data architecture. This configuration enables the control to access up to six different parameter sets dynamically and splits the mechanical power train into highly granular, individually configurable stages. In contrast, the SIMODRIVE 611 universal series isolates parameterization at the drive level, which limits real-time switching capability but offers specific drive-level behaviors depending on the software version.
For SIMODRIVE 611 universal SW 8.1+, the introduction of arbitrary gearbox ratios resolved legacy restrictions, eliminating legacy Fault 139. However, in SW 10.2+, the monitoring of uneven gear factors on absolute modulo axes introduced a strict dependency on DC link voltage. If a power-down sequence occurs and the DC link voltage decays too fast, the drive cannot save the position values, resulting in Fault 149. The Solution Line further integrates this with safety locking, suppressing parameter set changes during active ESR safety retraction to prevent a hard collision.
Program Examples
; Siemens Gear Ratio Parameter Adjustment
$MA_DRIVE_AX_RATIO_NUMERA[0, AX1] = 5 ; Set parameter set 0 load gearbox numerator for AX1 to 5
$MA_DRIVE_AX_RATIO_DENOM[0, AX1] = 3 ; Set parameter set 0 load gearbox denominator for AX1 to 3
NEWCONF ; Apply and activate changed machine data
M30 ; End of program
dry run Analysis
Executing a dry run of this program checks the following execution sequence:
- The controller reads the first G-code block and writes a gear ratio numerator value of 5 to the first parameter set (index 0) of the AX1 axis in MD31060.
- The controller reads the second block and writes a gear ratio denominator value of 3 to the first parameter set (index 0) of the AX1 axis in MD31050.
- The
NEWCONFcommand executes, immediately applying and activating the new machine data configuration in the NC memory without requiring a full control reboot. - The program reaches the M30 command, ending the cycle and resetting the active states.
Error Analysis
| Brand | Alarm Code / Diagnostic | Trigger Condition | Operator Symptom | Root Cause & Corrective Action |
|---|---|---|---|---|
| Siemens | Alarm 25220 | Gear ratio is changed (e.g., parameter set change) between ESRR programming and ESR enable, or during active ESR. | NCK halts axis movement, aborts execution, and displays "Axis %1 gear ratio changed with ESR enabled" alarm. | Check active ESR state, prevent gear ratio changes during safety retraction. Verify PLC switching logic (DB31, ... DBX9.0 - DBX9.2). |
| Siemens | Alarm 149 | Data transmission errors or DC link voltage drops during power-down when uneven gear factors are active on modulo rotary axes. | Absolute position loss on reboot, drive displays Fault 149 / Alarm 149. | Ensure DC link voltage is maintained long enough to save position values. Check capacitor modules. |
| Siemens | Alarm 26003 | Pitch of leadscrew (MD31030) is set to zero while establishing gear ratios. | Control halts with parameterization error. | Verify and set correct leadscrew pitch in MD31030 before attempting to establish gear ratios. |
Application Note
A devastating hard collision that smashes a cutting tool directly into a workholding vise jaw, a heavy clamp, or a double turret arrangement during multi-channel machining is the direct consequence of a kinematic synchronization loss caused by unauthorized gear ratio changes. When a modulo axis with an absolute encoder and uneven gear factors undergoes a power-down sequence, the control must automatically save the axis position before the DC link voltage decays. If data transmission errors occur or if the hardware fails to maintain the DC link voltage long enough to complete this backup, the actual position value becomes corrupted. Upon subsequent power-up, the controller's spatial positioning becomes incorrect, which can cause a tool to crash during a rigid tapping cycle without a compensating chuck, leaving a ruined scrap part. To prevent this, programmers must lock gear stage configurations during safety-critical retraction routines and ensure that the power supply configuration maintains DC link voltage long enough for automatic position backup.
Related Command Network
- NEWCONF: Executable command used to immediately activate modified gear ratio machine data without requiring NCK reset.
- ESRR / ESR: Extended Stop and Retract commands, which strictly monitor the active gear ratio to ensure safe retraction path generation.
- M40 to M45: Spindle commands used for automatic or specific gear stage selection and parameter set switching.
- MD31030: Defines the leadscrew pitch which must be non-zero to prevent Alarm 26003 when establishing gear ratios.
Conclusion
Process reliability in Siemens servo systems depends on aligning the load gear ratio parameters with the mechanical design of the axis. Properly configuring MD31060 and MD31050, managing parameter sets for dynamic gear shifts, and verifying absolute encoder voltage persistence during power-down avoids position corruption. Implementing the NEWCONF command ensures that changes take effect immediately, preserving system safety and preventing mechanical collisions during operation.
Frequently Asked Questions
How does a sudden DC link voltage drop cause Alarm 149 on Siemens modulo axes?
When modulo rotary axes use uneven gear factors with absolute encoders, the control must write the actual position to non-volatile memory during power-down. If the DC link voltage drops too quickly, this write operation fails, resulting in a corrupted position on reboot and triggering Alarm 149. Action: Check the drive's capacitor modules and ensure the DC link voltage persists long enough to finalize position backup.
Why does the Siemens controller trigger Alarm 25220 when switching parameter sets?
Alarm 25220 is safety-critical and occurs when a gear ratio change is requested after Extended Stop and Retract (ESR) has been enabled or during retraction. Because ESR relies on a fixed gear ratio to compute a safe retraction path, the NCK locks the parameters. Action: Modify the PLC logic to ensure that parameter set switching (DB31, ... DBX9.0 - DBX9.2) is suppressed when ESR is active.
What causes Alarm 26003 when configuring Siemens gear ratios?
Alarm 26003 occurs because the pitch of the associated leadscrew (MD31030) is set to zero, making it impossible for the controller to calculate the axis resolution using the configured gear ratios. Action: Access the axis machine data, locate MD31030, and enter the correct, non-zero ballscrew pitch (e.g., in mm) before running NEWCONF.
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
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.
G27 Reference Position Return Check: CNC Guide for Multi-Brand Systems
Master the CNC G27 reference position return check on Fanuc, Siemens, and Mitsubishi controls. Learn parameters like MD 34100 and fix Alarm 61816.
Siemens SINUMERIK G26 Upper Working Area & Spindle Speed Limit
Master the Siemens SINUMERIK G26 command for upper working area and spindle speed limits. Learn syntax, parameters like SD 43420, and alarms to avoid crashes.
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.