Troubleshooting SINUMERIK 840D SP1 Spindle Rotating Uncommanded

David Krause12 min read
Motion ControlSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Overview

On SINUMERIK 840D sl (and the older 840D/840D pl) CNC platforms, a recurring field complaint is that spindle SP1 rotates by itself when the controller is powered up or shortly after a part program terminates. The motion is initiated without any NC block (G-codes M3/M4/M5, S-word, SPOS/SPOSA, etc.), no MDI input, and—critically—no alarm or message appears on the HMI. The operator observes that the spindle either:

  • Spins immediately at power-on / NCK ramp-up, or
  • Spins some seconds after the part program reaches M30 / reset, or
  • Spins only after the machine has been idle for a period.

Because the symptom is silent, the root cause is normally one of three families:

  1. Wrong axis / spindle assignment in the NCK machine data (an axis channeled to SP1 is also being jogged, or a wrong axis number is linked to a spindle drive).
  2. Encoder configuration error on the spindle (encoder type, zero-mark, or fine resolution wrong, producing a fake position that drives a closed-loop regulator to "run away").
  3. PLC program issue—either a faulty user PLC block driving DB31..DB61 spindle control bits, or a stale axis enable that triggers a residual axis motion.

This reference walks through the diagnostic procedure, the relevant machine data and PLC interface signals, and the corrective action for each root cause.

Safety: Before any of the checks below, lock out the spindle drive (open the line contactor via PLC signal DB10.DBX56.1 or hardware EMERGENCY STOP). Verify zero speed with a tachometer before opening any covers. Confirm SPINDLE.SPEED.ACT on the HMI is 0 rev/min before proceeding.

SINUMERIK 840D Spindle Architecture

The spindle path on a SINUMERIK 840D is built from three cooperating subsystems. Understanding which subsystem is the source of the uncommanded motion is the first diagnostic step.

Subsystem Hardware Responsibility Key Parameters
NCK NCU 710/720/730/731, NCU 7x0.3 PN Path interpolation, S-word decoding, spindle mode (speed/position/axis) MD30130, MD30200, MD30350, MD35000, MD35110, MD36200
PLC SIMATIC S7-300 inside the NCU (for 840D sl) or external S7-300 Spindle enable, gear stage, feedhold, NC-Stop distribution DB31, DB61 (interface), DB10 (central signals)
Drive SIMODRIVE 611 digital (FM-E) or SINAMICS S120 (SLM/SPM/SMM) Torque/speed/position control loop MD1300, telegram 136/138/139, p2000, p1460

Spindle SP1 is, by default, channel-spindle 1 and is mapped through drive telegram 136 (speed-controlled spindle) or 139 (position-controlled spindle with spindle positioning). The 840D sl / SINAMICS S120 combination almost exclusively uses telegram 136 with optional 391 extensions; legacy 840D + SIMODRIVE 611 uses telegram 3/4 mapped to SSBN/SSBS drive addresses.

Root Cause 1 — Wrong Axis/Spindle Assignment (NCK Machine Data)

If SP1 rotates only when the operator selects JOG on a manual axis (and never in AUTOMATIC), the cause is almost always a misconfigured axis assignment.

Machine Data Name Expected Value for SP1 Effect of Misconfiguration
MD30130 $MA_CTRLOUT_TYPE Output type of setpoint 1 = analog, 0 = standard (PROFIdrive) Wrong output causes NCK to expect feedback that never arrives, drive spins open-loop
MD30200 $MA_NUM_ENCS Number of encoders 1 or 2 0 disables encoder monitoring; wrong index selects wrong encoder
MD30240 $MA_ENC_TYPE Encoder type 1 = incremental, 4 = absolute Wrong type → drive interprets noise as speed
MD31000 $MA_ENC_IS_LINEAR Linear encoder 0 Set incorrectly to 1 → wrong scaling
MD31020 $MA_ENC_RESOL Encoder pulses/rev Per encoder plate (e.g. 2048, 2500, 36000 for sin/cos) Wrong value → wrong speed, runaway
MD31040 $MA_ENC_IS_DIRECT Direct measurement 0 (spindle = motor mounted) 1 makes the NCK apply rigid errors, may oscillate
MD32110 $MA_ENC_FEEDBACK_POL Feedback polarity 1 (or per commissioning) -1 inverts sign, drive accelerates to opposite direction

Procedure to verify:

  1. Open HMI: Commissioning → Machine Data → Axis MD → SP1.
  2. Compare every encoder and setpoint MD against the spindle drive nameplate and the project's commissioning protocol (Lieferfreigabe).
  3. Cross-check MD20070 $MC_AXCONF_MACHAX_USED (channel axis assignment) and MD35000 $MA_SPIND_ASSIGN_TO_MACHAX—the latter must reference the SP1 drive address, not an unused or wrongly-numbered axis.
  4. If the system uses multiple channels, confirm MD20090 $MC_SPIND_DEF_MASTER_SPIND and per-channel spindle numbers (MD35010) are not pointing two channels at SP1.

Root Cause 2 — Encoder / Measuring-System Configuration

A second common fault is the encoder (motor encoder BISS/SSI/TTL or external spindle encoder) feeding back a corrupted or noisy signal. Because the spindle loop is normally closed in speed, a noisy encoder makes the speed controller "hunt" until the motor overspeeds. On SINAMICS S120 the drive may interpret this as a commanded speed and ramp up.

Field-proven checks:

  • MD31000 $MA_ENC_IS_LINEAR = 0 for a rotary spindle (rotary encoder). Setting this to 1 by mistake is a frequent cause of "spindle moves at constant speed without command".
  • MD31040 $MA_ENC_IS_DIRECT — on the spindle, encoder feedback is usually through the motor (indirect), not direct (e.g., on the spindle nose). Setting this to 1 incorrectly causes oscillation.
  • MD32110 $MA_ENC_FEEDBACK_POL — if the encoder cable was rewired during service (swap A/A- and B/B-), only this MD can fix it. Wrong polarity without an alarm can drive a slow runaway.
  • For SINAMICS S120 spindles, also check p0405 (encoder fault signal), p0437 (encoder simulation threshold), and r0459 (encoder fine resolution). On a sin/cos encoder with a damaged cable, the drive may report F31118 / F31117 but in older firmware these are buffered as warnings only.

On the HMI diagnostics screen select Commissioning → Drives → SP1 → Trace and capture Setpoint speed, Actual speed, and Encoder 1 fine position. If the actual speed shows steps larger than 0.5 rev/min without the setpoint moving, the encoder or its wiring is suspect.

Root Cause 3 — PLC Interface Signals (DB31 / DB61)

The PLC sends enable and command signals to each spindle through dedicated axis/spindle DBs:

  • DB31 for axis/spindle 1 in channel 1 (the spindle 1st default).
  • DB61 when the spindle is assigned to the second channel or as a second spindle.
  • DB10 for central NCK/PLC signals (NC-Stop, EMERGENCY STOP, mode group).
Bit Signal Required for SP1 rotation
DB31.DBX1.0 Drive ready (antriebsbereit) 1
DB31.DBX1.1 Pulse enable (Impulsfreigabe) 1
DB31.DBX2.1 Controller enable (Reglerfreigabe) 1
DB31.DBX6.2 Delete distance-to-go (Rücklauf löschen) 0 normally
DB31.DBX6.3 Feed stop (Vorschubhalt) 0 normally
DB31.DBX6.7 Spindle stop (Spindel Halt) 0 normally
DB31.DBX18.5 M3/M4 command from PLC 0 normally
DB31.DBX30.0 Speed setpoint S-word active 0 when no S in NC block

If DB31.DBX18.5 or DB31.DBX30.0 are showing 1 while no NC block is being processed, the PLC program is forcing rotation. To check:

  1. Open the HMI: Diagnostics → PLC → Status DB31.
  2. Force DB31.DBX1.1 = 0 using PLC monitor/force and confirm SP1 stops. If yes, drive and NC are healthy and the PLC is the culprit.
  3. Search the PLC program (Step 7 / TIA Portal) for any unconditional S DB31.DBX18.5 or coil on DB31.DBX30.0 outside of FC19 / FC30 / FC33 (the OEM stubs).

A frequent defect on older 840D machines is that DB31.DBX6.3 (Feed/rapid stop) or DB31.DBX6.7 (Spindle stop) is latched incorrectly, releasing on NC-Reset and re-asserting as a transient motion. Insert a cross-reference to OB1, OB35, OB100 (restart) and OB102 (cold restart).

Root Cause 4 — Drive-Level Speed Setpoint Leakage (SINAMICS / SIMODRIVE)

If the NCK and PLC are correct, the drive itself may still hold a small residual speed setpoint that gets amplified by the closed loop. Check the drive side:

Parameter (SINAMICS S120) Meaning Expected
p1001 Speed setpoint fixed 1 0.000 rpm
p1002 Speed setpoint fixed 2 0.000 rpm
p1003..p1015 Fixed setpoints 3..15 0.000 rpm
p1020 Fixed setpoint select bit 0 0 (controlled by PLC; should drop on Reset)
p1101 Speed setpoint jog 1 0 rpm (or per OEM)
p1110 Inhibit negative direction 0 unless intentionally used
p1111 Inhibit positive direction 0 unless intentionally used
p1142 Enable speed setpoint 1 normally
p21000 Fieldbus IF1 PROFIdrive PZD1..PZD2 Must equal 0 after NC Reset

On SIMODRIVE 611 digital (legacy), the equivalent parameters live under MD1100..MD1400—check MD1104 (setpoint default), MD1112 (jog speed 1), and confirm that SSBN (setpoint normalized) reads 0 after NC Reset.

Step-by-Step Diagnostic Procedure

  1. Verify the symptom class: confirm whether rotation appears in JOG, MDI, AUTOMATIC, or all three. If only JOG → axis assignment / JOG MD issue. If AUTOMATIC after M30 → PLC signals or drive leakage.
  2. Read alarms from the alarm bar (top of HMI). Even if no alarm appears, run Diagnostics → Alarm Log → History to capture the previous 200 events, including 8022/8023 axis-stop codes and 2xxxx drive alarms.
  3. Open the axis service screen for SP1 (Commissioning → Machine Data → Axis MD → SP1 → Service Display) and record: Setpoint, Actual, Following error, Position, Gear stage, Controller mode.
  4. Disable the drive via PLC DB31.DBX1.1 = 0 and observe whether the setpoint at the drive (SINAMICS r0062 or 611 MD1130) still holds a value. If yes, drive is being commanded by PLC/NCK. If no, drive is self-exciting.
  5. Force a Reset (DB10.DBX56.2) and watch SP1 for 60 s. If motion returns >5 s after Reset → suspect PLC timeouts, OB100/OB102, or DC link residual charge.
  6. Compare the active and inactive drives: if the machine has a second spindle SP2, swap drive addresses (only with OEM authorisation) and observe whether the uncommanded motion follows the drive or stays with SP1. This isolates hardware vs. configuration.
  7. Check the part program: even with no NC block active, an asynchronous subprogram, an ASUB (SETINT), or a cyclic FC9 trigger from the PLC can issue an M3. Use the HMI Program overview and $AC_TIMER diagnostics.
  8. Compare against a known-good commissioning protocol (Lieferfreigabe backup). Differences in MD30130/MD30200/MD31000/MD31020/MD31040/MD32110 typically explain a "spindle moves by itself" fault after a service intervention.

Corrective Action by Root Cause

Root Cause Corrective Action
Wrong axis assignment (MD20070/MD35000) Restore values from commissioning protocol; reload NCK archive with the OEM's startup file.
Wrong encoder MD (MD31000/MD31020/MD31040/MD30240/MD32110) Set per encoder nameplate; perform a spindle measuring-system calibration via Commissioning → Drives → SP1 → Measuring-system calibration. Reference the SINUMERIK 840D sl Commissioning Manual (06/2023).
PLC forcing rotation Remove stray S DB31.DBX18.5 / S DB31.DBX30.0 in OB1 / OB35 / OB100 / OB102; add a debug flag at the bottom rung of FC19 to disable while testing.
Drive setpoint leakage Reset p1001..p1015 = 0 on SINAMICS; on 611 set MD1104 = 0 and MD1112 = 0. Re-download drive project.
Faulty encoder cable / connector Inspect DRIVE-CLiQ / SMC/SME module LEDs; replace cable; for SINAMICS S120 confirm r0458 (encoder status) shows 0.
Part-program ASUB Disable SETINT and asynchronous subprograms via Diagnostics → NC/PLC → Status; check $AC_ASUP bits.

Verification After Repair

  1. NCK restart: HMI → Commissioning → NCK Reset (po clear) (warm restart).
  2. Drive restart: SINAMICS p0972 = 1 (factory reset of drive object); for 611 digital, power-cycle the line infeed.
  3. PLC restart: stop-run on the S7 station; confirm no force table is active.
  4. Power on the machine. Monitor SP1 for 5 minutes with no part program loaded: SPINDLE.SPEED.ACT must remain 0 rev/min, r0062 on the drive must remain 0.
  5. Run a dry-cycle test: S500 M3, dwell 30 s, M5, dwell 60 s, repeat 10 cycles. Confirm no overspeed (F07901), no encoder alarms (F31117/F31118), and that SP1 stops cleanly at M5.
  6. Check the following-error on the service display stays below the MD36000 $MA_SPIND_POSCTRL_SAMPLE_TIME × 0.5 limit and below the MD36400 $MA_CONTOUR_TOL value.

Diagnostic Quick Reference (Troubleshooting Matrix)

Symptom First Check Most Likely Cause
SP1 spins at power-on Drive r0062 before NCK ready Drive fixed setpoint p1001..p1015 ≠ 0
SP1 spins after Reset only PLC DB31.DBX6.3/6.7 transition Stale Feed/Spindle Stop in OB100/OB102
SP1 spins in AUTOMATIC after M30 PLC status DB31; ASUB list ASUB triggers M3 on timer
SP1 spins only in JOG MD30130, MD30200, MD31020 Encoder configuration / wrong axis number
SP1 spins at constant wrong RPM MD31020, MD31040, MD32110 Encoder pulses, direct/indirect, polarity
SP1 oscillates / hunts Drive p1460 Kp_n, p1470 Kp_I Speed controller gains too high
SP1 overspeed alarm F07901 MD36200, MD36060, encoder Speed limit / wrong scaling
No alarms but motion present Trace SP1 Setpoint + Actual Encoder noise or drive leakage (p100x)

Field-Proven Caveats

  • If the machine uses an SMC/SME module to add an external spindle encoder, a loose DRIVE-CLiQ connector produces no alarm on older firmware but a position drift that the regulator compensates by accelerating. Re-seat and re-code the SMC module.
  • On 840D pl with NCU 561/571/573 (older generations), the spindle encoder may be routed through the SIMODRIVE 611 FM-E measuring-system card. Confirm the correct module (2- or 3-box) is installed; mixing modules is a documented source of uncommanded motion.
  • For 840D sl with SINAMICS S120, if F31118 appears only in the history log (not active), enable p0437.7 = 1 to convert this into a fault instead of a warning. Always cross-check after upgrading firmware (e.g. 4.x → 5.x or 6.x) where encoder monitoring behavior changed.
  • The HMI Service Display shows gear stage (M40..M45). If the machine enters a wrong gear stage because of a faulty PLC cam, the spindle may rotate at an apparently commanded speed even when M40 is not active.
  • Always verify the spindle parameter set selection (parameter set 1..8) via PLC signals DB31.DBX16.0..16.2. A stuck parameter set selection can load a dataset with a non-zero fixed setpoint.

Related Standards and Siemens Documentation

For deep commissioning context and parameter listings beyond this article, the following official Siemens manuals apply:

Why does my SINUMERIK 840D SP1 spindle rotate right after power-on with no alarm?

Usually a residual fixed setpoint on the drive. On SINAMICS S120, parameter p1001..p1015 (fixed speed setpoints) must all be 0. On legacy SIMODRIVE 611 digital, MD1104 and MD1112 must be 0. The drive holds the setpoint before the NCK boots, so the spindle can spin before any NC code runs.

No alarm appears but SP1 rotates after the part program ends—what should I check first?

Check the PLC spindle status DB31 (or DB61 for second channel) for DB31.DBX18.5 (M3/M4 command) and DB31.DBX30.0 (S-word active). If either is 1 with no NC block, the PLC program is forcing rotation; search OB1, OB35, OB100, OB102 and the OEM FC19/FC30/FC33 for stray set-coils.

Which machine data controls the spindle encoder assignment on SINUMERIK 840D sl?

The key parameters are MD30200 (number of encoders), MD30240 (encoder type), MD31000 (linear/rotary), MD31020 (encoder pulses/rev), MD31040 (direct/indirect measurement), and MD32110 (feedback polarity). Compare against the spindle encoder nameplate and the OEM commissioning protocol; mismatches cause silent runaway or wrong-speed rotation.

How do I read the current spindle setpoint at the drive without tripping an alarm?

On SINAMICS S120, use the trace or HMI diagnostics to view r0062 (speed setpoint after filter). On SIMODRIVE 611 digital, view MD1130 (act. speed) and MD1104 (setpoint). If r0062 ≠ 0 while no NC block is active, the PLC or NCK is still commanding the drive—clear all fixed setpoints and verify the PROFIdrive telegram (typically 136 for spindles) is reset.

SP1 only rotates by itself after NC-Reset, not at power-on—what causes this?

This is typically a PLC latch issue during Reset. After NC Reset, OB102 (cold restart) or OB100 (warm restart) executes; check whether DB31.DBX6.3 (Feed stop) and DB31.DBX6.7 (Spindle stop) are re-asserted by the user PLC, and whether DB31.DBX1.1 (pulse enable) is being latched on by a misconfigured restart OB. Also inspect any ASUBs triggered by SETINT on timer.

Back to blog