SINAMICS S120 Homing with SINA_POS Telegram 111 and External Reference Cam
Overview
The SINAMICS S120 drive with the basic positioner (EPos) and SINA_POS function block on a SIMATIC controller supports referencing (homing) through Telegram 111. When incremental encoders are used, the drive loses its actual position after every power-off / warm restart and must be re-homed before absolute moves are allowed. This guide covers the standard referencing sequence with an external reference cam wired either through the PROFINET/PROFIBUS control word (EPosSTW2) or directly to a digital input on the SINAMICS Control Unit (CU).
For commissioning, refer to the SINAMICS S120 at S7-300/400 Short Documentation and the SINA_POS function block manual.
Prerequisites
- SINAMICS S120 CU320-2 or CU310-2 with firmware ≥ V4.4 (Telegram 111 is supported from V4.4; V5.x recommended for current STARTER / Startdrive commissioning).
- SIMATIC S7-300/400/1200/1500 CPU with TIA Portal V14 SP1 or higher (TIA V15.1 / V16 / V17 are validated).
-
SINA_POS FB imported from the Siemens library "SINAMICS S120 SINA_POS". DB instance
SINA_POS_DB_1created with the correct telegram configuration (input/output lengths 32 bytes each for Telegram 111). - Drive configured for EPos (r108 = r102 = position control), encoder calibrated, and motor commissioned.
- Reference cam (mechanical or proximity sensor) wired either to a SIMATIC digital input feeding
EPosSTW2.SetRefPt, or to a CU320-2 / CU310-2 onboard terminal (DI 0..DI 7) routed through BICO.
Telegram 111 Data Structure
Telegram 111 (Siemens standard telegram for S120 with EPos) provides 32 bytes of cyclic process data in each direction. The relevant control and status words for homing are summarised below.
| Word | Name | Direction | P-Parameter | Use during Homing |
|---|---|---|---|---|
| STW1 | Control word 1 | PLC → Drive | r2090 / p0840 etc. | ON/OFF1, OFF2, OFF3, enable |
| STW2 | Control word 2 | PLC → Drive | r2091 | Speed setpoint, control bits |
| EPosSTW1 | Position control word 1 | PLC → Drive | r2092 | Operating mode selection, MDI, traversing block |
| EPosSTW2 | Position control word 2 | PLC → Drive | r2092 | Reference cam, reference mark, flying homing |
| ZSW1 | Status word 1 | Drive → PLC | p2080[0] | Ready, fault, warning |
| ZSW2 | Status word 2 | Drive → PLC | p2080[1] | Speed actual, control bits |
| EPosZSW1 | Position status word 1 | Drive → PLC | p2080[2] | Mode, setpoint acknowledge |
| EPosZSW2 | Position status word 2 | Drive → PLC | p2080[3] | RefPSet (r2684.11), ActRefCam (r2684.10) |
EPosSTW2 Bit Assignments (p2612 etc.)
EPosSTW2 is the second 16-bit control word of the EPos interface. The bits relevant to referencing are:
| Bit | Symbol | SINA_POS Symbol | BICO Parameter | Function |
|---|---|---|---|---|
| 0 | - | - | p2611 | Reserved / mode dependent |
| 1 | - | - | - | Reserved |
| 2 | SetRefPt / Activate reference cam | SetRefPt | p2612 | 0 = reference cam inactive, 1 = reference cam active / reference point set signal |
| 3 | - | - | p2613 | Mode selection bits for referencing |
| 4 | - | - | p2614 | Mode selection bits for referencing |
| 5..15 | - | - | p2615..p2625 | Reserved / application specific |
Internally, p2612 is driven through the BICO chain p2612 = r2092.2, where r2092 is the bit-level image of EPosSTW2 received from the PLC. Therefore, setting bit 2 in EPosSTW2 from the SINA_POS DB is the canonical way to feed the reference-cam signal to the drive without extra wiring.
SINA_POS Data Block Layout
The SINA_POS DB exposes structured send/receive buffers. For homing the engineer manipulates the following tags:
// SINA_POS_DB_1 send buffer (PLC -> Drive)
"SINA_POS_DB_1".sxSendBuf.sxEPosSTW1.ModePos // bits 0..5 select EPos mode
"SINA_POS_DB_1".sxSendBuf.sxEPosSTW2.SetRefPt // bit 2 -> p2612
"SINA_POS_DB_1".sxSendBuf.sxEPosSTW1.RefStart // bit 7 -> p2595 (start homing)
// SINA_POS_DB_1 receive buffer (Drive -> PLC)
"SINA_POS_DB_1".sxRecvBuf.sxEPosZSW1.RTS // bit 12 - controller enable / ready to start
"SINA_POS_DB_1".sxRecvBuf.sxEPosZSW1.RDY // bit 13 - drive ready (EPos ready)
"SINA_POS_DB_1".sxRecvBuf.sxEPosZSW1.IOp // bit 14 - operator panel / no fault
"SINA_POS_DB_1".sxRecvBuf.sxEPosZSW2.RefPSet // bit 11 of r2684 - reference point set
"SINA_POS_DB_1".sxRecvBuf.sxEPosZSW2.ActRefCam // bit 10 of r2684 - reference cam active
Parameter Map for Referencing
| Parameter | Description | Typical Value |
|---|---|---|
| p2595 | BI: Start referencing / activate homing | r2092.7 (EPosSTW1 bit 7, RefStart) |
| p2596 | BI: Set reference point | r2092.2 (EPosSTW2 bit 2) |
| p2597 | BI: Select referencing type | 0 (must be 0 for ModePos = 4) |
| p2598 | CI: Reference point coordinate | Process variable; p2599 typically used as fixed value |
| p2599 | CO: Reference point coordinate value | 0 (machine zero) |
| p2604 | Start direction for reference point approach | 0 = positive, 1 = negative |
| p2606 | Max distance to reference cam / probe | Application-specific (LU) |
| p2608 | Homing velocity to reference cam | e.g. 100 LU/min |
| p2611 | Homing velocity to zero mark / encoder | e.g. 20 LU/min |
| p2612 | BI: Reference cam (Activate reference cam) | r2092.2 (EPosSTW2 bit 2) OR r0722.x (CU DI) |
| r2684 | CO/BO: EPos status word 2 - bits 10 (ActRefCam), 11 (RefPSet) | Read-only status |
| p29240[0] | DI inversion for CU terminals (where x = 0..7) | Per wiring |
p2597 must be set to 0 when ModePos = 4 is used. Any other value routes the homing logic to a different path (e.g. MDI setpoint) and the reference cam will be ignored, leaving the drive stopped mid-sequence.Step-by-Step Referencing Procedure (EPosSTW2 Method)
This sequence reflects the field-proven procedure that successfully completes the homing cycle. The PLC samples the status bits and only advances when the drive confirms each stage.
- Power up and acknowledge faults. Drive must be in "Ready to switch on" state (ZSW1 bit 0 = 1, bit 1 = 1). Clear any pending fault via STW1 bit 7 (acknowledge).
-
Enable the drive and switch to EPos control. Set
OFF1 = 1,OFF2 = 1,OFF3 = 1,Enable = 1in STW1. Wait for ZSW1 bit 2 = "Operation enabled" and ZSW1 bit 8 = "No fault". -
Verify EPos readiness. Confirm that
RTS(EPosZSW1 bit 12),RDY(EPosZSW1 bit 13), andIOp(EPosZSW1 bit 14) are all = 1. If any of them is 0, do not proceed - investigate the cause first. -
Set ModePos = 4. Write 4 into
sxSendBuf.sxEPosSTW1.ModePos. This selects "Reference point approach" mode (active referencing to a cam + zero mark or to the cam edge alone, depending on p0495 and encoder type). -
Wire the reference cam to
SetRefPt. Map the SIMATIC digital input that senses the cam to"SINA_POS_DB_1".sxSendBuf.sxEPosSTW2.SetRefPt. Ladder snippet:
The BICO chain inside the drive automatically mirrorsE10.0 "SINA_POS_DB_1".sxSendBuf.sxEPosSTW2.SetRefPt |------|/|--------------( S )-------------| // NC contact if cam is a normally-closed proximity switch // NO contact if cam is normally-openEPosSTW2bit 2 top2612throughr2092.2, so no drive-side parameter is needed beyond the default. -
Start the homing cycle. Pulse
sxSendBuf.sxEPosSTW1.RefStart(bit 7 of EPosSTW1) high - this drivesp2595which initiates the reference point approach according to p2604..p2608 and p2611. -
Monitor cam activity. Confirm
ActRefCam(r2684.10) toggles when the cam is physically reached. The drive will then run synchronised to the next encoder zero mark (or perform a proximity-based home, depending on configuration) and finally latch the reference coordinate from p2599. -
Detect completion. Homing is complete when
RefPSet(r2684.11, mapped to EPosZSW2 bit 11) becomes 1 and remains 1. Latch this edge in the PLC to enable any subsequent MDI / traversing block moves. -
Reset start flag. Drop
RefStartback to 0 to allow the next cycle. KeepSetRefPtin its current state - the drive latches the cam on every rising edge of p2595.
Alternative: Wire the Reference Cam to a CU Digital Input
If the cam is on a machine where a dedicated SIMATIC digital input is not convenient, the cam can be wired to one of the SINAMICS Control Unit onboard digital inputs. The CU320-2 / CU310-2 terminals X122 / X132 expose DI 0..DI 7 whose status is reported in r0722. To route that to the homing cam, change the BICO source of p2612:
// In STARTER / Startdrive parameter view, expert list:
p2612[0] = r0722.4 // DI 4 on CU terminal X122.7
// or
p2612[0] = r0722.5 // DI 5 on CU terminal X122.8
With this configuration, the cam is read entirely inside the drive; the PLC only needs to start homing via p2595 and read RefPSet from r2684.11. The SetRefPt bit of EPosSTW2 becomes a no-op. This approach minimises PROFINET/PROFIBUS deterministic jitter and is preferred on machines with long cable runs between the cam and the PLC rack.
r722.x notation found in some legacy SINAMICS firmware (V2.x / V4.x on CU310) refers to the same digital-input status word. On CU320-2 with firmware V4.4 or higher, use r0722.x; on older builds use r722.x. Verify with pr r0722 in the expert list.Verification
After completing the homing sequence, perform the following checks before releasing the machine to production:
-
Status word inspection.
r2684.11(RefPSet) = 1 in the parameter view.r2684.10(ActRefCam) returns to 0. -
Encoder feedback.
r2521[0](actual position value) =p2599(reference point coordinate) within one encoder increment. -
Position loop closed. Switch back to a manual jog or MDI move and confirm a small absolute move is accepted without
F07452(drive: position actual value processing error) orF31117(encoder error). -
Power-cycle test. Switch the drive off, then on, and verify that
r2521[0]is invalid (or zero) and the drive refuses absolute moves until the homing sequence is re-run. This proves the incremental encoder path is in use. -
PLC latch. A rising edge of
sxRecvBuf.sxEPosZSW2.RefPSetmust be captured by the PLC. If the bit is permanently 1, the previous homing was completed but the drive has since lost the reference - investigate mechanical issues such as the cam bouncing or wiring faults.
Common Faults and Root Causes
| Symptom | Likely Cause | Corrective Action |
|---|---|---|
| Axis stops immediately after RefStart, RefPSet never sets | ModePos not 4, or p2597 ≠ 0 | Force ModePos = 4; verify p2597 = 0 in expert list |
| Drive runs past the cam without latching | p2612 not connected to a live signal; r2092.2 not being written by the PLC | Trace r2092.2 with the trace function; confirm SINA_POS DB tags are addressed correctly |
| RefPSet toggles erratically during run | Cam signal bouncing; debounce in PLC or use hardware filter on DI | Add input debounce of 10-50 ms; verify cam is not oversized in approach direction |
| F07451 (positioning monitoring error) | Homing velocity or following error limits too tight | Increase p2544 / p2546 temporarily during commissioning |
| F31110 (encoder serial communications failure) | Encoder cable damaged | Inspect DRIVE-CLiQ cable; replace if needed |
| RefPSet = 1 immediately on power up | Persistent reference from a previous session is invalid (only with absolute encoders; should not happen with incremental) | Force re-home; verify encoder type with p0400 |
| EPosSTW2.SetRefPt does not drive r2092.2 | PLC telegram misaligned; bit offset wrong | Check Telegram 111 in device configuration; ensure SINA_POS DB length matches (32 bytes each direction) |
Commissioning Tips
- Always run the homing sequence in a dry-cycle (no load) the first time and verify the direction of approach against p2604. Reversing the direction after wiring is faster than disassembling the cam.
- Use Startdrive's trace to record
r2092andr2684simultaneously during the very first commissioning. This is the fastest way to confirm bit-level wiring. - If the application requires frequent re-homing (e.g. on every cycle), consider a flying homing mode (ModePos = 5/6) using an external zero pulse instead of a dedicated cam.
- For safety-rated homing, integrate the cam signal with the SINAMICS Safety Integrated Extended Functions (SLS, SDI) - the reference cam itself is a normal non-safety signal, but the resulting homed position becomes a safe absolute position when combined with the safety encoder.
Sequence Diagram (SVG)
Related Parameters Quick Reference
The following parameters are most often inspected by a commissioning engineer when homing is misbehaving. All are accessible via the expert list in STARTER / Startdrive (p0009 = 3, p0010 = 0 first).
-
p2595- BI: Start referencing (default: 0). Recommended: r2092.7. -
p2596- BI: Set reference point. Recommended: r2092.2 (EPosSTW2 bit 2). -
p2597- BI: Select referencing type. Must be 0 for ModePos = 4. -
p2598- CI: Reference point coordinate source (default: p2599). -
p2599- CO: Reference point coordinate value (default: 0 LU). -
p2600- Reference point offset, added to latched position. -
p2604- Start direction (0 = positive / 1 = negative). -
p2606- Maximum distance to the reference cam. -
p2608- Homing velocity to reference cam (practical: 5-10% of max axis speed). -
p2611- Homing velocity to zero mark (practical: 1-2% of max axis speed). -
p2612- BI: Reference cam input. -
r2684- CO/BO: EPos status word 2 (bit 10 = ActRefCam, bit 11 = RefPSet).
FAQ
Does the reference cam signal always have to come through EPosSTW2 bit 2?
No. EPosSTW2 bit 2 (p2612 = r2092.2) is the standard route when the cam is wired to a SIMATIC digital input and the engineering team prefers centralised PLC logic. For machines where the cam is local to the drive cabinet, p2612 can be rewired to r0722.x to read a CU onboard DI directly, eliminating PROFINET jitter.
What value does p2597 need to have for ModePos = 4 referencing?
p2597 must be set to 0. Any non-zero value switches the homing logic away from the reference-cam path and the drive will not run the approach sequence. Confirm in the expert list after every parameter download.
Why does RefPSet stay 0 even though the cam is being triggered?
Check three things: (1) ModePos is exactly 4, (2) p2597 is 0, and (3) the SetRefPt bit is actually reaching r2092.2 - use the Startdrive trace on r2092 to verify bit 2 toggles when the cam is hit. Also confirm p2599 is a valid reference coordinate within the axis travel range.
Is Telegram 111 mandatory for SINA_POS homing?
No. SINA_POS supports Telegram 110 (32/32 bytes) and Telegram 111 (32/32 bytes) for EPos. Telegram 111 is the modern Siemens standard for the SINAMICS S120 with EPos and is recommended for new projects, but Telegram 110 with the same control-word layout works equally well for homing.
How can I confirm the drive is using an incremental encoder and therefore needs homing on every power-up?
Check p0400 (encoder type selection) and r2521 (current actual position value). With an incremental encoder, r2521 is invalid or 0 after a power cycle and the drive rejects absolute moves with fault F07452 until a successful homing cycle sets RefPSet. The Startdrive / STARTER operator panel shows a red "Homing required" indicator in this state.