Problem Overview
On a 3-axis Cartesian robot built around a Siemens S7-300 CPU 315 with an FM positioning module and a SIMODRIVE 611 drive (catalog family 6SN1118-…) on the Z-axis, the following fault pattern is observed after a complete power loss combined with a discharged CPU backup battery:
- Z-axis actual position reported by the FM module jumps to an incorrect value (e.g., 8725 increments instead of the expected 1505 when the axis is mechanically at the top limit).
- Drive display on the SIMODRIVE 611 shows no native alarm, but the FM module raises Alarm 10621 and one or both of the drive-coupled alarms 25000 / 25040.
- X and Y axes (absolute encoders on Siemens motors) hold their position correctly across the same power cycle.
- Temporary recovery: physically lower the Z-axis by 10–20 cm, execute FM RESTART, reset the alarm, repeat FM RESTART – the position value then snaps back to the correct value (e.g., 8725 → 1300).
- Swapping the SN1118 card does not clear the fault.
The X/Y axes surviving the event while Z drifts is the diagnostic fingerprint: only the Z-axis reference path has been disturbed. The fault is not in the drive itself, it is in the reference / absolute-position handshake between the FM module, the SIMODRIVE 611, and the SSI absolute encoder.
System Configuration and Affected Components
| Component | Identification | Role in the Fault |
|---|---|---|
| S7-300 CPU | CPU 315 (e.g., 6ES7315-2EH14-…) | Backup battery discharged → RAM/Persistent data lost on power fail |
| FM positioning module | FM351 / FM354 family (slot in S7-300 rack) | Stores axis reference point and absolute-position offset in internal RAM |
| SIMODRIVE 611 | 6SN1118-0DHxx / -0DKxx power module + control board | Hosts absolute-encoder evaluation; raises 25000 / 25040 if following error / referencing inconsistent |
| Absolute encoder | Siemens SSI absolute encoder on Z motor | Multi-turn + single-turn position; validity depends on encoder battery / drive buffer |
| HMI / PG | STEP 7 V5.x / TIA (legacy mixed) | Used to read FM diagnostic buffer, drive parameters, and trigger FM RESTART |
The combination of an FM module in an S7-300 with a SIMODRIVE 611 is typical for retrofit Cartesian robots, packaging machines, and press-feeding gantries. The interface between FM and drive is either analog setpoint + encoder feedback, or PROFIBUS with drive telegram (standard telegram 3 or 5) for closed-loop position.
Decoding the Alarm Codes
| Alarm | Origin | Meaning in This Context | Cleared By |
|---|---|---|---|
| 10621 | FM positioning module (OB1 / mode-group error) | "Axis not referenced" or "Reference point lost" – the FM module's stored absolute offset no longer matches the encoder's mechanical zero within tolerance. | Successful re-referencing sequence (FM RESTART after physical move into reference region) |
| 25000 | SIMODRIVE 611 (axis alarm) | Generic drive alarm; with following-error context usually means the FM module closed the position loop against an offset value the drive considered illegal. | Axis reset + acknowledged re-reference |
| 25040 | SIMODRIVE 611 (positioning monitoring) | Standstill / following-error monitoring tripped. The drive detected the commanded position diverging from the encoder feedback beyond the configured window. | Drive reset after reference is restored |
Root Cause Analysis: Absolute Encoder Reference Drift
An FM module does not "track" the absolute encoder continuously the way a SINUMERIK does. Instead, it stores a reference point offset (the mechanical position corresponding to the absolute encoder value at the moment of referencing). On every power-up the FM module:
- Reads the actual SSI absolute encoder value via the drive.
- Subtracts the stored reference-point offset.
- Reports the resulting axis position to the PLC program.
If the CPU battery dies before the next power fail, the FM module loses its stored offset but the drive may still hold a valid absolute encoder value. After battery replacement and power-on, the FM module re-initializes with a default offset (typically zero or the last value mirrored from the PLC's retentive DB). Because the X/Y axes still appear correct, their absolute encoders and offsets are stored in a different memory domain (often on the drive itself with its own buffering). The Z-axis in this configuration stores the reference offset in the FM module's RAM only – which is exactly what was wiped.
The reading of 8725 instead of 1505 is the algebraic difference between the true encoder absolute value and the lost offset. Mathematically:
Reported_Position = Encoder_Absolute - Lost_Offset
8725 = Encoder_Absolute_top - Lost_Offset
1505 = Encoder_Absolute_top - Correct_Offset
Therefore Lost_Offset − Correct_Offset = 7220 increments – a constant bias introduced by the memory loss. When the operator manually jogs the axis down 100 mm and executes FM RESTART, the FM module re-evaluates the absolute encoder value against the soft-limit / reference-region criterion and re-acquires a usable reference point, collapsing the 7220-increment bias to zero.
Why the Manual Workaround Functions
The "lower axis 10–20 cm → FM RESTART → axis OK" sequence works for three combined reasons:
- Reference-region entry. The FM module only re-acquires the absolute encoder reference when the axis is moved into a configured reference region (typically near the mechanical home position). The operator's 10–20 cm jog is enough to leave the ambiguous zone at the upper soft limit.
- Soft-limit release. As the discussion correctly identifies, the Z soft limit was actively preventing the FM module from trusting the encoder read. Once the axis is back inside the working envelope, the FM module accepts the encoder value as valid.
- FM RESTART clears the 10621 / 25040 alarms and forces the FM module to re-read the absolute encoder through the drive telegram – at which point the bias (the lost offset) is recomputed from the current mechanical position rather than the corrupted mirror.
This workaround is safe to use as an emergency production recovery but it is not a permanent fix: the FM module is now operating with a recovered offset that may not exactly match the original mechanical home, so absolute repeatability on power-cycle is degraded.
Diagnostic Procedure
Before applying any reset, gather hard evidence. Connect to the system with STEP 7 (or the relevant HMI) and collect the following.
Step 1 – Read the FM module diagnostic buffer
In HW Config → FM module → Module Information → Diagnostic Buffer, look for:
- Entry "Reference point lost" with timestamp matching the last power-on.
- Entry "Absolute encoder value out of range" – indicates the encoder's multi-turn count is implausible (multi-turn overflow since last reference).
- Entry "Following error in positioning mode" – confirms the FM's commanded vs. actual diverged.
Step 2 – Read the absolute encoder value at a known mechanical position
Mechanically clamp the Z-axis at a known, repeatable height (a calibrated gauge block under the tool plate is ideal). From the SIMODRIVE commissioning software (SimoCom U / SimoCom A) or via the drive's parameter display, read:
-
MD1011– actual encoder value (singleturn) -
MD1012– actual encoder value (multiturn) -
MD1013– absolute encoder window (acceptable deviation between stored and read value)
Compare with the values recorded at the original commissioning (these should be in the machine's documentation). If MD1011 / MD1012 are valid but the FM still shows a wrong position, the FM-side offset is corrupt, not the encoder.
Step 3 – Check the encoder battery on the SIMODRIVE
SIMODRIVE 611 modules using absolute encoders typically require a 3.6 V lithium battery on the drive itself, separate from the S7-300 CPU battery. If both batteries were depleted simultaneously, the encoder's multi-turn counter wrapped around – the reported absolute value is now off by an integer number of full revolutions. Count the Z-axis mechanical travel from the top soft limit to the bottom and compare with the FM's expected full travel in increments: if the discrepancy is a near-integer multiple of the single-turn resolution, this confirms a multi-turn rollover.
Step 4 – Capture the current alarm state from the drive
Use SimoCom U to read the alarm history (Service → Alarm History). Even when the display shows no current alarm, the history retains 25000 / 25040 entries with the precise axis position at trigger time. Confirm that the trigger position matches the position at which the FM raised 10621.
Permanent Resolution: Re-Referencing the Axis
The goal is to make the FM module's reference offset match the encoder's true mechanical zero, then store that offset retentively so it survives the next battery event.
Step A – Mechanical preparation
- Support or brake the Z-axis mechanical load.
- Move the axis to a position safely inside the working envelope, ideally near the configured reference point (check the FM configuration for "Reference point coordinate").
- Clear all drive and FM alarms from STEP 7.
Step B – Execute the FM referencing sequence
The exact sequence depends on the FM type. For an FM351 with an absolute SSI encoder, the standard procedure is:
- Set the Mode byte for the axis to
16#05(Referencing). - Set the Control bit "Start referencing" (
START_TLG) in the axis DB. - Wait for the axis to drive to the reference cam, back off, and capture the encoder zero pulse / absolute reference.
- Monitor the Status byte – referencing completes when bit "Referenced" is set and Alarm 10621 is gone.
For an FM354 (servo, SSI encoder), the sequence is functionally identical but driven through the FM's standard function blocks FB POS_Ax / FB DIAG and the mode field accepts B#16#14 (homing). Refer to the FM-specific manual for exact DB offsets.
Step C – Verify the recovered offset
With the axis at the top of travel, the FM-reported position must equal the value documented at commissioning (1505 in the field case). If it differs by a constant, the FM Axis-Data DB needs a one-time correction of the Distance per encoder revolution and/or the Reference point coordinate parameters.
Step D – Make the offset retentive
The FM module stores the reference offset in its own non-retentive memory in older firmware versions (≤ V3.x). To survive a CPU battery fault:
- Mirror the offset into a retentive DB in the CPU (mark DB as retentive in STEP 7: Block Properties → Retain → Retain Memory).
- On PLC startup (OB100 / OB101), copy the retentive DB value back into the FM's data area before the FM is released to RUN.
- Alternative: replace the FM's firmware with a version (≥ V4.x for FM351, ≥ V3.x for FM354) that supports a non-volatile reference memory backed by the rack's 24 V and a small supercap – verify with the FM's manual whether your version supports this.
FM Module Parameter Verification
| Parameter | Typical Value | What to Check |
|---|---|---|
| Encoder type | SSI absolute | Must match the physical encoder. A misconfigured "incremental" type silently resets the position on every FM RESTART. |
| Encoder resolution | e.g., 4096 incr/rev (singleturn), 4096 revs (multiturn) | Must equal the encoder's datasheet value. A wrong value here is the most common cause of constant bias similar to the 7220 increment seen. |
| Reference point coordinate | OEM-set | Matches mechanical home. Recorded in commissioning log. |
| Reference approach direction | Positive / Negative | Must match the direction the axis physically travels to the reference cam. |
| Soft limits (positive / negative) | ± machine envelope | If soft limit is too tight, the FM will refuse to reference even after the jog. |
| Following error window | OEM-tuned | If too tight, normal re-referencing motion will trip 25040. |
The FM module parameters live in the CPU's Axis DB. Compare the live values against the commissioning backup using STEP 7's Compare Blocks (offline vs. online). Any mismatch is suspect.
Drive-Side Encoder Configuration Check (SIMODRIVE 611)
| Drive Parameter | Function | Field-Check |
|---|---|---|
| MD1010 | Encoder type selection (singleturn / multiturn absolute / incremental) | Must match the physical encoder. Wrong setting forces the drive to interpret the encoder output as a different format. |
| MD1011 / MD1012 | Current encoder position (singleturn / multiturn) | Read while at a known mechanical position; compare with commissioning record. |
| MD1013 | Absolute encoder adjustment window | If 0, the drive rejects any absolute read that doesn't match the stored value exactly – adjust within a few increments. |
| MD1161 / MD1162 | Following-error monitoring limits | Should be wider than the expected error during the re-referencing move, then tightened again post-commissioning. |
| MD1700 | Drive firmware version | Older versions (< V11) have known bugs in absolute encoder handling after power-on. Upgrade to the latest field-tested version. |
Preventive Measures
- Replace the CPU battery on schedule. Siemens specifies a 1-year typical service life for the S7-300 backup battery (6ES7971-0BA00). Mark the replacement date on the cabinet.
- Add a UPS or buffered 24 V on the rack so the FM module has time to write its reference memory to retentive storage during a power loss.
- Mirror the FM reference offset to a retentive DB on every successful homing cycle (write it from OB1 when the "Referenced" status bit is set).
- Fit a SIMODRIVE battery or external encoder buffer to the absolute encoder. The SIMODRIVE 611 encoder battery is independent of the CPU battery; both must be maintained.
- Alarm-monitor the 10621 / 25000 / 25040 combination in the PLC. When it triggers on a machine that was just power-cycled with a known-good battery, treat it as an encoder referencing event – not as a drive fault.
- Document the commissioning-time encoder values (MD1011, MD1012 at the top soft limit) and store them in the machine's technical file for direct comparison after any power-loss event.
Verification Checklist
- Power off the cabinet. Wait 30 seconds. Power on.
- Confirm no 10621, 25000, or 25040 alarms appear within 5 seconds of FM start-up.
- Confirm the Z-axis reported position at the upper soft limit matches the commissioning value within ±2 increments.
- Jog Z-axis from top to bottom at maximum rapid traverse; observe following error stays inside the configured window on the drive trace.
- Issue a programmed positioning move to a mid-travel target; verify arrival at commanded coordinate ±1 increment.
- Repeat a power-cycle three times consecutively; position must remain stable to within the documented absolute accuracy of the encoder.
- Check the FM module diagnostic buffer is clean except for expected power-on entries.
Extended Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| Position off by exact integer number of revolutions | Encoder multiturn rollover from dead battery | Drive-side absolute encoder adjustment; redo referencing |
| Position off by a constant bias every power-on | Lost FM reference offset (RAM wiped) | Re-reference; mirror offset to retentive DB |
| Position correct for 5–10 min after restart, then drifts | Encoder cable noise / grounding issue | Check shielding, ground loops, encoder connector pins |
| Position correct, but 25040 trips immediately on motion | Following-error window too tight for re-referencing move | Temporarily widen window during re-referencing, then restore |
| 10621 persists even after FM RESTART and motion | Encoder value outside FM's configured plausibility range | Check FM "Encoder resolution" and "Reference point coordinate" parameters against the commissioning record |
| Alarm clears only when X/Y moved together with Z | Shared reference memory corruption (rare) | Check for cross-talk on the encoder bus; inspect PROFIBUS termination |
| New SN1118 card exhibits same fault | Fault is in parameter set, not hardware | Offline/online compare of FM Axis DB; restore from commissioning backup |
Field-Proven Caveats
- Swapping the SN1118 drive module does not fix the issue. The drive is downstream of the FM module's reference logic – it merely reports what the FM commands. If the parameter set in the CPU was not part of the swap, the same fault reappears.
- The "workaround" sequence is production-safe but masks a parameter drift that will compound over multiple power cycles if not formally re-referenced. Treat the workaround as a band-aid, not a cure.
- Do not attempt to "clear" the alarms via the drive alone. The 25000 / 25040 alarms on the drive are downstream of the FM's 10621 – they will re-trigger within milliseconds of the next commanded motion.
- Always read the encoder value at a known mechanical position. Without a calibrated reference, any "fixed" offset is just another arbitrary number. The calibrated gauge-block test is the only way to confirm the absolute accuracy of the recovered position.
Related Standards and Documentation
- SIMODRIVE 611 digital – Function Manual (Siemens Knowledge Base, covers alarms 25000 / 25040 and absolute encoder handling)
- FM351 / FM354 Positioning Module – Manual (Siemens Knowledge Base, references mode and Axis DB layout)
- S7-300 CPU 31x – Operating Instructions (battery service interval and retentive memory layout)
- SINUMERIK / SIMODRIVE absolute encoder – Commissioning Guide
FAQ
What does Alarm 10621 mean on an S7-300 FM positioning module?
Alarm 10621 indicates that the FM module has lost its reference point – the stored offset between the SSI absolute encoder's zero and the mechanical home position no longer matches the live encoder value. It is raised when the CPU backup battery dies, after an FM cold start, or when the absolute encoder's plausibility window is exceeded.
Why does my Z-axis position read 8725 instead of 1505 after a power loss?
The 7220-increment bias is the algebraic difference between the true encoder absolute value and the offset that was lost from the FM module's RAM. The X/Y axes survived because their offsets were stored in a different (still-buffered) memory domain; only the Z-axis reference in the FM module was wiped by the discharged CPU battery.
Why does lowering the Z-axis by 10–20 cm and pressing FM RESTART recover correct position?
The jog moves the axis out of the upper soft-limit / ambiguous region into a zone where the FM module will accept the absolute encoder read, and FM RESTART clears the 10621 / 25000 / 25040 alarms and forces the FM to re-read the encoder. Together these actions let the FM recompute a valid reference offset for the current mechanical position.
Does replacing the SN1118 (SIMODRIVE 611) module fix the issue?
No. The 6SN1118 SIMODRIVE module is downstream of the FM positioning module's reference logic – it only reports what the FM commands. If the CPU parameter set (FM Axis DB, reference point coordinate, encoder resolution) is unchanged, the same fault returns on the next power cycle. The fix is at the FM / parameter level, not the drive hardware.
How do I prevent this fault from recurring after a CPU battery replacement?
Replace the CPU battery on schedule, mirror the FM reference offset to a retentive DB in the CPU and restore it on startup (OB100/101), and verify the SIMODRIVE 611 encoder battery separately. A buffered 24 V supply or UPS lets the FM write its reference to non-volatile memory during power loss.