Resolving S7-1200 PID_3Step ErrorBits 16#00000800 Sampling Time

David Krause15 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

Overview

The PID_3Step instruction in the SIMATIC S7-1200, S7-1500, and S7-1200 G2 controller families drives motorized actuators with integral position feedback. The instruction combines a PID controller with a position-controller model that estimates valve transit time by observing how far the actuator actually moves when a step change is commanded. When the observed travel is too small to characterize the actuator, the instruction raises a non-fatal diagnostic bit in the ErrorBits output: DW#16#0000_0800 (bit 11).

This article explains the bit-level structure of the ErrorBits double word, the engineering meaning of 16#0000_0800, the conditions that produce it, and the field-proven remediation steps used on commissioning sites. The documentation applies to firmware V2 of PID_3Step as shipped in TIA Portal V13 SP1 through V21, and to the V1 legacy block still found in projects migrated from STEP 7 V11 SP2.

Critical: 16#0000_0800 is a warning-class bit. The instruction continues to compute the manipulated variable. The bit only prevents pretuning and fine tuning from completing successfully and degrades the controller's ability to re-measure actuator transit time. It does not stop the running loop.

PID_3Step ErrorBits Bit Map

The ErrorBits parameter is a DWORD output of PID_3Step that aggregates all pending error, warning, and status conditions. The bit layout follows the convention documented in the SIMATIC S7-1200 Programmable Controller System Manual and the TIA Portal online help for ErrorBits V2 parameter. The default value at power-up is DW#16#0000_0000 (no error) and the parameter is retentive across warm restarts.

Bit Hex Mask Class Meaning
0 16#0000_0001 Warning Input point Input_PER is outside the configured analog range.
1 16#0000_0002 Warning Invalid value at Input or Input_PER (NaN / out of range).
2 16#0000_0004 Warning Setpoint outside configured limits.
3 16#0000_0008 Warning Process value out of configured limits (alarm handling).
4 16#0000_0010 Warning Setpoint ramp violated LimitsAbsolute or Limits.
5 16#0000_0020 Warning Output would exceed OutputUpperLimit/OutputLowerLimit anti-windup limit.
6 16#0000_0040 Warning Sampling time error — the call interval differs from CycleTime.
7 16#0000_0080 Warning Setpoint difference less than configured minimum step during tuning.
8 16#0000_0100 Warning Output step too small for actuator identification.
9 16#0000_0200 Warning Pretuning could not determine the process dominant time constant.
10 16#0000_0400 Warning Fine tuning aborted: process gain could not be estimated.
11 16#0000_0800 Warning Actuator travel between commanded steps too small to measure transition time. Difference between current and new output must be at least 50% of the configured control range.
12 16#0000_1000 Warning Actuator transition time exceeds the configured ActuatorTime limits.
13 16#0000_2000 Warning Setpoint overshoot during fine tuning.
14 16#0000_4000 Warning Manual mode active (informational, not an error).
15 16#0000_8000 Warning Output value saturated.
16 16#0001_0000 Error Invalid configuration: Config.VirtualActuator = FALSE without position feedback.
17 16#0002_0000 Error Invalid Config.InputScaling / OutputScaling parameters.
18 16#0004_0000 Error Invalid Retain.CycleTime (must be > 0).
19 16#0008_0000 Error ActuatorTime invalid (must be > 0).
20 16#0010_0000 Error Setpoint value invalid (NaN / Inf).
21 16#0020_0000 Error Process value invalid.
22 16#0040_0000 Error Output value invalid during manual mode.
23 16#0080_0000 Error Internal arithmetic overflow.
≥24 16#0100_0000+ Error Reserved for future error extensions.

Per the ErrorBits parameter documentation, bits below 16#0001_0000 are warnings. The output value can be calculated despite the error. Bits at 16#0001_0000 and above are errors and prevent a calculation of the output value. The bit mask is evaluated by the instruction on every call, so a single execution that satisfies the error condition clears the bit on the next clean call.

Root Cause of ErrorBits = 16#0000_0800

Bit 11 (16#0000_0800) is set when PID_3Step attempts to measure actuator transition time but the difference between the previous commanded output position and the newly commanded output position is less than 50% of the entire configured control range. The condition is described in the STEP 7 V11 online help as: "The difference between the current position and the new output value is too small for transition time measurement. This state can produce incorrect results."

The controller uses actuator transit time as a feed-forward to coordinate the open/close pulse widths. When the change is too small, the measured time is dominated by mechanical dead-band, backlash, and the resolution of the position feedback encoder; the resulting estimate is too noisy to be useful, so the instruction refuses to commit it and reports the warning. Two control-engineering conditions cause the bit to remain latched:

  1. Setpoint step too small relative to scale. The setpoint change requested by the host program (HMI recipe, supervisory SCADA, or upstream cascaded loop) is less than 50% of the engineered span. Pretuning and fine tuning both rely on inducing a step large enough to drive the actuator across a meaningful fraction of its travel.
  2. Process already in regulation near setpoint. The controller is well-tuned and the disturbance band is narrow; the integrated output steps are tiny because the process needs only small corrective travel. This is normal during steady-state operation and is the most common reason the bit is set on a well-running plant.
  3. Output range mis-scaled. The Config.OutputScaling.UpperPointIn / UpperPointOut pair is set so that 100% of the control range does not equal 100% of the actuator's physical travel. A 0-100% engineering range mapped onto a 0-25% actuator travel gives the same 50% rule a much smaller absolute change.
  4. PLCSIM virtual environment. Per the S7-1200 PID_3Step reference document (V2.0), simulation with PLCSIM can return 16#0000_0800 when the simulator's incremental position update does not produce a 50% step within a single cycle. The fix on PLCSIM is the same as on real hardware: increase the commanded step or accept the bit during simulation only.

Diagnosing the Live Plant

Add the following monitoring to a watch table or HMI tag list before troubleshooting. Polling ErrorBits at the configured cycle rate is sufficient because the instruction refreshes it on every call.

Tag Type Meaning
PID_3Step_1.ErrorBits DWORD Bit field. Mask with 16#0000_0800 to isolate the warning.
PID_3Step_1.Setpoint REAL Current setpoint in engineering units.
PID_3Step_1.Input REAL Current process value in engineering units.
PID_3Step_1.Output REAL Current output value (actuator position, 0-100%).
PID_3Step_1.OutputUp BOOL Open pulse output.
PID_3Step_1.OutputDown BOOL Close pulse output.
PID_3Step_1.ManualEnable BOOL Manual mode flag.
PID_3Step_1.ManualValue REAL Manual output value used when in manual mode.
PID_3Step_1.Config.OutputScaling.UpperPointIn REAL Engineering upper bound of the output range.
PID_3Step_1.Config.OutputScaling.UpperPointOut REAL Physical upper bound of the actuator (typically 100.0).
PID_3Step_1.Retain.CycleTime REAL Configured sampling time in seconds.
PID_3Step_1.ActuatorTime REAL Estimated transit time in seconds.

Insert a small diagnostic FB that captures the 50% rule violation in a structured log. The following SCL snippet produces a Boolean that drives an HMI alarm:

// SCL — extract bit 11 (16#0000_0800) of ErrorBits
#TravelWarning := (#ErrorBits AND DW#16#0000_0800) <> 0;
#OutputDelta  := ABS(#Output - #OutputPrev);
#HalfRange    := 0.5 * (#CfgUpperOut - #CfgLowerOut);
#TravelOK     := #OutputDelta >= #HalfRange;

If #TravelWarning is persistently TRUE while #TravelOK is FALSE, the controller is genuinely demanding steps that are too small to measure. If #TravelOK is TRUE and the bit is still set, the issue is elsewhere (see the Other Bit Sources section below).

Step-by-Step Solution

1. Verify the Sampling Time Configuration

The PID_3Step instruction uses Retain.CycleTime as the value used by the internal model. The instruction is called from a cyclic OB (OB30, OB35, OB80). The cycle time of that OB determines how often the FB is executed. If the OB cycle is much longer than the recommended sampling time, the pretuning heuristic will under-sample the process and may report 16#0000_0800.

  1. Open the project in TIA Portal and navigate to the PID_3Step instance DB.
  2. Read Retain.CycleTime. Compare it to the OB scan time in PLC Properties > Cycle.
  3. If the OB is OB30 at 100 ms, the controller's configured CycleTime should be set to 0.1. Do not leave the default 1.0 from the FB's parameter template.
  4. Update the calling OB if the process demands faster control. A typical HVAC or process heater accepts OB35 at 100 ms; a fast pneumatic actuator on a packaging line benefits from OB30 at 50 ms or OB80 synchronous.
Important: Per the field-reported heuristic, increasing the OB scan rate (shorter cycle) is generally safer than increasing the controller's desired sample time. The controller will automatically re-estimate the dominant time constant on the next pretune. The user community heuristic is: "You can increase the calling rate of OB3X but you may not miss any thing if you keep the current sampling time (100 ms) for a small number of loops in your PLC."

2. Drive a Setpoint Step Larger than 50% of the Output Range

During pretuning, PID_3Step must observe a step change of at least 50% of the control range to characterize the actuator. The recipe for forcing a successful pretune is:

  1. Place the process in manual mode (ManualEnable := TRUE).
  2. Set ManualValue to a value that positions the actuator at, for example, 10% of the range. Wait for the actuator to reach the new position (verify by reading Feedback or Feedback_PER).
  3. Switch back to automatic (ManualEnable := FALSE).
  4. Trigger pretuning (Mode := Pretuning = 1).
  5. The instruction will command a step of approximately 60% of the range. The resulting Output change will satisfy the 50% rule and clear the warning.

If the setpoint change is supplied by a host system (HMI, SCADA, or recipe), ensure that the setpoint change requested before triggering pretuning is at least half the engineered span. A setpoint change of 5°C on a 0-100°C transmitter is only 5% of the control range and will not satisfy the rule regardless of the loop tuning.

3. Correct the Output Scaling

Open the Config structure in the instance DB and verify OutputScaling. For a standard motorized valve:

Point Input value Output value
Lower point Config.OutputScaling.LowerPointIn := 0.0 Config.OutputScaling.LowerPointOut := 0.0
Upper point Config.OutputScaling.UpperPointIn := 100.0 Config.OutputScaling.UpperPointOut := 100.0

If the application is split-range or characterises a partial-stroke valve, the upper point may legitimately be set to less than 100% of the engineering span. In that case the 50% rule applies to the configured range, not to 0-100%. The HMI must display the output in the same scaled units to avoid operator confusion.

4. Address PLCSIM-Specific Behavior

On PLCSIM V13 SP1 through V18, the simulator's internal step generator advances the simulated actuator by a fixed increment per cycle. If the calling OB is faster than the increment, the observed Output change per cycle is small and the bit is set. To resolve:

  1. Use OB1 (free cycle) for the PID_3Step call during simulation only, or slow the cyclic OB to 1 s or longer.
  2. Alternatively, force Config.VirtualActuator := TRUE for the simulation run. This disables the transit-time measurement entirely and the bit will not be set.
  3. Restore the production configuration before downloading to the real CPU.

5. Acknowledge vs. Clear the Bit

The ErrorBits word is an output of the instruction. It is not a status register that an external write can clear. To remove the bit from the live display, the calling code must ensure the next call does not repeat the condition. Acceptable engineering responses are:

  • Suppress in the HMI for steady-state conditions where the bit is expected. This is the most common approach in well-tuned loops.
  • Log and ignore during pretuning or fine tuning attempts that do not produce a measurable step.
  • Re-arm pretuning with a larger step if the bit is set on a tuning start.

Manual Mode and ErrorBits 16#0001_0000

When PID_3Step is in manual mode and a position feedback is connected, the instruction applies ManualValue as the output. The only exception per the ErrorBits V2 parameter documentation is the error bit 16#0001_0000 (invalid configuration, no position feedback). In that single error case the instruction does not accept ManualValue; it freezes the last valid output. The warning bits (including 16#0000_0800) are not exceptional in manual mode and are evaluated normally.

Mode ManualValue applied? Comments
Manual with position feedback, no error Yes Output tracks ManualValue.
Manual with position feedback, 16#0001_0000 set No Output frozen; correct the configuration error before resuming.
Manual without position feedback (virtual) Yes Config.VirtualActuator = TRUE; output updates the position model directly.
Automatic No Output driven by PID control law and actuator model.

Pretuning and Fine Tuning Considerations

The two tuning modes provided by PID_3Step are controlled through the Mode input:

Mode value Name Effect
0 Inactive Controller runs in normal closed-loop mode.
1 Pretuning Step test to estimate dominant time constant, process gain, and actuator transit time.
2 Fine tuning Refines the parameters around the current operating point.
3 Alternative pretuning Starts pretuning from a fixed alternative point (used if the current point is too close to the setpoint).

Mode 1 and Mode 3 force the output to the lower or upper alternate point automatically. If the alternate point differs from the current output by less than 50% of the range, the instruction refuses to perform the test and reports 16#0000_0800. To avoid this:

  1. Start pretuning from a process state that is at least 25% of the range away from the configured alternate point.
  2. Use Mode 3 to choose a wider alternate point if Mode 1 fails repeatedly.
  3. Confirm that the setpoint itself is at least 30% inside the operating range to allow travel in both directions during the step test.

Verification

After applying the corrections, verify that the bit is no longer set during the relevant operating phase:

  1. Download the project to the S7-1200 CPU (article numbers 6ES721x-1xx30-0XB0 and later for FW 4.x; 6ES721x-1xx40-0XB0 for FW 4.4; 6ES721x-1xx50-0XB0 for the second-generation S7-1200 G2 running FW 4.6 and later).
  2. Go online and force a CPU restart to clear the retentive ErrorBits.
  3. Trigger a pretuning by writing Mode := 1 to the instance DB. Confirm the bit clears within two cycles of the OB.
  4. Monitor the watch table. PID_3Step_1.ErrorBits should read DW#16#0000_0000 after the tuning step.
  5. If the bit is set transiently during steady-state operation, evaluate whether the controller is correctly tuned. A well-tuned loop will command 0.5-3% steps during steady-state, and the bit will be set on the transit-time measurement cycles. This is expected and not an error.

Verification Matrix

Condition Expected ErrorBits Action
Steady-state, well-tuned, <3% step 16#0000_0800 may be set on the measurement cycle Accept; document as expected behavior.
Pretuning start, >50% setpoint change 16#0000_0000 Proceed with tuning.
Fine tuning start, >30% setpoint change 16#0000_0000 Proceed with tuning.
Manual mode engaged Bit cleared within one cycle No action; the manual flag is informational.
Bit persists after pretuning 16#0000_0800 set Check OB cycle time vs Retain.CycleTime.
Bit set with 16#0001_0000 Configuration error Verify VirtualActuator and position feedback wiring.

Troubleshooting Matrix

Symptom Likely cause Fix
Bit set immediately after download Retentive bit not cleared Perform CPU restart (MRES) to clear the instance DB.
Bit set only during pretuning Setpoint change < 50% of range Drive the process to a state >25% from the alternate point before triggering pretune.
Bit set on every cycle OB cycle time << configured Retain.CycleTime Update Retain.CycleTime to match the actual OB cycle.
Bit set on PLCSIM only Simulator position increment too coarse Slow the OB to 1 s or set VirtualActuator := TRUE for the simulation run.
Bit set with persistent oscillation in Output Output anti-windup or rate limiting Reduce Config.OutputLimit rate or widen OutputUpperLimit / OutputLowerLimit.
Bit set despite >50% step observed on HMI Scaling mismatch Verify OutputScaling matches the physical actuator travel.
Bit set after fine tuning Process gain estimated near zero Increase setpoint step magnitude or extend the tuning hold time.
Bit alternates with bit 8 (16#0000_0100) Both transit-time and step-size warnings Address the larger of the two steps; the other clears automatically.

Field-Proven Notes

  • The 50% rule is a robustness threshold, not a hard physical limit. Loops with very fast actuators and high-resolution position feedback can sometimes satisfy the controller with 30% steps. The threshold is conservative because the position feedback on most field actuators is a 1 kΩ potentiometer or a 4-20 mA position transmitter, both of which exhibit 1-2% noise.
  • The 0.599 s pretuning sample time observed on a 100 ms OB is consistent with the heuristic. A 100 ms OB can execute the PID_3Step up to 100,000 times per hour. The pretuning heuristic infers the dominant time constant as 6× the sample time when the process is lightly damped. The user does not need to change the OB cycle; updating Retain.CycleTime to 0.1 and running the loop at the configured rate is sufficient.
  • If the application is a temperature loop on a large thermal mass, the dominant time constant will be on the order of minutes. A 100 ms OB is more than adequate. The 50% rule will be satisfied by the setpoint change requested by the operator, not by the OB cycle.
  • On the S7-1200 G2 (article prefix 6ES721x-1xx50-0XB0) with FW 4.6, the PID_3Step V2 instruction is fully compatible with the G2 instruction set. The bit layout and remediation steps are unchanged.
  • When migrating a V1 project (TIA Portal V13 SP1) to V2 (TIA Portal V17 or later), the legacy ErrorBits structure is preserved. Bit 11 remains the 50% travel warning. Existing watch tables and HMI tags do not need to be re-mapped.

What does ErrorBits 16#0000_0800 mean on a Siemens S7-1200 PID_3Step?

Bit 11 of the ErrorBits DWORD is set when the controller cannot measure the actuator transition time because the difference between the current and the newly commanded output is less than 50% of the configured control range. The bit is a warning; the loop continues to operate and the output value is still calculated, but pretuning and fine tuning cannot complete.

How do I clear the 16#0000_0800 bit in PID_3Step?

Trigger a setpoint change of at least 50% of the control range from the current operating point, or correct the output scaling so the engineered span matches the actuator travel. After the next call that satisfies the 50% rule, the instruction clears the bit automatically. A CPU restart also clears it because the parameter is retentive on warm restart but re-initialized on cold restart.

Should I change the OB30 cycle time to fix 16#0000_0800?

Not necessarily. The OB cycle is independent of the 50% rule. First verify that Retain.CycleTime matches the OB cycle (for OB30 at 100 ms, set Retain.CycleTime := 0.1). If pretuning still reports 0.599 s, leave the OB at 100 ms and instead drive a setpoint step of more than half the control range before the tuning attempt.

Why does PLCSIM show 16#0000_0800 during PID_3Step simulation?

Per the S7-1200 PID_3Step V2.0 reference document, the simulator's internal position increment is fixed. If the calling OB runs faster than the increment, the observed step per cycle is too small. Slow the calling OB to 1 s or set Config.VirtualActuator := TRUE for the simulation run. Restore the production configuration before downloading to a real CPU.

Is 16#0000_0800 the same as 16#0000_0100 in PID_3Step?

No. Bit 8 (16#0000_0100) is the "output step too small for actuator identification" warning set during tuning. Bit 11 (16#0000_0800) is the "actuator travel between commanded steps too small to measure transition time" warning set during normal operation. Both can be present at once; remediate the larger of the two issues first.

Back to blog