Troubleshooting S120 EPOS Axis Auto-Movement After Power

David Krause19 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
Safety Warning: All commissioning and parameter modification work on a SINAMICS S120 drive with a moving mechanical axis (a grinder U-axis in the field case described here) must be performed with the machine in a safe state, the motor decoupled or mechanically blocked where practical, and the drive isolated per local electrical codes. Use Safety Integrated functions (STO/SS1/SBC) on the CU320-2 plus the controller's enable logic. Never operate a moving load with the safety chain bypassed while testing position references.

1. Problem Description

On a grinding machine retrofit, the U-axis driven by a SINAMICS S120 (with Basic Positioner / EPOS activated) exhibited uncontrolled motion immediately after the 24 V control section and DC link were re-applied. The motor would travel a short distance without any enable from the operator panel, then either stop on its own or trip a position-monitoring alarm. Configuration details observed on site:

  • Position control active, EPOS function module selected (r108.1, r108.2 status bits reported by the drive).
  • Closed-loop control of the position using a motor-mounted absolute encoder and a linear encoder at the load, with a cross-check of the two actual position values.
  • Setpoint source is an external CNC industrial computer connected via PROFIBUS. The S7-300 PLC handles peripheral I/O and interlocks but does not issue the position setpoint.
  • An alarm was reported by the CNC screen, but the drive itself did not immediately flag a unique S120 fault code - the alarm was generated because the load position versus the expected CNC setpoint no longer matched.

When the technician inspected the drive in SINAMICS STARTER (or the modern TIA Portal-based SINAMICS Startdrive), the load-side position actual value (r2521) was shown as a large positive number when the machine was mechanically sitting at a clearly negative datum point. In other words, the drive's absolute zero reference was missing or had been incorrectly set on a previous commissioning pass, so the internal model position was not aligned with the real axis position. The EPOS function therefore applied a corrective setpoint step the moment it was enabled, which is what made the axis jerk at power-on.

2. Root Cause Analysis

The motion at power-on is a position reference mismatch, not a hardware failure. Three different mechanisms can produce the symptom, and the diagnostic procedure must confirm which one applies before any parameter is changed.

Cause Indicator in STARTER Confirmation
Absolute encoder zero not set after reference run r2521, r2522 show non-zero or wrong sign on cold start Compare r2521 with mechanical actual position; check p2595 (home position offset)
Linear/absolute encoder comparison fault ignored p2542 / p2543 / p2544 (encoder difference threshold) tripped; F07453 logged Read r2540 / r2541 difference; inspect mechanical slip
Setpoint source already streaming position values before OFF2/3 is cleared r2520 (position setpoint) tracks the CNC r-position on a fresh boot Disable telegram setpoints; check r2090 bits and p0840/p0852 enable chain
EPOS mode left in MDI / continuous setpoint allocation when re-powered p2640 (MDI setpoint) and p2650/p2660 retained from last cycle Save RAM-to-ROM (copy RAM to ROM) and inspect p2617/p2618 mode bits

In the field case, the technician identified the first cause. The EPOS function retained the encoder position but the load-side zero reference (mechanical zero of the grinder table) had not been written. After re-establishing the zero reference, the drive correctly recognized the stationary axis, the position actual value stabilized at the correct datum, and the spurious motion disappeared.

3. SINAMICS S120 EPOS Architecture Recap

EPOS in SINAMICS is a software positioner that closes the position loop on top of a velocity-controlled drive. The position loop is closed inside the Control Unit (CU320-2 DP/PN or CU310-2) using the position actual value derived from one of two encoder channels. Per the official SINAMICS S120 Function Manual - Basic Positioner (EPOS):

  1. Encoder acquisition (motor / load) - parameters p0400..p0430 select the type (resolver, EnDat, SSI, HTL/TTL, DRIVE-CLiQ).
  2. Measuring gear / load gear - p0410..p0413 scale the rotary sensor to load units.
  3. Position actual value preprocessing - p2540..p2546 select between motor encoder, load encoder, or both.
  4. Mechanical zero reference / position offset - p2520..p2526, p2590..p2595 define the absolute datum and the home position offset.
  5. Position setpoint processing - p2610..p2640 (modes: jog, MDI, traversing blocks, direct setpoint from PROFIdrive).
  6. Position controller - p2530..p2536 (gain, pre-control, output limits, following-error filtering).
  7. Monitoring - p2540 / p2542 / p2543 (following error, position limit, setpoint limit reached).

The setpoint source in this case is the external CNC. The drive is configured as a PROFIdrive slave (positioning mode, telegram 110 or telegram 7 with extended setpoints). Telegram selection is in p0922, and the PZD wiring of the setpoint and actual-value words is in p2050/p2051 according to the SINAMICS S120/S150 List Manual.

4. Absolute Encoder and Linear Encoder Setup

Because the field case uses a redundant encoder pair, both p2540 (encoder source) and p2544 (position-actual-value processing) must be set correctly. The standard wiring uses one of the Sensor Modules SMC30 / SME25 / SME120 to read each encoder.

Parameter Meaning Typical Value (U-axis linear application)
p0400[0..1] Encoder type (motor / load) 9999 = user-defined, then p0404/p0405/p0408
p0404[0..1] Encoder configuration (TTL/SSI/EnDat/HTL) SSI: 9999; EnDat: 9999; HTL: 9999
p0405[0..1] Rectangular wave pulses per revolution Set per encoder nameplate
p0408[0..1] Rotary revolutions (linear encoders: 1) 1 for linear
p0410[0..1] Encoder inversion (sign) 0 or 1 - sign must match the direction of positive motion
p0411[0..1] Measuring gear configuration 1 for direct load measurement
p0412[0..1] Measuring gear absolute value, rotary revolutions Number of resolvable motor turns between homing events
p0413[0..1] Measuring gear position tracking tolerance window Allowed revolutions before re-reference is forced (e.g. 4096)
p0421[0..1] Absolute encoder rotary revolutions From encoder nameplate
p0423[0..1] Absolute encoder multi-turn bits From encoder nameplate (e.g. 12 = 4096 turns)
p0427[0..1] SSI baud rate (50 kBd / 100 kBd / 200 kBd / 400 kBd) Per encoder data sheet
p0428[0..1] SSI monoflop time (µs) Per encoder data sheet (e.g. 30 µs)
p0430[0..1] SSI data length, single/multi-turn 25 / 13 / 12 (e.g. 25 = 12 MT + 13 ST)
p0437[0..1] SSI protocol variant / parity / code Per encoder manufacturer

After these are set, the absolute encoder should report a stable value at r0480[0..1] / r0481[0..1] and the linear counter at r0482[0..1] / r0483[0..1]. The position tracking window (p0413) is what allows the absolute value to remain valid across an OFF/ON cycle within a limited number of motor revolutions - a critical detail because if the table is moved past the window while the drive is unpowered, the absolute value becomes invalid and the drive demands a new reference run.

5. Position Reference and Zero-Point Parameters

The EPOS zero reference is the most likely source of a power-on auto-motion. The following parameters must be set coherently. These are the parameters that the field technician corrected via STARTER.

Parameter Meaning Field-relevant note
p2502[0..1] Encoder assignment for EPOS 0 = motor encoder (default); 1 = load encoder. Must match p2544.
p2503 Actual position value source (motor / load) Set to the encoder that represents the mechanical axis.
p2504 Status word, position controller (r2504) Diagnostic: bit 0 = referenced; bit 1 = homing active; bit 2 = print mark / probe.
p2505 Control word, position controller (r2505) Diagnostic: bit 0 = position reference enable; bit 1 = reference point set.
p2520 Position setpoint (LU) Read-only when controlled externally.
p2521 Position actual value (LU) Compare to mechanical actual after reference is set.
p2522[0..1] Position reference, mechanical Mechanical zero in load units.
p2523[0..1] Load-side position offset Constant added to the load-side actual value.
p2524[0..1] Encoder position offset (motor-side / load-side) Set by the homing procedure or "set absolute value" command.
p2525 Position reference enable (CO/BO: r2525) Drives the "referenced" status. Set to 1 to mark axis as referenced.
p2590 Homing mode (1 = use proximity switch + zero mark; 2 = use zero mark only; 3 = use external probe; 4 = passive homing; 7 = set absolute encoder directly) Pick the one that matches the mechanical end-stop or marker.
p2591 Homing start (BI) Edge 0/1 starts the homing sequence.
p2592 Homing approach velocity (mm/min or LU/min) Velocity towards the reference cam.
p2593 Homing creep velocity Velocity off the cam to the zero mark.
p2594 Homing acceleration Ramp used during homing.
p2595 Home position offset Offset added to the detected zero to produce the desired mechanical zero.
p2596 Homing direction reversal enabled (BI) Selects positive or negative approach direction.
p2597 Reference cam type (NO / NC) Match the hardware wiring of the home cam.
p2598 Reference cam BI Digital input terminal number for the home cam.
p2599 Measuring probe input DI for fast probe, used in p2590 = 3.

When the axis is correctly referenced, bit 0 of r2504 reads "1". When the zero reference is lost or was never set, the bit reads "0" and the drive treats the position as uncalibrated. If the drive receives a setpoint under those conditions, EPOS will perform a homing-run to recover the datum, and on some configurations it will simply step to the last known setpoint - which is what produced the field symptom.

6. CNC-PLC Communication over PROFIBUS

The setpoint in this application is generated by an external CNC computer. The drive is a PROFIdrive positioning slave. The relevant commissioning items are:

Parameter Meaning Typical Setting
p0918 PROFIBUS node address Configured in the CNC project; must match DIP switch on CU320-2.
p0922 PROFIdrive telegram selection 110 (positioning with extended setpoint) or 7 (standard with MDI).
p2050[0..n] CW to PZD (setpoint direction) Standard: STW1 = r2090.0, STW2 = r2090.1, NSOLL_A, etc.
p2051[0..n] CW from PZD (actual-value direction) Standard: ZSW1 = r2089.0, NIST_A = r0063, XIST_A = r2521.
p2071 PROFIdrive diagnostic Check for cyclic life-sign / watchdog faults.
p2080[0..15] Status word mapping Bits 8/9/10/13 of ZSW1 indicate fault / no OFF2 / no OFF3 / closed-loop control.
p2084[0..15] Status word-2 mapping Referenced / homing status from r2504.

A common error pattern is that the CNC immediately begins writing the MDI position setpoint as soon as the bus goes cyclic, before the drive has completed the homing or the absolute reference check. The EPOS function then acts on the new setpoint - either moving to a "homing" coordinate or to the last MDI target. The fix is one of:

  1. Make the CNC gate the setpoint on the drive's "axis referenced" bit (ZSW1 bit 13 = closed-loop, ZSW2 bit 4 = referenced/homing done).
  2. Set EPOS mode to "no setpoint until referenced" via p2617 / p2618 and the configuration of p2650/p2660.
  3. Use the drive's own p2640 to retain a safe intermediate value until the reference is set.

7. Commissioning with STARTER / Startdrive

The corrective sequence described below is what produced the working result in the field. Tools and preconditions are listed first.

7.1 Prerequisites

  • SINAMICS STARTER (legacy) or TIA Portal with SINAMICS Startdrive, version matched to the drive firmware (e.g. Startdrive V17 for V5.2 firmware, V18 for V5.2 SP1, V19 for V5.2 SP3).
  • Drive firmware version known: SINAMICS S120 firmware V5.2 SP3 or V5.3 is typical for current retrofits. V4.x firmware remains in service on older CU320-2 units.
  • Project backup taken (drive CF card copy, or STARTER "Upload from device").
  • Online connection established via PROFIBUS or PROFINET; STARTER online mode shows r parameters live.
  • Safe state established; STO engaged; motor uncoupled or axis mechanically locked if possible.

7.2 Step-by-Step Corrective Procedure

  1. Read the actual position - In STARTER's Control Unit > Commissioning > Position actual value view, read r2521. With the machine sitting at a known datum, this should equal the mechanical zero. If it does not, the zero reference is missing.
  2. Disable all setpoints - Block the CNC MDI setpoint (p2640 = 0) and clear p2650 / p2660 traversing block position. Set p0840 = 0 (OFF1), p0852 = 0 (operation enable). The drive will coast down.
  3. Force an active homing run - Set p2590 = 1 (use reference cam + zero mark) or 4 (passive homing using the existing zero) depending on the machine. Pulse p2591 (rising edge) via STARTER's Control > Signals panel. Observe r2521 climbing as the axis runs to the cam and settles at the zero mark.
  4. Set the home position offset - Once at the mechanical zero, write the desired value of r2521 into p2595 (home position offset) and accept with "Set home position". The drive writes p2522 (position reference mechanical) to the current r2521 plus p2595.
  5. Mark as referenced - In STARTER, under Position Control > Homing, click "Set absolute value" / "Set reference point". This sets r2505.0 = 1 (control word position reference enable) and r2504.0 = 1 (axis referenced).
  6. Save to ROM - Drive > Copy RAM to ROM. Without this step, the corrected zero reference is lost on the next power-off.
  7. Power cycle - Turn the 24 V off and back on (the drive will run-up, recognize the absolute encoder, validate against p0413, find the new reference, and not move).
  8. Verify - Re-enable the drive (p0840, p0852), bring the CNC into cyclic mode, and check that the axis does not move until a deliberate setpoint is issued. Use r2521 (actual) and r2520 (setpoint) side by side; they must match within the standstill window (p2542).
  9. Re-enable the CNC setpoint source - Restore p2640 / p2650 / p2660 to their process values and clear the gate in the CNC application.
Important: Step 6 (Copy RAM to ROM) is what most field engineers forget on the first attempt. The EPOS reference values live in the volatile parameter set on the Control Unit; without saving, the axis will revert to its old, wrong reference on the next cold start. If a CF card is present, the save also writes to the card so the parameter set survives even if the CU is replaced.

8. Verification and Acceptance Test

After the corrective procedure, run the following acceptance test:

  1. Standstill test - With the drive enabled and zero setpoint, monitor r2520, r2521, r2561, r2562 (following error / tracking deviation) for 10 minutes. They must remain within +/- 1 LU.
  2. Power-cycle test (hot) - Remove and re-apply the 24 V control voltage. The drive must come up without any axis motion and r2521 must read the previously established value.
  3. Power-cycle test (cold) - Remove the DC-link enable and the 24 V supply simultaneously, wait 30 s, reapply. The drive must not move. The CNC must report "axis referenced" on its status page before issuing a motion command.
  4. Absolute value tracking - Move the axis 50 mm by manual mode (JOG) and back. The drive must remain referenced (r2504.0 = 1) and r2521 must track.
  5. Encoder difference test - Read r2540 / r2541 (position difference between the two encoders). It must be below p2543 (encoder difference threshold) at all times. If the linear encoder reports motion that the absolute encoder does not, mechanical slip is present and the differential check is the more critical safeguard.
  6. Fault injection - Briefly pull the home-cam input low during a homing run. The drive must abort with F07457 (homing error) and not move into the end-stop. Restore and re-home to confirm normal operation.

9. Common Related Faults and Alarms

The S120 EPOS fault set documented in the SINAMICS S120 List Manual includes the following codes that are likely to be raised on this class of problem:

Code Meaning Likely cause in this case
F07449 Position actual value processing error p2540 / p2544 misconfigured; absolute encoder not validated
F07450 Following error monitoring responded Axis moved while blocked, or setpoint jumped at power-on
F07452 Position actual value invalid Absolute encoder not yet referenced; p2525 still 0
F07453 Position actual value, encoder difference exceeds threshold Mechanical slip between absolute and linear encoders
F07454 Position setpoint limit reached Traversing block / MDI target outside software limit switch
F07457 Homing error Home cam not detected, no zero mark found, or wrong direction
F07458 Position value processing, absolute encoder offset invalid Absolute encoder value rejected after p0413 window violation
F07460 Position controller enable missing EPOS enable chain (r2526 / r2527) not closed
F07461 Setpoint enable missing OFF1/OFF2/OFF3 not cleared, or p1140/p1141 active
F07462 Homing active (info) Drive is currently executing a homing run; not a fault
F07463 Setpoint stop active (info) Intermediate stop ramp active during homing
F07464 Homing offset not set p2595 = 0; the drive cannot resolve a meaningful zero

None of these are typically the root cause of "axis moves automatically at power on". The root cause is the missing reference; the fault is the consequence. Confirm the reference first, then investigate any remaining alarms.

10. Field-Proven Tips and Best Practices

  1. Always read r2521 against a known mechanical datum on first commissioning. A positive value when the axis is sitting at a negative side of zero is the classic sign that the absolute value was set in the wrong direction.
  2. Use passive homing (p2590 = 4) on retrofits that already have a known datum, instead of active homing. It does not move the axis; it merely assigns the current position to the configured home.
  3. Set p0413 (position tracking tolerance window) smaller than the maximum axis travel between power-off and power-on. If the operator can move the table by hand more than the window allows, the absolute value will be invalidated and a re-reference will be required.
  4. Always set p2640 (MDI position setpoint) to a safe value - typically the current r2521 - before the CNC starts streaming setpoints. This eliminates the first-cycle setpoint jump.
  5. Configure ZSW2 bit 4 ("referenced/homing done") in p2084[0..15] and map it into the PROFIdrive telegram. The CNC will then know when it is safe to start motion commands.
  6. On machines with multiple encoders (motor + load), configure p2544 = 1 to use the load encoder as the position reference. The motor encoder is used for speed control; the load encoder is used for absolute position. This is the most common mis-configuration leading to drift between the two encoders.
  7. Save parameters to the CF card as well as to ROM. The CU320-2 supports both; the CF card survives CU replacement and is the master record for service engineers.
  8. After every parameter save, do a power-cycle test before returning the machine to production. Many parameters only become active on the next ramp-up.
  9. Document the values of p2522, p2523, p2524, p2595, p0412, p0413, p2540, p2543, p2544, p2590 in the machine logbook. These are the parameters that field service will need to recover the configuration after a CU replacement.
  10. If the machine is part of a Safety Integrated system, verify that the homing run is allowed only in a safe state (SOS or reduced speed monitoring). The S120 Safety Integrated Function Manual describes how to gate the EPOS enable on the safety state.

11. Diagnostic Matrix - Power-On Auto-Motion

Symptom Check this parameter Expected value Action
Axis moves a small step then stops r2521, p2522, p2525 r2521 = 0 if at datum; p2522 = current position Run "Set home position" or active homing (p2590)
Axis runs continuously to a software limit r2520, p2640, p2617, p2618 r2520 = 0 at power-on Set p2640 = r2521 before re-enable; gate CNC on ZSW2.4
Axis runs only after CNC cyclic r2090 (PZD control word), ZSW2.4 ZSW2.4 = 0 until referenced Block MDI setpoint in CNC until ZSW2.4 = 1
F07452 / F07458 at power-on r2521, p0413, p2522 No fault when within tracking window Re-reference, or enlarge p0413 if mechanical travel is larger
Motion is reversed from expectation p0410, p2545, p2596 Sign matches the mechanical convention Flip p0410 (encoder inversion) or correct p2596 direction
Axis drifts even at standstill r2561 / r2562 (following error), p2531 (Kv) Within +/- 1 LU Increase Kv in p2531; check mechanical play

12. Related Standards and Documentation

The drive and EPOS function are documented in Siemens' official manuals, which are the authoritative source for parameter values and acceptance criteria. Engineers commissioning or repairing S120 EPOS axes should keep the following documents at hand:

These manuals are the contract for the parameter numbers quoted above; verify any value in the live List Manual for the firmware version installed in your drive before saving to ROM.

Why does my SINAMICS S120 axis move a short distance immediately after the drive is switched on?

The most common cause is a missing or wrong absolute zero reference. Read r2521 in STARTER or Startdrive and compare it to the actual mechanical position; if the sign or magnitude does not match, run "Set home position" (p2590) and copy RAM to ROM. A secondary cause is the CNC issuing a position setpoint over PROFIdrive before the drive's referenced bit (ZSW2 bit 4) goes high; gate the setpoint in the CNC application until that bit is 1.

Which parameter actually controls the EPOS zero reference on S120?

The zero reference is the combination of p2522 (mechanical position reference) and p2595 (home position offset). Active homing is triggered by a rising edge on p2591, using the mode selected in p2590. After a successful homing, r2504 bit 0 (referenced) reads 1 and p2525 reports the position reference enable. The fault F07464 ("Homing offset not set") appears if p2595 is left at 0.

How do I stop the axis moving until the absolute encoder is verified after power-on?

Set p2640 (MDI setpoint) to the value of r2521 before enabling the drive, so the first setpoint equals the current actual value and produces no motion. In the CNC, gate the first MDI / direct setpoint on the drive's ZSW2 bit 4 ("axis referenced / homing done"). Verify both r2504.0 and ZSW2.4 read 1 before allowing the cycle to start.

What happens if the axis is moved manually past the absolute encoder tracking window while the drive is off?

SINAMICS detects this on the next power-on via p0413 (position tracking tolerance window) and raises F07452 / F07458. The absolute value is invalidated and the drive demands a new reference run. Set p0413 to a value larger than the maximum manual travel but small enough to detect a real mechanical slip (typical: a few hundred motor revolutions on a linear axis).

My drive has both a motor absolute encoder and a load linear encoder - which one is the position reference?

Set p2502 and p2544 to 1 to make the load linear encoder the position reference for EPOS. The motor encoder is used for speed and torque control. Always read the differential between the two encoders (r2540 / r2541) and configure p2543 (encoder difference threshold) so that a real slip will be detected before the grinding process produces a bad part.

Can the EPOS zero reference be set from STARTER without moving the axis?

Yes. Use passive homing (p2590 = 4) which assigns the current actual value to the configured home without driving the motor. After accepting with "Set reference point", save the project (Copy RAM to ROM) and power-cycle. The axis will boot in the referenced state at the current mechanical position and the next setpoint will not cause auto-motion.

Back to blog