1. Problem Statement: Position Reference Lost on Drive Power-Off
When a SINAMICS V90 servo drive is controlled from a SIMATIC S7-1200 CPU using the SINA_POS (FB284) library block in EPOS (Basic Positioner) mode, the application-level position is lost every time the 24 V control and power to the drive is removed. On the next power-on, the drive boots, runs through its initialization, and the EPOS state machine reports not referenced regardless of the absolute encoder's internal retention. The PLC cannot issue a single MC_MoveRelative or MC_MoveAbsolute until a homing run has been executed.
For a conveyor that indexes in fixed 76.2 mm steps, the re-homing adds 2-6 s of unproductive machine time per shift and, more importantly, breaks the assumption that the HMI position display matches the mechanical position. Operators are forced to run a manual reference procedure after every E-stop reset or night-shift power-down.
ErrorId in the 0x8xxx range and the drive's ZSW1 bit "referenced" (bit 12 in ZSW1 per Telegram 3 mapping) reads 0.2. Root Cause Analysis
Three interacting factors cause the symptom:
-
EPOS owns the position. When SINA_POS is selected as the control method, the drive's EPOS function module is the source of truth for actual position. The PLC only mirrors that value through the
ActPosition(LREAL) output. The PLC does not own a copy that survives a power cycle, and SINA_POS does not writeActPositionback into a retentive tag. - EPOS state machine is non-retentive across SINA_POS sessions. On every drive power-up, EPOS initializes in the wait for homing state. The drive-internal absolute position retained by the multi-turn encoder is available to the encoder interface, but EPOS requires an explicit set reference point command before the actual position becomes a valid mechanical coordinate for SINA_POS.
-
SINA_POS expects the drive, not the PLC, to define the coordinate system. There is no SINA_POS input that lets the PLC push a stored offset to the drive on startup. The only homing mode that can be triggered without mechanical motion is direct-setpoint homing (
ModePos = 6), and the application must explicitly issue it.
3. Hardware and Software Configuration in Scope
| Component | Specific Type / Version | Role in Architecture |
|---|---|---|
| SIMATIC CPU | S7-1200 (CPU 1211C / 1212C / 1214C / 1215C / 1217C) | Master controller running SINA_POS |
| Drive | SINAMICS V90 PN (6SL3210-5FB10-xUAx) | EPOS-controlled servo |
| Encoder option | Multi-turn absolute (ASI) or 20-bit incremental | Mechanical feedback |
| Configuration tool | SINAMICS V-Assistant ≥ V5.7 HF3 | Drive commissioning |
| Engineering framework | TIA Portal V18 with S7-1200 Motion Control HSP | PLC programming and TO configuration |
| Library | Siemens DriveLib V18 (FB284 SINA_POS) | EPOS-mode positioning interface |
| PROFINET telegram | Standard Telegram 3 (or Telegram 111 for 32-bit position) | Cyclic data exchange |
| Drive firmware | V90 FW ≥ V1.30 (recommended for TO integration) | Cleanest MC_Power / TO behavior |
4. Confirming the Diagnosis
Before changing the architecture, verify that the symptom is not caused by a misconfigured encoder, a missing parameter set, or a wrong PROFINET device name.
4.1 Encoder type in V-Assistant
- Connect V-Assistant to the V90 over the service port (mini-USB) or PROFINET.
- Navigate to Parameters → Encoder and read
p0400[0]. A value of 9999 (unconfigured) or 1 (incremental) means the drive has no absolute feedback and the EPOS "not referenced" behavior is by design. - For a multi-turn absolute encoder (EnDat 2.1/2.2), confirm
p0421[0]matches the encoder family (e.g. 1003 for the V90 ASI option).
4.2 Mechanical reference configuration
- Open V-Assistant → Control / Status of setpoints → Basic positioner → Mechanical system.
- Confirm linear scaling active:
p29240 = 1. - Confirm load gear / spindle pitch values:
p2503 = LU per motor revolution,p2504 = motor revolutions per load revolution, and the load distance per motor revolution in the assistant (default 10 mm for a 10 mm pitch leadscrew, or 76.2 mm for a direct-drive belt index). - For a non-modulo linear axis, confirm
p2507 = 0andp2599 = 0(absolute encoder adjustment value cleared).
4.3 PLC tag classes used by SINA_POS
Open the SINA_POS instance DB in TIA Portal and inspect the I/O. The actual position ActPosition (LREAL) is an output only. SINA_POS does not write it back into a retentive tag, so the HMI value is regenerated from the drive's status word on every PLC restart - and the drive reports "not referenced" until a homing run is executed.
5. Solution A - Use the S7-1200 Technology Object (TO) with the Drive in Speed Control
The most reliable long-term solution is to remove the drive from EPOS mode and let the SIMATIC S7-1200 technology object TO_PositioningAxis handle the absolute position. The drive then operates as a closed-loop speed/torque follower (servo with controlled velocity), and the PLC stores the absolute position in a retentive DB. After a CPU restart, the TO automatically restores the actual position from its remanent actual value; the drive accepts the next setpoint without requiring a re-home.
5.1 Architecture changes
- Change the V90 control mode in V-Assistant from Basic positioner (EPOS) to Speed control (S) or Position control (PTI) without EPOS. Save and reboot the drive.
- In TIA Portal, add a new Technology object → PositioningAxis under the S7-1200 PLC.
- Select the drive as a PROFINET device with telegram and map Telegram 3 to the TO's "Drive" interface. The TO uses STW1/STW2, ZSW1/ZSW2, NIST (setpoint speed) and the encoder evaluation channel G1_ZSW/G1_STW.
- Configure the axis as Linear, Non-modulo (continuous) with the load distance per motor revolution set to 76.2 mm (or whatever the conveyor's belt travel per motor revolution is).
- Set the homing method in the TO to Active homing via digital input or Passive homing as appropriate to your mechanical reference marker.
- In the TO configuration, set "Restore position after CPU restart" to Restore position from remanent actual value. The TO writes the absolute position to a system-side retentive DB on every actual-value update.
5.2 Program structure
- Call
MC_Power(axis enable). Re-assertEnableafter a CPU restart; the TO does not auto-re-enable the drive stage. - Call
MC_Homeonce during initial commissioning (Mode = 0 for direct absolute home, or Mode = 3 for passive homing). - Call
MC_MoveAbsoluteorMC_MoveRelativefor the 76.2 mm index step.
Reference project: see the Siemens FAQ S7-1200 Motion Control - SINAMICS V90 with technology object for a working sample program. The companion FAQ S7-1200 Motion Control - SINAMICS V90 with SINA_POS (EPOS) covers the SINA_POS variant for comparison.
6. Solution B - Keep SINA_POS but Store and Restore the Position Offset
If the application is already written around SINA_POS and a full migration to a TO is not feasible, you can wrap SINA_POS with a small helper block that:
- After a successful homing run, reads the drive's current absolute position from
ActPositionand writes it into a retentive LREAL tag (e.g."DB_Homing".lr_HomeOffset_LU). Mark the instance DB as Retain in TIA Portal so the value survives a CPU restart. - On the next PLC startup, before enabling SINA_POS, force the drive to adopt the stored offset by triggering a one-shot direct homing (
ModePos = 6, direct setpoint) with the value coming from the retentive tag. Then enable the axis.
6.1 Helper block pseudo-code (SCL)
// On first scan after PLC restart
IF "FirstScan" THEN
"SINA_POS".ModePos := 6; // Direct setpoint homing
"SINA_POS".Position := "DB_Homing".lr_HomeOffset_LU;
"SINA_POS".ExecuteMode := TRUE; // Edge trigger
WAIT_FOR "SINA_POS".StatusDone;
"SINA_POS".ModePos := 1; // Restore absolute mode
END_IF;
// On homing complete (any homing mode)
IF "SINA_POS".StatusHomingDone AND "HomingDoneOneShot" THEN
"DB_Homing".lr_HomeOffset_LU := "SINA_POS".ActPosition;
"HomingDoneOneShot" := FALSE;
END_IF;
7. Solution C - Re-enable Absolute Encoder Context in the Drive
The V90 supports absolute encoder adjustment via p2599 and the related encoder parameters. If the drive is configured correctly and the encoder backup is functional, the drive retains the absolute position across power cycles. However, the EPOS state machine still requires a one-time Set reference point command after power-on; this can be done without mechanical movement by issuing the direct-setpoint homing with the saved value (Solution B). Verify:
- Encoder backup OK:
r0471[0]reports no warning,r0480[0]shows the multi-turn revolution counter incremented correctly across power cycles. - Absolute encoder range:
p0418 = 0xFFFF(full 4096-rev multi-turn range) andp0421.0matches the connected encoder family. - After power-on, the drive's
ZSW1.12(referenced) is 0 andZSW1.11(setpoint acknowledgment) clears. The SINA_POS block mirrors this throughStatusWord.11= 0 andStatusWord.12= 0. - Use a small jog to confirm the encoder increments correctly: enter
p2585 = 1in V-Assistant, jog the motor 1 LU, then readr2521[0]. The value must increase by exactly 1 LU per 0.1 µm of mechanical travel.
8. SINA_POS Key I/O Reference
| Signal | Direction | Data Type | Meaning | Retentive? |
|---|---|---|---|---|
| ModePos | Input | INT | Positioning mode selector (0 = relative, 1 = absolute, 6 = direct setpoint) | No |
| ModeVel | Input | INT | Velocity mode selector | No |
| AxisEnable | Input | BOOL | Drive ON/OFF1 | No |
| CancelTraversing | Input | BOOL | Reject current motion | No |
| IntermediateStop | Input | BOOL | Hold motion without aborting | No |
| PositiveEnable / NegativeEnable | Input | BOOL | Travel range enable | No |
| ExecuteMode | Input | BOOL | Edge-triggered motion start | No |
| Position | Input | LREAL | Target position (LU) | No |
| Velocity | Input | LREAL | Target velocity (LU/min) | No |
| OverV, OverAcc, OverDec | Input | REAL | Override 100-200 % | No |
| ActPosition | Output | LREAL | Actual position from drive (LU) | No |
| ActVelocity | Output | LREAL | Actual velocity | No |
| StatusWord | Output | WORD | ZSW1 mirror | No |
| Error / Warning / ErrorId | Output | BOOL / WORD | Diagnostics | No |
None of these are persisted by SINA_POS; a PLC restart always reverts the controller to a "not referenced" state with respect to the drive.
9. Conversion Formulae for Conveyor Indexing
For a linear axis driving a conveyor with index step Lstep in millimetres:
Belt travel per motor revolution (pinion of diameter D):
Lmotor = π × D
LU per motor revolution (1 LU = 0.1 µm default, configured via p2502 linear scaling):
NLU = Lmotor × 10000
Set this value in the drive: p2503 = NLU.
Index step in LU:
Nstep_LU = (Lstep / Lmotor) × NLU
For the application (76.2 mm step, 30 mm pinion):
- Circumference = π × 30 mm = 94.2478 mm
- LU per rev = 94.2478 × 10000 = 942478 LU
- Step in LU = (76.2 / 94.2478) × 942478 = 762000 LU
Note that 76.2 mm corresponds to 762000 LU at 0.1 µm/LU. The SINA_POS input Position is given in LU; verify scaling by reading r2521[0] (actual position LU) in V-Assistant while jogging.
10. Verification and Commissioning Checks
- Power down the drive and CPU for at least 30 seconds.
- Power on, wait for the PROFINET connection (X1 LED green) and the drive to reach the Ready state.
- Read the HMI position display - it should match the mechanical position to within the encoder resolution (1 LU = 0.1 µm).
- Send a relative 76.2 mm index move; the conveyor should step exactly one increment, with no re-homing message in the HMI.
- Repeat the power cycle five times to confirm reproducibility.
- Verify the drive's status bits:
ZSW1.0 = 1(ready),ZSW1.12 = 1(referenced) within 500 ms ofMC_Power.Enable = TRUE.
p9650, p9770 for STO/SS1) are preserved. Check the SINAMICS V90 Safety Integrated manual for the approved configurations.11. Troubleshooting Matrix
| Symptom | Likely Cause | Check | Fix |
|---|---|---|---|
| Position always zero on restart | Incremental encoder selected (p0400 = 1) |
Read p0400 in V-Assistant |
Replace with absolute encoder or change architecture to TO with incremental + homing on every restart |
| Position retained but drive reports "not homed" | SINA_POS expects homing after power-on | Check ZSW1.12 (referenced) |
Use Solution B (direct-setpoint homing) or switch to TO |
| Position jumps by one motor revolution on restart | Multi-turn overflow or wrong p0412
|
Check p0412 gear factor and p0421 encoder type |
Re-commission encoder in V-Assistant; reset p2599
|
| TO position restored but drive stalls | STW1 enable bit not re-asserted | Monitor ZSW1.0 (ready) |
Re-trigger MC_Power.Enable after CPU restart |
SINA_POS reports ErrorId 0x8001
|
ModePos set to a non-supported value |
Check ModePos input range |
Use 0 (relative), 1 (absolute), or 6 (direct setpoint) |
SINA_POS reports ErrorId 0x8xxx (axis not referenced) |
Drive has not completed homing run | Check ZSW1.12
|
Execute MC_Home or run the homing sequence before any move |
| PROFINET connection drops after CPU restart | PROFINET device name mismatch | Compare V-Assistant export with TIA Portal device name | Re-assign the PROFINET name in TIA Portal; check that the GSDML version matches the V90 firmware |
SINA_POS reports ErrorId 0x0010
|
No PROFINET link | Check X1 LED, port statistics in TIA Portal | Replace cable, verify switch, set the device name |
12. Field-Engineering Notes and Common Pitfalls
- Even with a multi-turn absolute encoder, the V90 in EPOS mode requires a homing run after each power-on if SINA_POS is the controller. The encoder's "absolute" property refers to drive-internal position retention across short power-off events (typically < 5 s on the V90, longer with battery-backed SSI), not to the application-level coordinate system.
- For machines with a mechanical holding brake (vertical axis or stopped conveyor), the TO approach is always preferred; the absolute encoder is only used to detect any inadvertent motion while the drive is off.
- When using SINA_POS with PROFINET, ensure that the PROFINET device name of the V90 is consistent across the V-Assistant export and the TIA Portal project. Mismatches cause the drive to drop the connection silently and SINA_POS to report
0x0010(no PROFINET link). - The V90 firmware should match the GSDML file imported in TIA Portal. For TIA Portal V18, the recommended GSDML is
GSDML-V2.34-Siemens-Sinamics_V90PN-...shipped with the SINAMICS V90 HSP. - The Siemens S7-1200 Motion Control manual (S7-1200 Motion Control V18 function manual) describes the TO retentive actual-value mechanism in detail; the section on Axis behavior after CPU restart is the authoritative source.
- For SINA_POS, the official library documentation is the SINA_POS (FB284) library description; in particular, the section on Configuration of homing explains why
ModePos = 6(direct setpoint) is the only mode that can be triggered without mechanical motion. - Avoid
MC_Reseton a TO that has a retentive actual value - it clears the actual position and forces a re-home. Use the TO's Acknowledge error bit instead.
Why does my SINAMICS V90 require re-homing after every power-off even with an absolute encoder?
The V90 in EPOS mode owns the application-level position, and the EPOS state machine initializes in not referenced on every drive boot. The absolute encoder retains its raw mechanical position internally, but SINA_POS does not push a stored offset to the drive on startup. You must either trigger a direct-setpoint homing (ModePos = 6) with a saved value, or migrate to a TIA Portal technology object where the PLC owns the retentive actual value.
What is the difference between SINA_POS and a TIA Portal technology object for position control?
SINA_POS (FB284) is a Siemens library block that drives a V90 in EPOS mode; the drive owns the position. A TIA Portal technology object (TO_PositioningAxis) keeps the absolute position in a retentive PLC DB, drives the V90 in speed or torque mode, and automatically restores the actual value after a CPU restart. The TO is the recommended architecture whenever the application must survive power cycles without re-homing.
Can I store the drive's absolute position in a retentive PLC tag and restore it?
Yes, using the Solution B helper block. After each successful homing run, copy ActPosition (LREAL) to a retentive LREAL tag in a retain-marked DB. On the next CPU restart, set SINA_POS ModePos = 6 and Position = lr_HomeOffset_LU with a one-shot ExecuteMode edge, then revert to ModePos = 1 for absolute moves. This only works if the mechanical axis has not moved while the drive was unpowered.
Which firmware version of the V90 is recommended for technology object integration with S7-1200?
V90 firmware V1.30 or later is recommended. Earlier versions require manual re-assertion of the axis enable bit after a CPU restart and may show intermittent STW1/ZSW1 handshake mismatches with TIA Portal V18. Update the firmware via V-Assistant (Control Unit → Firmware update) using the SINAMICS V90 firmware update package on the Siemens support site.
How do I verify that the absolute encoder is correctly configured in the V90?
Open V-Assistant and read p0400[0] (encoder type), p0421[0] (encoder family), p0418 (multi-turn resolution), and r0480[0] (current multi-turn revolution counter). Power down the drive for 30 s, power up, and confirm r0480[0] returns to the same value. If it does, the absolute encoder is working mechanically; the remaining EPOS re-homing behavior is by design of SINA_POS and must be addressed architecturally.