Skip to main content
CNC.wiki

Understanding Siemens Machine Data (MD) Structure

Learn how the Siemens Machine Data (MD) structure controls SRAM, kinematic limits, and axis parameters. Prevent hard crashes and data loss on SINUMERIK CNCs.

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

CNC CARE Co-founder

Introduction to Siemens Machine Data and Production Risks

Altering Siemens Machine Data without a validated setup archive flags the controller for a total memory reorganization upon the next reboot. When the NCK restarts, it automatically flushes the buffered SRAM, erasing all tool offsets, custom variables, and active zero points. An operator executing a legacy part program post-reorganization will witness the spindle plunge directly into a vise jaw, strike a compensating chuck, or collide with a workholding clamp. This mechanical disorientation results in a destructive hard collision, a ruined scrap part, and triggers critical system faults like turret motor overload (Alarm 700022) or tool clamping timeouts (Alarm 700011).

Technical Summary of Machine Data Configuration

Command / Code GroupModal Group / AreaSupported BrandCritical ParametersSystem Constraint
Machine Data (MD)System Configuration / Setting DataSiemensMD18086, MD20150, MD10712Access is protected by 4 data classes and a 7-tier keyswitch/password system. Modifying memory parameters triggers SRAM erasure on reboot.

Quick Read: Key Rules and Constraints

  • Always back up the current machine configuration to a USB or CF card before changing any Machine Data.
  • Understand that modifying SRAM-allocating parameters like MD18086 forces a total memory wipe upon the next power cycle.
  • Ensure alphanumeric assignments inside part programs use the proper dollar sign prefix ($) and matching indices in square brackets.
  • Use the CHANDATA command to target channel-specific parameters dynamically without requiring cross-channel handshake macros.
  • Verify that all machine data array indices are written in strictly ascending order to prevent interpreter halts.
  • Restore external setup archives immediately after a memory reorganization to re-establish spatial and axis compensations.

Basic Concepts of SINUMERIK Machine Data

The practical programming effect of Siemens' Machine Data structure grants engineers, OEMs, and end-users unparalleled, granular access to dynamically dictate the kinematic limits, memory sizing, and modal states of the controller directly from the NC part program. Because machine data fundamentally configures the buffered SRAM (which holds tool offsets, part programs, protection zones, and custom user variables), operators are given total authority over the system's foundational behavior. However, programmers and operators must vigilantly manage memory-reconfiguring parameters. Altering specific machine data flags the system for a total memory reorganization at the next power-up. What programmers must watch for is that if an original status archive backup is not performed prior to this reset, the machine will suffer total spatial and mechanical disorientation upon reboot, flushing all essential variables.

A critical common failure cause emerges if the controller subsequently attempts to execute a legacy part program after its tool offsets, settable frames, working area limits, and leadscrew error compensations have been wiped out by an unbacked-up memory reorganization. Deprived of this kinematic awareness, the tool may unpredictably plunge straight into a vise jaw, collide with a rigid compensating chuck, strike a holding clamp, or crash into the opposing mechanics of a turret during double turret processing. This invariably results in a devastating hard collision, a severely ruined scrap part, and generates a critical alarm code (such as 4400 or 6020) that forces the system into an NC stop, or triggers PLC hardware faults like a tool clamping timeout (Alarm 700011) or a turret motor overload (Alarm 700022). Safe use strictly dictates navigating to the system data operating area to create an external setup archive to a USB or CF card before modifying any memory-dependent MD limits.

Command Structure, Address Syntax, and Access Classes

Siemens organizes and addresses Machine Data (MD) and Setting Data (SD) using a highly structured, alphanumeric format prefixed with a dollar sign ($). The naming convention relies on subsequent letters to define the exact data area. Specifically, general machine data parameters are prefixed with $MN_, channel-specific data with $MC_, axis-specific data with $MA_, and drive-specific configurations with $MD_. Display and setting data utilize similar prefix codes like $MM_, $SN_, $SC_, and $SA_.

Parameters can be addressed directly in the part program and can utilize the axis name or array position as an index, programmed within square brackets. Access is strictly governed by four distinct Data Classes mapped directly to a 7-tier keyswitch and password protection hierarchy. These classes prevent unauthorized operators from corrupting core machine kinematics while granting access to edit user-level setting data.

  • System (S): Protection level 0. Reserved for control manufacturers.
  • Manufacturer (M): Protection levels 1 and 2. For machine tool builders (OEMs).
  • Individual (I): Protection levels 1, 2, or 3. For maintenance personnel.
  • User (U): Protection levels 3, 4, and 7. For operators and programmers.

Brand Applications

Siemens

Siemens natively allows high-level, explicit alphanumeric addressing of Machine Data directly inside the standard part program using the $ prefix. Unlike other controls that obfuscate machine parameters behind cryptic numbered macro variables or strictly require offline PLC ladder modifications, Siemens provides fully self-documenting syntax accessible right in the G-code editor. Second, Siemens provides a dedicated CHANDATA command that seamlessly directs MD assignments to specific, isolated machining channels on the fly. This permits a single master program to dynamically overwrite axis configurations or channel names across entirely different mechanical paths without requiring complex cross-channel handshake macros. Third, Siemens rigorously partitions all configuration data into four strict data classes (System, Manufacturer, Individual, and User) mapped directly to a 7-tier keyswitch and password protection hierarchy. This completely prevents operators from accidentally corrupting core machine kinematics while granting them open, safe access to edit their own user-level setting data.

  • MD18086 $MN_MM_NUM_MAGAZINE_LOCATION: Defines the maximum tool magazine locations managed by the NCK in SRAM. Maximum value of up to 600 locations as a DWORD data type.
  • MD20150 $MC_GCODE_RESET_VALUES: Array of byte values defining default active G-codes after reset.
  • MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB: Array of strings to rename or reconfigure NC keywords.

Siemens Control Model and Version Comparison

Control Model / VersionTool Magazine Locations (MD18086)Axis-Specific Addressing SyntaxMemory Reorganization and SRAM Allocation
SINUMERIK 828D (me41 / te41)Default limit of 84 locations$MA_JOG_VELO[axis_name] supported directly in part programs.Fixed SRAM allocation based on hardware model; limited customization.
SINUMERIK 828D (me81 / te81)Default limit of 260 locations$MA_JOG_VELO[axis_name] supported directly in part programs.Expanded SRAM capacity allowing higher locations up to 260.
SINUMERIK 840D / 840D slCustomizable up to 600 locations$MA_JOG_VELO[axis_name] supported directly in part programs.Fully dynamic SRAM allocation customizable via DWORD machine data.

Technical Analysis of Machine Data Modality

The SINUMERIK control platform's Machine Data architecture is partitioned into global (general), channel-specific, axis-specific, and drive-specific variables. This segmentation ensures that kinematic modifications do not cross critical boundaries unless explicitly designated. For instance, modifying axis velocity with $MA_JOG_VELO[Y1] limits the modification to the Y1 axis. This is analytically superior to global parameters because it prevents other axes in the same channel from inheriting unintended feedrates.

Furthermore, hardware control architecture limitations between the SINUMERIK 828D series and the high-end 840D series dictate memory capacities. Basic models (me41/te41) limit tool locations to 84, whereas advanced hardware variants (me81/te81) allow up to 260. The 840D series extends this limit to a maximum of 600. When these limits are changed via MD18086, the NCK flags the SRAM memory. On reboot, the interpreter executes a memory reorganization. Without a prior archive dump, the control cannot reference the previous tool and coordinate frames, causing immediate axis misalignment.

Program Examples for Siemens CNC systems

The following example demonstrates how to dynamically reconfigure axis velocity and channel names inside a Siemens CNC part program. It also utilizes the CHANDATA command to direct configurations to specific channels.

; Siemens Machine Data Modification Example
CHANDATA(1)                          ; Assign subsequent channel-specific MD commands to Channel 1
$MC_CHAN_NAME='CHAN1'                 ; Rename the active channel identifier to CHAN1
$MA_JOG_VELO[Y1]=2000                 ; Set JOG mode velocity for Y1 axis to 2000 mm/min
$MA_FIX_POINT_POS[0,X1]=500.000       ; Set the first fixed point position for the X1 axis to 500.000 mm
NEWCONF                               ; Apply and activate modified machine data immediately
M30                                   ; End of program

dry run Analysis

Executing a dry run of this program checks the following execution sequence:

  1. The control reads the CHANDATA(1) command and targets Channel 1 for subsequent parameters.
  2. The channel name is modified to 'CHAN1' via $MC_CHAN_NAME.
  3. The controller assigns 2000 mm/min to the JOG velocity of the Y1 axis via $MA_JOG_VELO[Y1].
  4. The first reference/fixed point of the X1 axis is redefined to 500.000 mm.
  5. The NEWCONF instruction executes, applying the setting updates on the fly without triggering an NCK reboot or interpreter stop.
  6. The program ends cleanly with M30. No SRAM reorganization alarms are triggered since these specific parameters do not reallocate SRAM locations.

Error Analysis and System Alarms

Alarm CodeTrigger ConditionOperator SymptomRoot Cause / Corrective Fix
Alarm 4400Modifying an SRAM-configuring machine data parameter (e.g., MD18086).NCK displays "MD alteration will cause reorganization of buffered memory... (loss of data!)" on reboot. All tool data, programs, and GUDs are deleted.The control reorganized the buffered memory. Restore the system data from an external USB or CF setup archive.
Alarm 4050Attempting to rename an NC code to a new identifier that lies in another type range using MD10712.NCK displays "NC code identifier %1 cannot be reconfigured to %2" and halts program loading.The new identifier belongs to another G-code group. Correct the reconfiguration range in the machine data.
Alarm 4310Writing machine data array values out of ascending order.NCK displays "Declaration in MD %1 index %2 is not allowed" and halts the interpreter immediately.Array indices were programmed non-sequentially. Rewrite the array index inputs in strictly ascending order.

Application Note: Safeguarding SRAM During Memory Reconfiguration

Plunging a tool straight into a vise jaw or colliding with a rigid compensating chuck is the direct consequence of executing a program after altering memory-dependent parameters without a prior archive. Because modifying parameters like MD18086 reallocates memory partitions inside the SRAM, the NCK must execute a full memory reorganization upon reboot. Safe operation requires navigating to the system data operating area to create an external setup archive to a USB or CF card. After the reboot completes and Alarm 4400 clears, this backup must be immediately reloaded to restore coordinate frames, tool offsets, and leadscrew compensations before any axis movements are executed.

Related Command Network

  • CHANDATA: Identifies and assigns subsequent channel-specific machine data commands to a specified channel path.
  • NEWCONF: Activates modified machine data values immediately without requiring a full system reboot or NCK power cycle.
  • R-Parameter Programming: Manipulates user-defined variables that, unlike machine data, do not trigger memory reorganizations or Alarm 4400.
  • G65 Macro Argument Assignment: Implements local parameter passing for custom cycles without changing global NCK machine parameters.
  • Sin Cos Sqrt Macro Arithmetic: Calculates coordinates dynamically to prevent hard limit overtravels governed by axis-specific Machine Data.

Conclusion: Best Practices for Machine Data Management

Managing Siemens Machine Data requires a strict protocol of backing up configuration states, verifying parameter index ordering, and validating access credentials. Never modify memory-dependent parameters during active production runs. By verifying syntax and maintaining updated setup archives, machine shops can avoid critical crashes and optimize controller performance safely.

Frequently Asked Questions

Why did modifying MD18086 delete all tool offsets and part programs?

Modifying MD18086 changes the allocated tool magazine locations in the SRAM. Since the NCK must repartition the SRAM memory for the new allocation, it performs a complete memory reorganization on the next power-up, which deletes all unarchived user data. Always make a backup before editing.

What is the difference between a reboot and using NEWCONF for machine data?

A full reboot is required for parameters that change the SRAM memory layout, while NEWCONF can instantly activate non-memory-allocating parameters (such as feedrate limits or G-code defaults) without stopping production or restarting the CNC.

How does the keyswitch protection hierarchy affect Machine Data access?

The 7-tier keyswitch and password protection system maps access to four distinct data classes (System, Manufacturer, Individual, User). If your access level is lower than the parameter's designated class, the controller will block any edit attempts, preventing accidental corruption of core kinematic profiles.

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