How to Disable an Axis in Siemens SINUMERIK 840D: MD and PLC Methods
Disable a rotary or linear axis on a Siemens SINUMERIK 840D / 840D sl controller without mechanically removing the motor. This technical reference covers the machine-data (MD) approach, the PLC encoder-park interface, the reference-point cycle suppression, and the required drive-pulse safety steps that prevent motion when the axis is logically removed from the part program and from the referencing sequence. The most common case is a C axis (or any 360° rotary table) that is taken out of service temporarily while the rest of the machine is still in production.
Problem Definition
On a SINUMERIK 840D, every axis that the NCK knows about must report a referenced position before the part program is allowed to start. When an operator needs to skip the C axis to run an X/Y/Z-only job, the controller still raises alarms because the missing axis is in the active channel configuration. Typical alarm lines seen at NC start are:
- 27000 "Axis %1 not referenced"
- 27001 "Axis %1 no measurement system"
- 21612 "Channel %1 axis %2 traverse enable withdrawn"
- 26100 "Channel %1 axis %2 not available"
- 8080 "Channel %1: program processing resumed after block search"
The root cause is not a hardware fault — it is the controller's expectation that the axis is still mechanically present. The correct fix is to tell the NCK that the axis is no longer part of the kinematic chain, while the drive is independently commanded to remove its torque-producing capability. The controller does not disconnect the motor for you; that is the PLC's job.
Prerequisites
Before touching machine data, confirm the following on a 840D sl installation:
- Operator access to the SINUMERIK Operate HMI with the manufacturer or service password (password level 1 for machine data read, level 2 for write).
- PLC access to the STEP 7 / TIA Portal project that owns the axis interface DBs (DB31 through DB3n, one per axis).
- Knowledge of the axis number
nfor the C axis on this channel (typically 4 on a 3+1 configuration, but it varies with the project). - Drive bus topology confirmed: a SINAMICS S120 line module + motor module combination is assumed; the procedure also works with 611U on older 840D (Powerline) hardware.
- The axis is in a safe state: no part loaded, no coolant pressure, no chips in the work envelope, and the spindle stopped.
- A backup of the project machine data and PLC program, with date and author logged, so the change can be reverted cleanly.
Axis Configuration Model in SINUMERIK 840D
The 840D stores axis-level behavior in machine data arrays indexed by axis number. The disable task touches three families of MDs and one PLC interface family:
| MD family | Range | Example | Function |
|---|---|---|---|
| $MA_* (axis-specific) | 20xxx / 30xxx / 32xxx | $MA_CTRLOUT_TYPE[AXn] | Setpoint, encoder, referencing per axis |
| $MN_* (NCK-global) | 10xxx–19xxx | $MN_AXCONF_MACHAX_NAME_TAB | Channel / system axis assignment |
| $MD_* (drive) | 1xxx (drive-local) | p0845 OFF2 source | Drive-side parameters |
| PLC DB3x | DB31, DB32, … | DB3x.DBX1.3 | NCK ↔ PLC axis handshake |
Reference: SINUMERIK 840D sl List Manual (Parameter Manual) for the complete MD hierarchy.
Method 1 — Machine Data Permanent Disable
This is the cleanest approach when the C axis is removed for an extended period and an NCK power-on is acceptable. The procedure zeroes both the setpoint and encoder types of the axis and forces the NCK to skip referencing for that axis. Once the values are loaded and the NCK is restarted, the axis is invisible to the part program and to the referencing sequence.
MD 30130 — Setpoint output type
$MA_CTRLOUT_TYPE[n, 0] = 0
$MA_CTRLOUT_TYPE[n, 1] = 0
MD 30130 CTRLOUT_TYPE[n] defines how the speed setpoint is output to the drive. The valid values on 840D sl are:
| Value | Meaning |
|---|---|
| 0 | No setpoint output (axis is logically detached from the drive) |
| 1 | Analog setpoint (±10 V interface) |
| 2 | PROFIBUS / PROFINET setpoint via drive telegram |
| 3 | Simulated setpoint (test mode) |
Setting both channel-specific entries to 0 tells the NCK there is no drive to command. There are two indices because some installations mirror the setpoint over a second channel for redundancy; on a single-channel C axis the second index can usually be left at 0 if the original value was non-zero.
MD 30240 — Encoder type
$MA_ENC_TYPE[n, 0] = 0
$MA_ENC_TYPE[n, 1] = 0
MD 30240 ENC_TYPE[n] defines the encoder configuration. The same 0 = no encoder convention applies. With both entries zeroed, the NCK stops evaluating position feedback, which is what removes the "axis not referenced" condition downstream.
MD 34110 — Reference-point cycle
$MA_REFP_CYC_NR[n] = -1
MD 34110 REFP_CYC_NR selects which reference-point cycle runs when the axis is asked to reference. The value -1 means "no reference-point cycle" — the axis is treated as permanently referenced. This single MD is what closes the loop; without it, even the setpoint/encoder zeroing above will still leave the axis in an unreferenced state on a fresh NCK reset.
MD 14512 — Project user-data flag (optional)
MD 14512 [n] = 0x8 (changed from 0x0)
MD 14512 is an axis-specific user data field (USER_DATA_HEX). The bit value 0x8 is sometimes used as a project-side marker to remember that the axis is logically parked. This is not a Siemens-defined disable function; treat it as a project flag, document it in the machine data book, and do not rely on it for any safety or control behavior.
Loading the MDs
Changes to MD 30130, 30240, and 34110 require a full NCK power-on to take effect. On Operate, navigate to Commissioning → Machine Data → Axis MD, edit the three values, then trigger an NCK power-on. On Powerline hardware with HMI Advanced, the equivalent path is Start-up → Machine Data. After the power-on, the controller comes up with the C axis absent.
Method 2 — PLC Interface Encoder Parking
Use this method when the axis must be enabled and disabled dynamically by the PLC — for example, on a machine where the C axis is shared with a manual tailstock or a swiveling operator platform, or when the toggle frequency is high (multiple times per shift). The PLC controls a single bit in the axis interface; when set, the NCK "sleeps" the axis and reports it as unavailable until the bit is cleared.
Required PLC interface bits
| PLC tag | Direction | Function on 840D |
|---|---|---|
| DB3x.DBX1.3 | PLC → NCK | Encoder parking / "parking axis" select |
| DB3x.DBX2.1 | NCK → PLC | Encoder parking active (feedback) |
| DB3x.DBX21.7 | PLC → NCK | Pulse enable to drive Motor Module |
| DB3x.DBX21.0 | PLC → NCK | Position controller enable (drive side) |
where x is the axis index. Axis 1 lives in DB31, axis 2 in DB32, and so on. Reference: SINUMERIK 840D sl PLC Interface Description (NC Var Selector).
PLC logic (STEP 7 ladder)
// Title: Park encoder for C axis (axis 4, DB34)
// Author: Service engineering
// Date: YYYY-MM-DD
NETWORK 1 // User request: park C axis
A M 100.0 // Operator HMI button "Park C axis"
S DB34.DBX1.3 // Set encoder parking
NETWORK 2 // Confirmation
A DB34.DBX2.1 // Encoder parking active
S M 100.1 // Parked flag latched
NETWORK 3 // Pulse enable chain (safety)
A M 100.1 // Parked flag
AN DB34.DBX21.7 // Drop pulse enable while parked
= DB34.DBX21.7 // Pulse enable OFF → drive pulses removed
NETWORK 4 // Position controller enable
A M 100.1
= DB34.DBX21.0 // OFF2: position controller disabled
What happens inside the NCK
When DB3x.DBX1.3 is set, the NCK treats the encoder as logically disconnected: no position control, no speed control, no encoder evaluation. Any attempt by a part program to traverse the parked axis raises alarm 21612 ("traverse enable withdrawn") because the axis is sleeping, not because the drive is faulted. Clearing the bit brings the axis back into normal mode, and the operator must run a referencing pass before the axis can move under program control.
Method 3 — Reference-Point Cycle Suppression Only
If the only symptom is the "axis not referenced" alarm at program start and the part program does not call the C axis, the minimum-impact fix is to set MD 34110 to -1 and leave the setpoint and encoder types intact:
$MA_REFP_CYC_NR[n] = -1 ; No reference cycle — axis is permanently referenced
This change is reversible in seconds and, in most installations, does not require an NCK power-on — a normal NCK reset is sufficient. It is the correct tool when the axis is logically present but no motion is required in the current job. If the part program does call the axis (a C block, a SETMS spindle swap, or a CYCLE800 invocation), alarms return and you must escalate to Method 1 or Method 2.
| Method | Scope | Power-on required | Reversible mid-job | Drive safety needed |
|---|---|---|---|---|
| 1 — MD | Permanent (hours to weeks) | Yes | No | Yes |
| 2 — PLC park | Dynamic (per-cycle) | No | Yes | Yes |
| 3 — REFP_CYC_NR | Logical only | No (NCK reset) | Yes | No (axis still active) |
Drive Safety: Pulse Disable
None of the three NC-side methods removes electrical energy from the motor. The drive power unit MUST be commanded to remove pulses so that no torque-producing current can flow. On a SINUMERIK 840D with a SINAMICS S120 drive line-up, the pulse-enable chain has three layers:
| Signal | Origin | Effect when removed |
|---|---|---|
| Terminal EP at the Line Module | Hardware (24 V from PLC) | Line module pulses off, DC bus de-energizes |
| DB3x.DBX21.7 (Pulse enable) | PLC | Motor Module pulses off, axis cannot develop torque |
| SINAMICS p0845 / p0864 | Drive parameters | OFF2 (controlled pulse cancel) and OFF3 (ramp-down stop) |
| SINAMICS STO input (X129) | Hardware, safety relay | Safe Torque Off per IEC 61800-5-2 |
Reference: SINAMICS S120 Function Manual (FH1).
For an encoder-parked axis, the standard wiring rule is:
- PLC sets
DB3x.DBX1.3 = 1to park the axis. - PLC waits for feedback
DB3x.DBX2.1 = 1(encoder parked confirmed). - PLC clears
DB3x.DBX21.7to remove the drive pulse enable for that Motor Module. - PLC drops
DB3x.DBX21.0for an additional position-controller disable. - The axis is now mechanically and electrically inactive, with the drive still in standby for re-activation.
For a method-1 MD-disabled axis, the PLC still holds responsibility for the drive enable chain, even though the NCK no longer commands motion. Treat the drive as live and supervise the pulse enable just as you would for an active axis.
Programmatic Detection — $MA_CTRLOUT_TYPE
Before a part program commands a parked or disabled axis, it should read the runtime machine data to decide whether the axis is alive. The standard NC variable is $MA_CTRLOUT_TYPE[axis, index]. A return value of 0 indicates no setpoint output. The two ways to use it are:
From an NCK variable read in the part program
; SINUMERIK 840D sl — part program guard
R10 = $MA_CTRLOUT_TYPE[C, 0]
IF R10 == 0 GOTOF NO_C_AXIS
G1 C=45.0 F500
NO_C_AXIS:
; continue without the C move
From the PLC as a readiness flag
; PLC function — expose parked state to HMI
L DB34.DBD0 ; first 4 bytes of axis status word
L W#16#0004 ; bit pattern corresponding to encoder parking
AW
T MW 110 ; HMI tag "C_Axis_Parked"
Reference: SINUMERIK 840D sl Programming Manual — System Variables and SINUMERIK 840D sl Cycles Programming Manual for the higher-level use inside CYCLE800.
Commissioning Procedure (Method 1)
- Verify the C axis is in a safe state (no part, no clamps engaged, no chips in the work envelope, spindle stopped).
- On the HMI, log in with service-level password and navigate to Commissioning → Machine Data → Axis MD.
- Set
$MA_CTRLOUT_TYPE[AX_C, 0] = 0and$MA_CTRLOUT_TYPE[AX_C, 1] = 0. - Set
$MA_ENC_TYPE[AX_C, 0] = 0and$MA_ENC_TYPE[AX_C, 1] = 0. - Set
$MA_REFP_CYC_NR[AX_C] = -1. - (Optional) Set the project user-data flag
MD 14512 [AX_C] = 0x8and document it in the machine data book. - Save the machine data to the CFast / SSD card and the NCK backup file.
- Trigger an NCK power-on through HMI Commissioning → NCK Power On, or by toggling the NCK power button on the NCU module.
- In the PLC, add or enable the rung that drives
DB3x.DBX1.3 = 1for the parked axis and clearsDB3x.DBX21.7. - Run a dry-run part program with no C-axis motion (block search to a known position, single block, M00 for a stop) to confirm the controller accepts the start without alarm 27000.
- Log the change in the project machine data book: date, author, reason, MD values before and after, and the PLC commit revision.
Verification Checklist
| Check | Pass criterion |
|---|---|
| NCK startup without alarms | No 27000 / 27001 / 21612 / 26100 alarms after power-on |
| Axis hidden in HMI axis list | C axis absent or greyed in Measuring → Axis and in the position display |
| Part program start | Test program with no C motion starts cleanly (R0 single block, full auto) |
| Drive torque readout | Motor Module actual current = 0 A while parked (read r0030 or r0078) |
| Manual handwheel | Handwheel does not move the parked axis (the HMI should not even offer the C handwheel selection) |
| PLC pulse enable | DB3x.DBX21.7 = 0 for the parked axis, drive status word shows pulses off |
| Restore path | Restoring MDs to non-zero values triggers a re-reference, not a fault 20085 or 25000 |
| STO chain | Drive safety input STO (X129) functional and tested in a separate validation run |
Restoring the Axis
When the C axis is needed again, the procedure mirrors the disable:
- Confirm the work envelope is clear and the axis is mechanically free (no collision).
- Restore the original non-zero values for
$MA_CTRLOUT_TYPE[AX_C, 0/1]and$MA_ENC_TYPE[AX_C, 0/1]. - Restore
$MA_REFP_CYC_NR[AX_C]to the project default (typically 0 or the dedicated cycle number for the rotary encoder). - Save the MDs and trigger an NCK power-on.
- Clear the PLC park bit
DB3x.DBX1.3 = 0and re-establish the pulse enableDB3x.DBX21.7 = 1. - Run the standard referencing pass for the C axis from the HMI: Reference → C axis → Reference point 1.
- Run a low-speed test move to confirm position control and encoder feedback.
- Update the machine data book with the restore date and author.
Troubleshooting Matrix
| Symptom | Likely cause | Fix |
|---|---|---|
| Alarm 27000 "Axis not referenced" after MD change | MD 34110 not set to -1, or NCK power-on not performed | Set $MA_REFP_CYC_NR[AXn] = -1, save, NCK power-on |
| Axis still listed in Measuring → Axis | MD 20070 or channel axis configuration not updated | Use Method 2 (PLC park) instead of full MD removal, or re-assign the axis in $MC_AXCONF_CHANAX_NAME_TAB |
| Drive shows active current with parked axis | DB3x.DBX21.7 still set, or the Motor Module has its own STO bypassed | Clear pulse enable in PLC logic, verify drive parameter p0845 = 0 |
| Part program calls C and alarms 21612 | Program still contains a C reference despite the MD change | Wrap C moves in $MA_CTRLOUT_TYPE check, or modify the post processor to skip C |
| Restored axis does not reference | MD 30130 / 30240 set to 0, or encoder cable disconnected | Restore non-zero values, check encoder wiring, re-reference |
| Re-activation requires another power-on | NCK did not reload config | Trigger explicit NCK power-on after MD restore |
| Alarm 26100 "axis not available" at NC start | Channel axis assignment in $MC_AXCONF_CHANAX_NAME_TAB still references the axis | Remove the axis from the channel configuration, or accept the alarm and clear with NCK reset |
| CYCLE800 still invokes a C block | useMultiAxisFeatures = TRUE in the cycle's user area, or post processor still emits the cycle | Set the cycle user-data flag to FALSE, or modify the CAM post processor to skip CYCLE800 |
| Alarm 20085 "Axis is following axis" | Coupled-axis pair still references the parked axis | Decouple the C axis from its master (e.g. on 5-axis machines with TC or CAX coupling) before parking |
Cycle 800 and CAM-Side Handling
If the parked C axis is referenced by the swivel cycle CYCLE800 — common on 5-axis machines where the post processor invokes CYCLE800 automatically whenever a 5-axis tool vector is needed — disabling the axis in the NCK is not enough. The CAM post processor must also stop emitting CYCLE800 calls, or the cycle's internal checks will raise a different alarm even when the MDs are correctly zeroed.
The standard Siemens fix on the controller side is the cycle user-data flag useMultiAxisFeatures (or its machine-data equivalent in the CYCLE800 user area). Setting it to FALSE causes CYCLE800 to skip the C-axis block when no 5-axis transformation is active. The CAM-side fix is to update the post processor to suppress the cycle for this specific machine configuration, or to add a guard in the post that reads the axis configuration and decides whether to emit CYCLE800 at all.
Reference: SINUMERIK 840D sl Cycles Programming Manual (CYCLE800 chapter).
Field-Proven Caveats
- Method 1 is invisible to the part program. If the post processor emits a C axis move, the alarm returned is "C axis does not exist" rather than "C axis is parked." This is the desired behavior because it surfaces the issue to the CAM operator at code-generation time.
- Method 2 keeps the axis visible in the channel but unreachable. Use it when the part program is trusted and you need fast toggling without an NCK power-on, for example on a single-shift work cell that swaps between C-axis and chuck-mode jobs.
- Method 3 is the surgical fix. It does not change any other behavior. The axis is referenced immediately at NCK reset, so no referencing alarm appears at program start. If the part program does call the axis, you will see alarm 21612 and you must escalate.
- All three methods require the drive pulse enable to be handled in the PLC; otherwise the parked axis can still receive torque from the drive on a software fault, which is a safety hazard that is invisible to the NCK alarms.
- On coupled-axis systems (e.g. TC, CAX), decouple the C axis from its master before parking. The NCK will not let a parked axis be a coupling follower; alarm 20085 is the visible symptom.
- On machines with a 611U drive line-up (older 840D Powerline), the PLC interface DB numbers are the same, but the drive parameters differ (p0845 becomes the pulse-enable parameter, not the S120 equivalent). Verify the drive manual before adapting the procedure.
Related Standards and Safety Architecture
The disable behavior interacts with functional safety (drive-integrated STO/SS1, SS2, SLS, SOS) governed by IEC 61800-5-2 (Adjustable speed electrical power drive systems — Safety requirements for drives). Disabling a non-safety axis through the NCK interface described above does not, on its own, satisfy the requirements of a safety-rated stop function. A STO input at the SINAMICS terminal strip is required for PL d / SIL 2 or higher, and the wiring must be validated against the safety category of the machine.
The general machinery safety context is the harmonized standard EN ISO 13849-1:2023 (Safety of machinery — Safety-related parts of control systems). Verify the safety architecture and the stop category (0, 1, or 2) against this standard before declaring the axis out of service for any safety-relevant application. Disabling an axis on the NCK side is an operational change, not a safety function; the two must not be conflated in the machine's safety case.
What is the difference between encoder parking and axis disable via MD on 840D?
Encoder parking (DB3x.DBX1.3) is a dynamic PLC command that puts the axis to sleep without changing machine data; clearing the bit requires a fresh referencing pass. The MD-based method ($MA_CTRLOUT_TYPE = 0, $MA_ENC_TYPE = 0, $MA_REFP_CYC_NR = -1) permanently removes the axis from the NCK's view until the values are restored and an NCK power-on is performed.
Does setting MD 30130 to 0 physically disconnect the motor?
No. MD 30130 = 0 tells the NCK to output no setpoint, but the drive power unit is still capable of producing torque if its own enable is active. You must also remove the drive-side pulse enable (DB3x.DBX21.7) or activate the SINAMICS STO input to guarantee no motion.
Why does the controller still say "axis not referenced" after Method 1?
The setpoint and encoder MD zeroing alone is not enough; the referencing check is driven by MD 34110 REFP_CYC_NR. Set it to -1 so the NCK treats the axis as permanently referenced. A full NCK power-on is required for the changes to take effect.
Can the part program detect a parked axis before moving it?
Yes. Read the runtime machine data $MA_CTRLOUT_TYPE[AXn, 0]. A return value of 0 indicates the axis has no setpoint output. Branch the part program around the C axis block if the value is 0, or use the HMI to display the parked state to the operator.
How do I reactivate the C axis after it has been disabled?
Restore the original non-zero values for MD 30130, 30240, and 34110. Perform an NCK power-on. Clear the PLC park bit DB3x.DBX1.3 and re-establish the pulse enable DB3x.DBX21.7. The axis will report "not referenced" and will require a normal referencing pass before the part program can move it.
Does this procedure work on older 840D Powerline hardware with 611U drives?
Yes, with one caveat: the PLC interface DB numbers (DB31, DB32, etc.) and bit positions are the same, but the drive parameters differ. On 611U, p0845 is the pulse-enable source, and the Motor Module enable is wired differently. Adapt the drive-side enable chain to the 611U manual rather than the SINAMICS S120 FH1 referenced above.