FM357-2 Zero Mark Reference Inconsistency with SINAMICS S120
1. Problem Description
When a SINAMICS S120 is connected to an FM357-2 via a TM41 terminal module and the referencing (homing) sequence is executed, the FM357-2 detects a zero mark from the BERO/limit-switch homing event, but the resulting machine zero is not reproducible. Two consecutive referencing cycles on the same physical axis return a different coordinate value. The system appears to home correctly, but the stored reference point shifts by a fraction to several motor revolutions on every cold start or warm restart.
Symptoms reported in the field:
- Zero mark is found every time the referencing sequence runs.
- The captured position differs run-to-run by one (or more) TM41-emulated TTL line counts.
- The error becomes visible only after power-off / power-on, not during a single session.
- Machining programs that depend on an absolute reference point produce incorrect part dimensions or scrap on the first part after restart.
2. Root Cause Analysis
Three independent causes contribute to the inconsistency. Each must be eliminated for a stable reference.
2.1 EnDat Encoder Cannot Provide a Marker Pulse
The 1FK7022-xAK7x-xLxx motor carries an EnDat absolute encoder. EnDat is a purely serial protocol; the encoder does not output a 1 Vpp zero/reference pulse in the same way an incremental encoder does. When the FM357-2 is configured to expect a hardware zero mark from this signal chain, the position controller can only see a BERO-switch transition, not a true encoder zero. Siemens explicitly states in the FM 357-2 product documentation that the module was designed for the Simodrive 611U and MasterDrives 6SE70 drive families. SINAMICS S120 was added later, and the homing model still depends on a marker pulse that the EnDat channel cannot supply natively.
2.2 TM41 Emulated Incremental Resolution Mismatch
The TM41 receives its actual-value information from the S120 over Drive-CLiQ and re-emits an incremental A/B track (TTL) to the FM357-2. The TM41's pulse configuration has a minimum incremental resolution of 1024 pulses per revolution; the value 512 is not selectable in the standard TM41 parameter set. The FM357-2 is configured for 512 pulses per motor revolution (matching the EnDat line count). The 2:1 ratio forces the motor to rotate two encoder revolutions for every one FM357-2 unit, and the extra internal interpolation step inside the TM41 is what produces a non-deterministic zero-pulse position relative to the BERO event.
| Parameter | FM357-2 Setting | TM41 Setting | Effective Ratio |
|---|---|---|---|
| Pulses per motor revolution | 512 | 1024 (minimum) | 1:2 (motor : FM357) |
| Encoder type | Incremental (TTL, A/B + Z) | Emulated A/B from EnDat | Marker pulse synthesized, not real |
| Homing reference | BERO + zero mark | No native marker | BERO transition only |
2.3 Analog Drive Interface Is the Only Supported Path
According to the Siemens application note (entry ID 28422478 in the Siemens Industry Online Support), a SINAMICS S120 cannot be connected to the FM357-2 over PROFIBUS-DP. Only the analog drive interface is supported today. The TM41 is required for the speed setpoint / actual-value loop (one TM41 per axis), and a TB30 can be added on the CU320 for an additional 2-channel analog connection when a machine encoder is also needed. This restriction is the architectural reason the marker-pulse / BERO workaround is the only reference option on a strictly analog interface.
3. System Architecture
Use the topology below to verify wiring before debugging software. The FM357-2 sits on the S7 backplane, the TM41 sits on the SINAMICS DRIVE-CLiQ ring next to the CU320, and the motor's EnDat feedback is read by the S120 Motor Module and mirrored through the TM41 as a TTL signal back to the FM357-2 X2 encoder input.
The actual connection diagram (TTL chain from S120 to FM357-2):
4. Prerequisites
- Firmware: FM357-2 with firmware version that supports path control mode and the relevant standard telegram 111 handling (see the FM 357-2 product brief PDF for the module's functional scope).
- SINAMICS S120 with CU320 (firmware V2.x or later as installed in the system) and a TM41 on the DRIVE-CLiQ ring.
- 1FK7 motor with EnDat 2.1/2.2 absolute encoder, 512 S/R, 4096 revolutions multiturn (catalog order code suffix
-xAK7x-xLxx). - Starter / SCOUT project with telegram 111 (positioning mode) or telegram 1 (speed control) configured for the axis on the S120.
- FM357-2 configuration file open in the SIMATIC S7 configuration tool with the encoder screen reviewed.
5. Step-by-Step Resolution
The procedure below documents the field-confirmed fix. It avoids the unrepeatable zero mark by abandoning marker-pulse homing on the FM357-2 and instead uses the SINAMICS drive's own homing routine plus a CNC-side reference offset.
Step 1 - Stop trying to read a marker pulse from the EnDat chain
In the FM357-2 encoder configuration, do not enable "zero mark evaluation." Switch the homing mode from "reference point approach with zero mark" to a mode that only uses the BERO edge (or a software homing bit on the FM357-2). The EnDat stream has no real Z pulse; any Z event the FM357-2 sees is an interpolation artifact of the TM41.
Step 2 - Match the pulse count on the FM357-2 to the TM41
Set the FM357-2 to the same line count the TM41 actually outputs. In Starter, navigate to the TM41 drive object and read the parameter that selects the emulated encoder resolution. The minimum is 1024. Set the FM357-2 encoder pulses parameter to 1024 to match. The motor will then have to move exactly one TM41-emulated revolution per one FM357-2 revolution, eliminating the 1:2 mismatch.
FM357-2 MD (encoder screen)
Axis 1 encoder pulses per revolution : 1024
Reference mode : BERO edge only (no Z)
Direction of rotation : as per machine
Step 3 - Configure Telegram 111 on the SINAMICS S120
Use telegram 111 between the S120 and the higher-level controller. Telegram 111 carries the position actual value, speed setpoint, position setpoint, and the relevant control/status bits (MDI, homing, jog, fault reset). It is the standardized telegram for positioning drives on the SINAMICS platform and is the telegram under which the drive's internal homing routine is invoked from a master controller.
Starter > Drive navigator > Communication > Telegram configuration
Telegram type : Standard telegram 111
Mapping direction Out : STW1, PosStw, Override, MDI_TarPos, MDI_Velo, MDI_Acc, MDI_Dec
Mapping direction In : ZSW1, PosZsw, XistP, XistA, ActVel, MdiStatus
Step 4 - Run the drive's own homing routine
Issue a homing command to the SINAMICS drive. The drive executes the homing profile referenced to its own motor encoder (EnDat, no Z-pulse required) and writes the resulting machine zero to the XistA position actual value. This value is the true, repeatable zero because it comes from the absolute EnDat measurement, not from a synthesized TTL zero mark.
CNC / PLC side - start SINAMICS homing
PosStw.bit 11 = 1 // Homing active
PosStw.bit 13 = 0 // Operating mode: homing
PosStw.bit 15 = 0 // No follow-up mode
// Wait for ZSW1.bit 10 (homing complete) to be set by the drive
Step 5 - Write the reference into the FM357-2 as a zero offset
When the drive reports homing complete, capture the actual position and force the FM357-2 to latch it as the reference point. In the FM357-2 CNC program, set a machine zero offset or use the SETMS / G74 reference-point approach sequence so the FM357-2 stores 0 at that physical location.
FM357-2 CNC program (after SINAMICS reports homing done)
N10 G74 Z0 ; Reference point approach on axis Z
N20 G92 X0 Y0 Z0 ; Define current position as the new reference
Step 6 - Persist the reference without cycling the PLC
Use the FM357-2 control word bit "Set reference point" (also available as an MD-driven function) to write the reference into the module's non-volatile memory. A PLC power-off / power-on is not required. The reference is updated by the CNC program block as part of the same homing sequence; on the next cold start the same machine zero is reused.
S7 PLC (FB) - reference hand-over
IF Sinamics_Homed AND NOT FM357_Reference_Stored THEN
FM357_Axis1.Cmd_SetRefPoint := TRUE; // writes current PosZsw value as the new reference
FM357_Axis1.Cmd_EncReset := TRUE; // resets the encoder counter to 0 at the homed position
END_IF;
6. Encoder and Homing Parameter Mapping
| Item | Setting | Source / Justification |
|---|---|---|
| TM41 emulated line count | 1024 ppr minimum | TM41 parameter lower bound |
| FM357-2 encoder line count | 1024 ppr (matches TM41) | Avoids 1:2 motor:FM ratio |
| Zero mark evaluation (FM357-2) | OFF | EnDat has no real Z pulse |
| BERO mode | Edge-triggered home signal | Used only as a coarse gate, not a reference |
| SINAMICS telegram | 111 | Positioning-mode standard telegram |
| Homing routine | Drive-internal (EnDat absolute) | Repeatable to 1 encoder increment |
| FM357-2 reference store | NC program + SetRefPoint bit | Eliminates PLC power cycle |
7. Why the Original "BERO + Zero Mark" Approach Was Unstable
The homing path used in the original installation relied on three sub-steps:
- BERO edge starts the deceleration window.
- First subsequent TTL zero mark is captured as the reference.
- FM357-2 sets the actual position to a configured machine-zero value.
Step 2 fails repeatably because:
- The TM41-emulated Z pulse is reconstructed from S120 internal position; it has no fixed mechanical relationship to the BERO event.
- The 512/1024 line-count mismatch means a fractional additional revolution of the motor occurs between BERO and the next synthesized Z.
- On power-off, the TM41 loses its position context; the next power-on re-initializes the emulated Z with an unknown phase, so the first run lands at a different Z than the previous run.
The fix replaces step 2 with the drive's own absolute homing. The drive reads the EnDat absolute value at the homed position; the value is repeatable because EnDat absolute is, by definition, a closed-loop absolute measurement that survives power cycles.
8. Verification
Execute the verification matrix in order. The reference is considered stable only when all four checks pass.
| Check | Command / Action | Expected Result |
|---|---|---|
| V1 - Homing repeatability (cold) | Power off, wait 10 s, power on, run homing 5 times | Reference point coordinate identical within +/-1 increment |
| V2 - Homing repeatability (warm) | Run homing 10 times consecutively | Reference point coordinate identical, no PLC restart |
| V3 - Telegram health | Read ZSW1.bit 10, PosZsw bits, XistA live value | ZSW1.10 toggles once per homing cycle; XistA matches G74 reference |
| V4 - Drift over shift | Power off, leave overnight, repeat V1 the next morning | Reference point coordinate matches previous day within +/-1 increment |
Diagnostic register readback on the FM357-2:
; Read encoder status word and decoded actual position
L PEW 288 ; FM357-2 status word axis 1 (channel 0)
T MW 100
L PED 292 ; Encoder actual position, 32-bit
T MD 104
; Compare MD 104 to the stored reference value in MD 200
; If (MD104 - MD200) > 1 increment, raise Drift_Latch_Alarm
9. Common Pitfalls and How to Avoid Them
- Mixing encoder line counts. Setting 512 on the FM357-2 and 1024 on the TM41 "to keep the numbers small" reintroduces the same drift. Always match the two values.
- Re-enabling marker-pulse homing after firmware update. FM357-2 firmware can default to "zero mark + BERO" on a fresh parameter set. Re-apply Step 1 after every firmware reload.
- Stopping the PLC to clear the reference. The reference should be set by NC program, not by a power cycle. A power cycle destroys the SetRefPoint latch and reintroduces a random Z-phase value.
- Using TB30 instead of TM41 without reading CU320 limitations. The TB30 only provides two analog inputs and no TTL encoder emulation. It is a viable path for a machine encoder, not a motor encoder.
- Connecting SINAMICS to FM357-2 over PROFIBUS-DP. Not supported by Siemens for the FM357-2 product as published. Use the analog/TM41 path as documented.
10. FAQ
Can a SINAMICS S120 be connected to the FM357-2 over PROFIBUS-DP?
No. According to Siemens application support (entry ID 28422478), the SINAMICS S120 can only be connected to the FM357-2 via the analog drive interface. Use one TM41 per axis for the speed setpoint/encoder emulation path; add a TB30 on the CU320 if a separate machine encoder is also required.
Why does the FM357-2 not see a real zero mark from my 1FK7 EnDat motor?
EnDat is a serial absolute-only protocol. It does not transmit a 1 Vpp zero/reference pulse. The TM41 synthesizes a Z event from the S120 internal position, but the synthesized Z has no fixed mechanical relationship to the BERO homing event, so the captured reference is not reproducible. Use the drive's own EnDat-absolute homing instead of marker-pulse homing on the FM357-2.
What is the minimum emulated pulse count the TM41 can produce?
1024 pulses per revolution. Configure the FM357-2 to the same 1024 ppr value to avoid a fractional revolution between the BERO event and the captured reference.
Which standard telegram should I use for SINAMICS homing from an FM357-2?
Telegram 111 is the standard positioning-mode telegram and is the recommended choice for invoking the drive's built-in homing routine. The drive sets ZSW1.bit 10 (homing complete) and updates XistA (position actual) with the absolute EnDat-derived value at the home position.
How do I store the reference in the FM357-2 without power-cycling the PLC?
Use the NC program block G74 + G92 to approach the reference and set the coordinate to zero, then assert the FM357-2 control-bit "Set reference point" (with EncReset) to latch the new reference. The reference persists across the next cold start without requiring a power cycle.
For a complete description of the FM357-2 functional scope, the SIMATIC FM 357-2 product brief (PDF) is available on Siemens Industry Online Support at Product_Brief_FM357-2_01_2003.pdf, and the official FM357-2 manual plus the analog-interface application note (entry ID 28422478) cover the wiring, parameter set, and supported telegram configurations in detail.