S7-1200 MC_Power Error 800D: Following Error Diagnostics

David Krause18 min read
S7-1200SiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Problem Summary

On a CPU 1212C DC/DC/RLY (6ES7212-1AE40-0XB0) programmed in TIA Portal V17 with S7-1200 Motion Control V5, the function block MC_Power raises ErrorID 16#800D after approximately 30 minutes of continuous MC_MoveVelocity operation. The drive interface is analog (velocity command via analog output, e.g., +/-10 V or 0-10 V) with the position feedback encoder wired to a high-speed counter input. Drive ramp-up and ramp-down are configured at 2 seconds. OB91 servo cycle time is 10 ms and the PLC main cycle is 30 ms.

The 16#800D error on S7-1200 means "permitted following error has been exceeded". The position controller detected that the difference between setpoint position and actual position grew beyond the threshold defined in the technology object. The fault appears intermittently after extended runtime, which is a strong indicator of thermal drift in the analog command path or in the encoder interface, or of a drive ramp time that is too long for the configured motion dynamics.

2. Error Code Reference: 16#800D

The Siemens TIA Portal help documents the 16#8000-16#8013 error range for S7-1200 axis technology objects (TO_PositioningAxis, TO_SynchronousAxis, TO_ExternalEncoder). For Motion Control V5/V6/V7/V8 the entry is:

ErrorID Meaning Remedy (ErrorInfo 16#0001)
16#800D The permitted following error has been exceeded. Remove enable. Check the configuration of the control loop. Check the direction signal of the encoder.

Reference: List of ErrorIDs 16#8000-16#8013 (S7-1200) and the corresponding V1 entry: List of ErrorIDs and ErrorInfos V1 (S7-1200).

2.1 Distinguishing S7-1200 from S7-1500

The numeric value 16#800D has a different meaning on S7-1500 motion control: there it signals a required restart of the axis, documented in Siemens FAQ 109781853. Do not apply S7-1500-specific remedies (MC_Power.StartMode, cold/warm restart) to an S7-1200 axis: the S7-1200 MC_Power does not have a StartMode input. It exposes Enable and StopMode (0 = immediate, 1 = ramp, 2 = emergency stop). On S7-1200, 16#800D always means following error exceeded.

3. Root Cause Analysis

The 30-minute time-to-fault pattern points to one of the following mechanism classes:

Mechanism Symptom Typical Time-to-Fault
Drive ramp time too slow vs. setpoint acceleration Setpoint rises faster than drive can follow; actual position lags Seconds to minutes after first speed change
Encoder input filter too aggressive Actual position jitters; average position lags setpoint Constant, but with thermal dependence
Encoder direction wrong in TO Stable following error proportional to speed at all non-zero velocities Immediate at first MC_MoveVelocity
Mechanical play, backlash, or belt slip Following error spikes at direction reversal Hours, after reversals
OB91 servo cycle time too long for dynamics Following error during high acceleration During setpoint ramps
Following error threshold set too low 800D trips on otherwise normal transients Intermittent
Thermal drift in analog output or drive input Setpoint/actual mismatch grows with operating temperature 20-60 minutes (matches 30 min)
Drive speed loop poorly tuned Motor lags analog command; oscillates at Kp edge Constant deviation, often > 1% of speed

The 30-minute delay strongly suggests thermal drift in the analog command path (PLC analog output reference, drive input offset) or in the encoder interface, or in the drive's own internal amplifier. A drift of even 0.5% in the analog output reference shifts the velocity command proportionally; the position controller integrates this error over time and the cumulative following error eventually exceeds the threshold.

4. Diagnostic Procedure

4.1 Capture a TIA Portal Trace

Open the technology object and select Trace > Recording. Configure a recording with the following signals:

  1. <Axis>.PositioningMonitor.Position (setpoint position)
  2. <Axis>.Sensor[1].ActualPosition (encoder feedback)
  3. <Axis>.PositioningMonitor.FollowingError (computed delta)
  4. MC_Power.Status, MC_Power.Error, MC_Power.ErrorID
  5. MC_MoveVelocity.InVelocity (BOOL)
  6. Analog output value via the I/O address of the analog output (%QW) - logged as analog signal

Set the recording duration to at least 60 minutes, with a sample interval of 2-4 ms. Trigger on MC_Power.Error = TRUE so the trace captures 30 s of pre-fault and 30 s of post-fault data. Use the smallest possible time base that still fits the buffer (longer pre-trigger = better root-cause analysis).

4.2 Trace Pattern Diagnosis

Pattern Observed Diagnosis
Following error grows linearly at constant speed Calibration mismatch (encoder count/direction or analog scaling)
Following error spikes only during ramp up/down Drive ramp time too long relative to MC_MoveVelocity acceleration
Following error is constant and small but eventually trips 800D Following error threshold too low OR analog output drift
Following error oscillates with fixed period Mechanical resonance; reduce Kv or add low-pass filter
Following error grows suddenly, then stays Mechanical jam, belt slip, or encoder loss
Following error ramps in proportion to runtime Thermal drift in analog output or drive

4.3 Check Encoder Direction Without a Trace

  1. Power the axis via MC_Power.
  2. Run MC_MoveVelocity at low velocity (e.g., 50 mm/s or 50 rpm).
  3. Open the axis online view and read the actual position value.
  4. Confirm the actual position changes in the same sign direction as the commanded velocity. If the actual position moves opposite to the commanded motion, invert the encoder direction in the TO configuration (Configuration > Encoder > Invert direction).

4.4 Check Analog Output Polarity

  1. Set MC_MoveVelocity with a small positive velocity.
  2. Read the analog output at the drive input terminals with a multimeter.
  3. Verify polarity: positive velocity command should produce the expected positive voltage at the drive input (0-10 V unipolar with 5 V = 0 rpm, or +/-10 V bipolar with 0 V = 0 rpm, depending on drive configuration).
  4. If polarity is inverted, reverse wiring or invert the analog output scaling in the TO configuration.

5. Hardware Configuration Check

5.1 Encoder Input Filter

The S7-1200 high-speed counter input used for the encoder has a configurable input filter. The available filter times on S7-1200 HSC inputs are 0.1 us, 0.2 us, 0.4 us, 0.8 us, 1.6 us, 3.2 us, 6.4 us, and 12.8 us. For motion control applications the filter must be set to a low value (typically 0.8 us or less). A high filter time introduces a position lag proportional to encoder frequency. The filter is configured in the device configuration under the digital input properties > Input filter.

Filter-induced lag can be estimated as:

position_lag (counts) = filter_time (s) * encoder_frequency (Hz)

For a 1000-ppr encoder at 3000 rpm, encoder frequency is 50 kHz. A 3.2 us filter introduces a lag of 160 counts, or 0.16 revolutions. For high-speed applications, this is a significant fraction of the following error budget.

5.2 Encoder Resolution Match

The encoder pulses per revolution configured in the TO must match the physical encoder. For a rotary encoder connected to a lead screw:

load_distance_per_rev = leadscrew_pitch (mm/rev) * gear_ratio

encoder_resolution (load units/rev) = encoder_ppr * 4 (for quadrature decoding)

If the configured resolution is wrong, the following error reported by the TO is wrong, and 800D may trip at unexpected times.

5.3 Analog Output Calibration

The PLC analog output scaling and the drive input scaling must agree. Typical setup:

  • PLC: 0-27648 raw = 0-10 V at the analog output (or +/-10 V bipolar: -27648 to +27648 = -10 V to +10 V).
  • Drive: 0-10 V = 0-rpm_max (or +/-10 V = +/-rpm_max).
  • TO: configured with the same rpm_max.

If the drive is calibrated for a different voltage range, the velocity command will be off by a constant factor, causing a constant following error proportional to speed.

6. Drive Configuration Tuning

6.1 Drive Ramp Time vs. MC Acceleration

The PLC computes the position setpoint and outputs the corresponding velocity command via analog output. The drive then applies its own ramp time to the analog input. If the drive ramp time is longer than the ramp time implied by the MC_MoveVelocity.Acceleration, the drive cannot follow the PLC's setpoint, and the actual position lags the setpoint. The lag accumulates during every acceleration event.

Field-tested starting value for a 0.5 kW analog drive: 0.3 seconds. The reported 2-second drive ramp is far too slow for any application requiring position control. The corresponding MC acceleration should be at least:

acceleration (load units/s^2) = max_velocity / 2.0

If MC_MoveVelocity.Acceleration is set higher than this, the drive is the bottleneck and following error will be large.

6.2 Recommended Drive Ramp Settings

Drive Power Drive Ramp Time Notes
< 0.5 kW 0.05 - 0.2 s Fast response, low inertia
0.5 - 2 kW 0.2 - 0.5 s Balanced response
2 - 10 kW 0.5 - 1.5 s Larger inertia, slower ramp
> 10 kW 1.0 - 3.0 s Mechanical stress limit

Trade-off: too short a ramp time causes mechanical shock and overshoot. Too long a ramp time causes the drive to lag the setpoint and trip 800D.

6.3 Drive Speed Loop Tuning

The drive's internal speed loop should be tuned for the load. Typical procedure:

  1. Start with conservative P and I gains (e.g., Kp = 0.5, Ki = 0.1).
  2. Run MC_MoveVelocity at a moderate speed.
  3. Increase Kp until the drive responds to step changes with minimal overshoot.
  4. Increase Ki until steady-state error is eliminated without oscillation.

A poorly tuned drive speed loop causes the motor to lag the analog command, contributing to following error.

7. PLC Configuration Tuning

7.1 OB91 Servo Cycle Time

OB91 is the S7-1200 motion control servo interrupt. It is called at the configured servo cycle time, independently of the OB1 main cycle. The position control algorithm runs in OB91. The Kv gain is in units of 1/s and is applied at the servo cycle time. A higher servo cycle time (slower) reduces the controller's ability to react to disturbances.

For an analog drive with a 0.3-2 second ramp time, an OB91 cycle time of 2-8 ms is recommended. The reported 10 ms is at the upper limit; reducing it to 4 ms or 2 ms can significantly reduce transient following error.

OB91 Cycle Time Use Case
1-2 ms High-speed servos, tight following error, digital drives
4 ms Typical analog drive, 0.5-2 kW
8-10 ms Low-speed or low-dynamics applications

7.2 PLC Main Cycle Time

The reported 30 ms PLC main cycle time is not directly related to the motion control servo loop (which runs in OB91). The main OB1 cycle affects:

  • Rate at which MC_Power.Enable is processed
  • Rate at which MC_MoveVelocity.Execute is processed
  • HMI update rate

A 30 ms main cycle is acceptable. The MC_Power.ErrorID and Error outputs are latched in the PLC; the main cycle time does not affect the underlying position monitoring.

7.3 MC_Power StopMode (S7-1200)

For S7-1200, MC_Power has a StopMode input:

StopMode Behavior
0 Immediate stop - drive enable removed immediately
1 Ramp stop - drive decelerates using MC_Power.Deceleration
2 Emergency stop - drive stops using MC_Power.EmergencyDeceleration

When 800D occurs, the PLC automatically commands the stop. The actual motion stop behavior depends on this StopMode and on whether MC_Power.Enable is reset by the user program. For most applications, StopMode = 1 (ramp stop) is recommended to avoid hard stops that can damage the mechanics.

7.4 MC_MoveVelocity PositionControlled

The MC_MoveVelocity function block has a PositionControlled input. By default, this is TRUE, which means the axis is still position-controlled even during velocity moves. The actual position is monitored against the setpoint position, and following error is enforced.

If the application does not require position control during velocity moves, set PositionControlled = FALSE. This disables the following error monitoring and the actual position is not enforced. This is a valid option for applications that only need open-loop velocity control (pumps, fans, simple conveyors).

For applications that need both velocity control and position feedback (registration, cut-to-length, tension control), keep PositionControlled = TRUE and address the underlying following error. Setting it to FALSE on MC_MoveVelocity only disables following error for that specific command; the axis remains powered and the actual position is still tracked, but no following error is generated.

8. Tuning the Control Loop

8.1 Position Control Kv Gain

The Kv gain in the TO determines how aggressively the position controller responds to following error. A higher Kv reduces following error but can cause oscillation. A lower Kv is stable but allows more following error.

For a 0.5 kW analog drive with a 4 ms servo cycle:

  1. Initial Kv = 1.0 1/s
  2. Increase Kv in 0.5 1/s steps until oscillation appears
  3. Reduce Kv to 50-70% of the oscillating value

8.2 Position Control Precontrol

The position control precontrol (feedforward) injects the velocity setpoint directly into the velocity command, reducing the load on the position controller. Enable precontrol in the TO configuration:

Configuration > Control Loop > Precontrol = "Use velocity precontrol"

With precontrol enabled, the position controller only corrects disturbances, and the following error during constant-velocity motion is near zero. This is the single most effective setting for reducing 800D faults on constant-velocity applications.

8.3 Expected Following Error Calculation

Without precontrol, steady-state following error is:

following_error_steady_state = setpoint_velocity / Kv

For example: setpoint velocity = 1000 mm/s, Kv = 1.0 1/s gives 1000 mm of steady-state following error. To limit to 1 mm, Kv would need to be 1000 1/s, which is well into the oscillation region. Conclusion: precontrol is essential for high-speed applications with tight following error requirements.

With precontrol enabled, the steady-state following error is near zero (limited only by the drive's velocity tracking error), and the position controller handles only transient deviations.

8.4 Position Monitoring Configuration

The following error threshold is configured at:

Configuration > Extended Parameters > Position monitoring > Following error

Recommended starting values for an analog drive with 4 ms servo cycle and 0.3 s drive ramp:

Axis Type Following Error Threshold
Linear axis (mm) 1 - 5 mm
Rotary axis (degrees) 1 - 5 deg
Rotary axis (revolutions) 0.001 - 0.01 rev

If the threshold is set too low (e.g., 0.1 mm), normal transients will trip 800D. If the threshold is set too high (e.g., 50 mm), the actual position can drift significantly before the fault is detected. Use the trace to find the peak transient following error and set the threshold to 2-3x that value.

9. Following Error Monitoring Adjustment

9.1 As a Last Resort

Disabling or increasing the following error monitoring is the last option. It hides the symptom but does not fix the cause. If the application can tolerate position drift (e.g., a conveyor or pump), increasing the threshold is acceptable. If position accuracy is required, the underlying cause must be addressed.

9.2 Recommended Order of Operations

  1. Run the trace and identify the root cause (see Section 4.2).
  2. If the root cause is drive ramp time, fix the drive ramp (Section 6).
  3. If the root cause is encoder direction, fix the encoder direction (Section 4.3).
  4. If the root cause is mechanical, fix the mechanical issue (Section 12).
  5. If the root cause is thermal drift, fix the calibration or replace the drifting component.
  6. If the root cause is controller tuning, adjust Kv and enable precontrol (Section 8).
  7. As a final mitigation, increase the following error threshold to a value that accommodates the residual drift.

10. Verification

After each configuration change, perform the following verification:

  1. Power the axis via MC_Power.
  2. Start MC_MoveVelocity at a moderate speed (50% of max).
  3. Run for at least 60 minutes.
  4. Monitor the trace for any following error buildup.
  5. Change direction (set velocity to negative) and verify that following error does not spike.
  6. If 800D does not reappear, repeat at higher speed (75% of max) and higher acceleration.
  7. If 800D reappears, return to the trace and analyze.

A successful verification meets all of the following criteria:

  • No 800D during 60 minutes of continuous operation at full speed and full acceleration
  • Steady-state following error < 0.5 mm (or per-axis equivalent)
  • Transient following error < 5 mm (or per-axis equivalent)
  • No oscillation in actual position

11. Related Errors and Diagnostic Codes

11.1 Error 800F (ErrorInfo 0045)

If the following error monitoring is disabled or set to a large value, the axis can lose position control. The next error that appears is typically 16#800F ("Positioning error: target position not reached"). ErrorInfo 16#0045 indicates the axis stopped without reaching the target.

The 800F (0045) error confirms that the underlying issue is not the following error monitoring but the ability of the axis to reach the commanded position. Address the root cause (drive, encoder, mechanics) rather than masking with larger thresholds.

11.2 Full 16#8000-16#8013 Range (S7-1200)

ErrorID Meaning
16#8001 Axis is not enabled
16#8002 Axis is already enabled
16#8003 Axis is in error state (must be reset with MC_Reset)
16#8004 Axis is in stopping state
16#8005 Axis is in homing state
16#8006 Axis is in motion
16#8007 Invalid parameter
16#8008 Invalid command for current axis state
16#8009 Internal error
16#800A Encoder error
16#800B Drive error
16#800C Communication error to drive
16#800D Permitted following error exceeded
16#800E Position limit exceeded (software limit switch)
16#800F Positioning error - target not reached

Refer to the official Siemens documentation (Section 2) for the complete list with ErrorInfo sub-codes.

11.3 Cross-Reference: Equivalent Function Blocks on Other Platforms

The motion control error ID concept is shared across vendors. See CCW Motion Control Function Block Error IDs (Rockwell), MC_Power - Beckhoff Information System, and MC_Power - Schneider Electric for the equivalent MC_Power implementations and error codes on those platforms. These are useful when migrating or comparing S7-1200 behavior to other motion controllers.

12. Mechanical and Safety Considerations

12.1 Mechanical Backlash and Compliance

Backlash in a gear train or lead screw causes following error during direction reversal. The backlash amount must be subtracted from the position monitoring threshold. If backlash is 2 mm and the threshold is 1 mm, the axis will always trip 800D on every reversal. Configure backlash compensation in the TO (Configuration > Mechanics > Backlash compensation) or increase the following error threshold.

12.2 Belt and Coupling Slip

A loose timing belt or set screw on a coupling can cause progressive position loss. The trace will show a sudden jump in following error followed by a constant offset. Tighten all mechanical connections and verify with a dial indicator before further tuning.

12.3 Safety Stop Behavior

When 800D occurs and the axis is stopped, the drive enable is removed. The motor is no longer actively controlled, and the load can drift under gravity or stored energy. For vertical axes, configure a mechanical brake that engages when drive enable is removed. Verify the brake engages within the configured StopMode deceleration window.

12.4 Emergency Stop and Restart

After 800D, the axis must be acknowledged with MC_Reset before it can be re-enabled. The reset clears the error and allows a new MC_Power.Enable = TRUE to start the axis. If the root cause is not fixed, 800D will reappear within minutes.

Warning: Disabling the following error monitoring is not a fix. It hides the symptom of an underlying control issue and can lead to undetected position drift, collisions, or product quality defects. Always address the root cause before adjusting the threshold.

13. Commissioning Checklist

Step Action Verification
1 Wire encoder to HSC input; set input filter to lowest value Encoder counts visible in HSC online view
2 Wire analog output to drive velocity command input Voltage at drive matches MC setpoint
3 Configure TO with correct encoder ppr, leadscrew pitch, gear ratio Actual position matches physical position (after homing)
4 Set drive ramp time to match MC acceleration Following error < 1 mm at 50% speed
5 Set OB91 cycle time to 4 ms (or 2 ms for high dynamics) CPU utilization < 70%
6 Enable velocity precontrol Following error near zero at constant speed
7 Tune Kv gain No oscillation; minimal overshoot
8 Set following error threshold (2-3x peak transient) No 800D in 60 min test
9 Test direction reversal No 800D on reversal
10 Test full speed and full acceleration No 800D in 60 min test

14. FAQ

How does MC_Power Error 800D differ between S7-1200 and S7-1500?

On S7-1200, ErrorID 16#800D means "permitted following error has been exceeded" and indicates that the actual position has deviated from the setpoint by more than the configured threshold. On S7-1500, the same numeric value 16#800D has a different meaning and is documented in Siemens FAQ 109781853. Always verify the CPU firmware and consult the appropriate Siemens documentation for the specific error interpretation; do not apply S7-1500 MC_Power.StartMode logic to an S7-1200 axis.

What is the first thing to check when MC_Power raises 800D on S7-1200?

Capture a TIA Portal trace of the setpoint position, actual position, following error, and analog output, with a 60-minute duration and a 2-4 ms sample interval, triggered on MC_Power.Error = TRUE. The trace will reveal whether the following error is growing linearly (calibration), spiking during ramps (drive ramp time), oscillating (mechanical resonance), or growing with runtime (thermal drift). Without a trace, the root cause cannot be reliably identified.

Can setting MC_MoveVelocity.PositionControlled to FALSE eliminate 800D?

Yes. Setting MC_MoveVelocity.PositionControlled to FALSE disables following error monitoring for the duration of that velocity command, so 800D will not be raised. However, this is a workaround that masks the underlying control issue. For applications that require position control (registration, cut-to-length, tension control), address the root cause - drive ramp time, encoder direction, Kv tuning, or precontrol - rather than disabling the monitoring.

What is the recommended OB91 servo cycle time for an analog drive?

For an analog drive with a 0.3-2 second ramp time, an OB91 servo cycle time of 2-8 ms is recommended. A 4 ms cycle is a typical default for 0.5-2 kW analog drives. Shorter cycles (1-2 ms) improve disturbance rejection but increase CPU load; longer cycles (8-10 ms) are acceptable for low-dynamics applications. The 10 ms cycle time reported in the original case is at the upper limit; reducing it to 4 ms typically reduces transient following error by a factor of 2-3.

Why does the 800D error appear after 30 minutes of operation?

A 30-minute time-to-fault strongly suggests thermal drift in the analog command path (PLC analog output reference, drive input offset) or in the encoder interface, or in the drive's internal amplifier. As components warm up, the calibration shifts, and the following error grows linearly with time. The fix is to recalibrate the analog output and drive input at operating temperature, or to replace components with better thermal stability. Capturing a trace of the analog output voltage over the 30-minute window will confirm the drift.

What is the difference between 800D and 800F (ErrorInfo 0045)?

800D is raised when the following error exceeds the threshold. 800F with ErrorInfo 16#0045 is raised when the axis stops without reaching the commanded position. 800F typically appears when the following error monitoring is disabled or set too loosely, allowing the axis to drift. Address the root cause of 800D first; 800F is a downstream consequence of a poorly tuned or misconfigured axis.

Back to blog