Resolving Simotion Absolute Encoder Zero Drift on Cam-Synchronized Axes
When a Simotion Technology Object (TO) axis coupled to a planetary or cycloidal gearbox shows progressive deviation between the absolute encoder zero and the true mechanical zero on the load side, the fault is almost always located in three places: the Mechanics parameterization of the TO, the Modulo configuration, and the absence of a load-side position reference. This reference walks through the field-diagnosed root cause, the correct Siemens-recommended configuration, the absolute value adjustment procedure, and a hard-verification method that eliminates drift over millions of motion cycles.
1. Problem Description
The reported symptom pattern is characteristic:
- Initial homing via the Simotion control panel sets the encoder to 0.0 at the chosen reference mark on the gearbox output shaft.
- After 10 to 15 mechanical cycles of the load, the same encoder position no longer coincides with the original physical mark on the reductor.
- A second PROFIBUS absolute encoder mounted directly on the output shaft confirms the discrepancy; the motor-side zero leads the load-side zero by a growing angular offset.
- The axis is geared to a master via a cam, so any zero slip translates into a phase error of the synchronization.
The reported hardware stack is:
| Component | Part Number / Designation | Key Parameter |
|---|---|---|
| Servomotor | 1FK7060-XAF7X-XFXX | Synchronous, absolute-capable |
| Motor encoder | 6SL3055-0AA00-5Mx (rotary, 2048 sin/cos, 1 Vpp, A/B + EnDat, multiturn 4096) | 2048 lines, 4096 revolutions absolute |
| Gearbox ratio | 79.95 (motor : load) | 2 load revolutions ≈ 1 cam machine cycle |
| TO type | TO axis / External Encoder / Cam | Modulo axis, cam-coupled to master |
2. Root Cause Analysis
Three independent contributors create the drift. All three are typically present in this exact configuration.
2.1 Incorrect Mechanics Parameterization
The reported Mechanic configuration is 79.95 × 360 / 2 = 14391 degrees entered as a single ratio value, with the rest of the Mechanic tab left at defaults. The fundamental issue is conceptual: the Mechanic tab expects two independent values for the gear stages, not a pre-multiplied angle. Siemens defines the relationship as:
n_motor × Load_Gear_Numerator = n_load × Load_Gear_Denominator
With a ratio of 79.95 motor revolutions per 1 load revolution, the correct entries are:
| Mechanic Parameter | Value | Notes |
|---|---|---|
| Load gear numerator | 79.95 | Motor revolutions (or any proportional equivalent) |
| Load gear denominator | 1 | Load revolutions |
| Encoder revolutions (measuring gear numerator) | 1 | Motor revolutions for the encoder |
| Load revolutions (measuring gear denominator) | 1 | Encoder is mounted on the motor shaft |
| Position units | Degrees | User units |
If the ratio is non-integer (e.g. 79.95), use the exact decimal Siemens accepts, or scale to a numerator/denominator pair that yields a matching precision (e.g. 7995/100). Avoid fusing the ratio with the modulo value; they are independent concepts.
2.2 Modulo Range Larger than Encoder Measuring Range
The reported Modulo is 0 to 14391 degrees. For a single-turn 2048-line encoder read through sin/cos interpolation, the encoder's intrinsic measuring range is exactly one motor revolution. When the load modulo range crosses the encoder's single-turn zero on every cycle, the TO will internally re-resolve the position and an apparent offset of 1 / n can be observed each time the zero crossing is passed.
Siemens' TIA Portal V20 documentation for S7-1500 / S7-1500T absolute value adjustment states the constraint clearly:
Source: Absolute value adjustment (S7-1500, S7-1500T) - TIA Portal V20
The same logic applies to Simotion TO axes: the working range in load units must not span an encoder zero crossing unless a non-integer ratio guarantees that it never lands on the mechanical zero. With ratio 79.95, the motor zero crossing happens every ~4.5° of load rotation, so the load Modulo of 0 to 14391° crosses 3192 encoder zero points per cycle. Each crossing is a candidate for sub-LSB jitter.
2.3 Gearbox Backlash and Reversal Error
Even with a perfect TO configuration, backlash in the 79.95:1 planetary stage introduces reversal error of typically 3 to 15 arc-minutes on the load shaft, accumulated across 1/79.95 of a motor revolution per reversal. With absolute encoders, this error manifests as a stable offset between motor-encoder zero and load zero, not a growing drift, but it is confounded with #2.2 above. Over hundreds of reversals the apparent error can appear to grow.
3. Correct TO Configuration Procedure
3.1 Prerequisites
- Simotion Scout V4.5 / V5.x or TIA Portal with Simotion extension, project consistent with firmware.
- Active commissioning access to the TO axis (online mode, control panel enabled).
- Mechanical reference mark on the gearbox output shaft, referenced to a known machine feature.
- Second encoder reference (PROFIBUS DP absolute encoder on the load shaft) is strongly recommended for verification, not strictly required for first-pass configuration.
3.2 Step-by-Step Mechanic Tab Configuration
- Open the TO in Simotion Scout / TIA, navigate to Configuration > Mechanics.
- Set Position units to
Degrees. - Under Load gear enter
Number of motor revolutions = 79.95andNumber of load revolutions = 1. - Under Measuring gear enter
Encoder revolutions = 1andLoad revolutions = 1(encoder is on the motor shaft). - Leave Mechanical inversion of direction per the physical rotation test; verify by jogging the motor and observing the actual sign on the load.
- Save and download to the TO.
3.3 Step-by-Step Modulo Configuration
- Navigate to Configuration > Modulo.
- Enable Modulo axis = TRUE.
- Set Modulo range start =
0.0°. - Set Modulo range length =
360.0°— this is the operating region on the load, not the gear ratio. - For cam cycles that physically exceed 360°, either accept the 0–360° modulo and use a multi-turn virtual axis as the master for the cam, or leave the axis linear (non-modulo) and apply the cam over the linear range.
4. Absolute Value Adjustment (Initial Homing)
With a correctly parameterized absolute encoder, homing is performed exactly once after commissioning. Per the Siemens TIA Portal V20 absolute value adjustment documentation, the procedure is:
- Move the axis to the mechanical reference mark using a safe jog velocity.
- Read the actual encoder position via the TO online diagnostic (Diagnostics > Actual values).
- On the control panel, click Absolute adjustment and enter the target position in load units (typically
0.0). - Confirm. The TO sets the homing mark internally and persists it across power cycles.
For a Simotion axis the equivalent programmatic entry is:
{ST snippet - apply once at commissioning}
// Read current actual position in load units
_axisPos := TO.SpeedAxisName.actualPosition; // in load units (degrees)
// Issue absolute adjustment
retVal := _setAbsolutePosition(
axis := TO.SpeedAxisName,
position := 0.0, // target load position
mode := ABSOLUTE_ADJUSTMENT_DIRECT
);
The homing should never be re-issued during normal operation. If the application logic contains a routine that calls _setAbsolutePosition or sets TO.PositioningAxis.HomingMode from a button or cycle, gate it behind an inMachineState > 20 lockout and a confirmation prompt.
5. Eliminating Drift with a Load-Side Encoder
The most robust solution is to add an external encoder on the load shaft and use it as the actual position source for the TO. In Simotion:
- Add a TO ExternalEncoder to the project; assign the PROFIBUS DP absolute encoder node.
- Open the TO axis, navigate to Configuration > Encoder assignment.
- Change Encoder 1 to the new TO ExternalEncoder, and set the previous motor encoder as Encoder 2 (for commutation only).
- In the Mechanic tab, adjust the Load Gear to 1:1 — the encoder is now directly on the load.
- Re-run the absolute value adjustment once.
This eliminates gearbox backlash from the position loop and removes the encoder zero crossing issue, because the encoder measuring range is now aligned 1:1 with the load Modulo. The motor encoder continues to provide commutation and speed feedback to the SINAMICS drive, decoupled from the position truth source.
6. Dynamic Offset Correction with abShift
When a load-side encoder is not available, the alternative is to apply a dynamic offset via the abShift configuration data element on the TO. abShift is a runtime-modifiable position offset that is added to the actual position value before it enters the position controller. The relevant system variables are:
| System Variable | Access | Effect |
|---|---|---|
TO.AxisName.positionControlOffset |
R/W | Direct additive offset to position setpoint (drive-side) |
TO.AxisName.absoluteEncoderOffset |
R/W at runtime (Scout 5.x) | Adds to the absolute encoder home position |
TO.AxisName.measuringGearNumerator / Denominator |
Config data, re-load required | Scales encoder-to-load conversion |
A typical drift-correction program block in Structured Text (Simotion):
// Periodic correction block, called every N load revolutions
// Reads load-side PROFIBUS encoder, computes error vs TO actual position,
// and applies abShift without disturbing the running cam.
IF bEnableCorrection THEN
loadEncoderPos := TO.ExtEncoderLoad.actualPosition; // load-side truth
axisPos := TO.CamAxis.actualPosition; // motor-side TO
delta := loadEncoderPos - axisPos; // signed error
// Apply as runtime offset
TO.CamAxis.absoluteEncoderOffset :=
TO.CamAxis.absoluteEncoderOffset + delta;
// Update the abShift config data so the value persists across
// the next homing/power-cycle (write to TO config via _writeConfigData)
configData.value := TO.CamAxis.absoluteEncoderOffset;
_writeConfigData(
configDataRef := TO.CamAxis.configData,
errorOutput => retErr
);
bEnableCorrection := FALSE;
END_IF;
The shift measuring function referenced in the source (Siemens Measuring input / Touch probe with reference mark) can also be used: route a digital input to TO.AxisName.measuringInput.1 wired to a proximity switch on the load shaft, and configure the measuring input type as Reference mark. Each pass of the mark generates a measuring event that, combined with the touch-probe system variable, allows you to compute and apply abShift automatically.
7. Verification Procedure
- Power cycle the Simotion controller. Confirm the absolute position is retained (no Encoder error / F31885 / F31895 in the SINAMICS drive diagnostics).
- Jog the axis to the physical reference mark on the load shaft. Confirm the load-side PROFIBUS encoder reads the same value as the TO actual position within ±1 encoder increment on the load side.
- Execute 200+ full machine cycles (≈ 400+ load revolutions). Sample the load-side encoder vs TO actual position at the cam sync point (master = 0). Record the maximum deviation.
- Acceptable: ≤ 0.01° on the load shaft with a load-side encoder, or ≤ 0.05° with motor-side encoder and a stable ambient temperature.
- Power cycle again and repeat the comparison; the deviation should be unchanged.
8. Common Error Codes and What They Indicate
| SINAMICS / Simotion Fault | Meaning in this Context | Action |
|---|---|---|
| F31885 (SINAMICS) | Encoder 1 fault, EnDat protocol error | Check wiring, encoder power; clear via p0977 = 1 after repair |
| F31895 | Encoder 1 absolute value lost | Re-run absolute adjustment; verify battery / multi-turn buffer |
| 20002 (Simotion TO) | Homing error, encoder zero crossing in traversing range | Reduce Modulo range or apply abShift per TIA V20 absolute value adjustment |
9. Troubleshooting Matrix
| Symptom | Likely Cause | Resolution |
|---|---|---|
| Drift visible from cycle 1 | Mechanic ratio entered as combined value | Split into Load Gear numerator/denominator |
| Drift appears after 10–15 cycles | Modulo range crosses encoder zero | Reduce Modulo to 0–360° in load units, or add load-side encoder |
| Constant offset, no growth | Gearbox backlash | Enable backlash compensation (Mechanical model > Backlash in TO) |
| Offset changes with temperature | Encoder mounting thermal expansion | Mechanical redesign of encoder coupling |
| Offset resets after power cycle | abShift not persisted | Use _writeConfigData to save to the TO config data |
| Cam phase error in product | Zero mismatch on slave TO | Apply dynamic abShift at master phase = 0 |
10. Best-Practice Recommendations
- Treat the absolute value adjustment as a commissioning step, not a runtime operation. Lock it out behind a service-level state machine.
- Always install a load-side encoder on axes that drive a cam with phase-critical coupling. The cost of the encoder is trivial compared to scrap from a phase-error event.
- Keep the Modulo range in load units, never in motor units. Mixing units is the most frequent source of intermittent position faults in field service reports.
- Document the Load Gear as a ratio numerator : denominator in the project comments. Do not embed it in the Modulo length.
- Periodically (e.g. every 10,000 cycles) compare the load-side encoder to the TO actual position at the cam sync point and log the deviation for predictive maintenance.
11. FAQ
Why does my Simotion axis lose its zero position after 10–15 cycles even with an absolute encoder?
The encoder itself is not losing position; the TO is. The Modulo range spans multiple encoder zero crossings, so each pass re-resolves the position and accumulates sub-LSB jitter. Set Modulo to the operating region in load units (typically 0–360°), and split the gear ratio into the Load Gear numerator/denominator fields, not a single combined value.
Can I re-home an absolute encoder TO axis at runtime without disturbing the cam?
No. Calling _setAbsolutePosition or any homing command during synchronized operation generates a position step. Use a runtime abShift offset applied at a known master-aligned state (master position = 0) to correct drift without disturbing the running cam.
What is the correct Load Gear value for a 79.95:1 gearbox with a 2048-line, 4096-revolution multiturn EnDat encoder?
Enter Number of motor revolutions = 79.95 and Number of load revolutions = 1 in the Load Gear fields. The measuring gear should be 1:1 because the encoder is mounted on the motor shaft. The Modulo range (operating region) is independent and should be set in load units, e.g. 0–360°.
How do I make the abShift value survive a Simotion power cycle?
The abShift runtime value is not persistent by default. After computing the desired offset, call _writeConfigData(configDataRef := TO.AxisName.configData, errorOutput => retErr) to save the new value to the persistent TO configuration. Verify on next power cycle by reading the value back via the TO online diagnostics.
Is a load-side absolute encoder required for cam-synchronized axes?
It is strongly recommended for any axis driving a phase-critical cam. The motor-side encoder is subject to gearbox backlash and a Modulo-vs-encoder zero mismatch, both of which are eliminated by placing the position-truth encoder directly on the load. The motor encoder can remain in place for commutation and velocity feedback to the SINAMICS drive.