Resolving PCS 7 SFC TRIG_CPU_RESTART Errors After CPU Restart
Sequential Function Chart (SFC) instances in SIMATIC PCS 7 frequently fail to resume execution after the Automation Station (AS) returns from STOP, RUN, or warm/cold restart. The most common symptom is a latched TRIG_CPU_RESTART output mapped to the tag TrigCPUR, accompanied by a green "consistent data" indication on the SFC faceplate, even though the chart never advances past the start step. This technical reference covers root cause, status output interpretation, configuration of CPU operating parameters, recovery procedures, and verification methods for SFC instances in PCS 7 V8.x through V9.1.
1. Problem Description
After a CPU restart event (warm restart, cold restart, or power-fail restart), SFC instances derived from SFC types may exhibit one of the following behaviors:
- The SFC instance displays a red returning arrow indicating inconsistent data.
- The SFC instance displays a green returning arrow indicating consistent data but the chart does not advance past the start transition.
- The output
TRIG_CPU_RESTART(tag:TrigCPUR) is set TRUE and remains latched. - Writing the
RESUMEcommand to the SFC internal control block has no effect. - The chart can only be recovered through the SFC Control Panel "Resume" button, manual mode switching, or a full project download.
The root symptom is that the SFC operating mode and execution state are not properly re-initialized when the AS comes back to RUN, leaving the chart in a suspended state that cannot be cleared by simple user-level commands.
2. SFC State and Operating Mode Fundamentals
Each SFC instance in PCS 7 has two orthogonal state machines that must be understood to troubleshoot restart behavior:
2.1 Operating Mode (OM)
| Mode | Tag (QTYPE suffix) | Description |
|---|---|---|
| Manual (MAN) |
QAUTMAN = 0 |
Operator controls step selection, no automatic transitions |
| Automatic (AUTO) |
QAUTMAN = 1 |
Transitions evaluated automatically per chart logic |
| Cascade (CASC) |
QCASC = 1 |
Start/stop controlled by parent SFC, transitions automatic |
2.2 Run State (RS)
| State | Tag (QTYPE suffix) | Description |
|---|---|---|
| Idle |
RUN = 0 |
No active step; awaiting START command |
| Running |
RUN = 1 |
Active step executing or transition evaluating |
| Held |
HELD = 1 |
Operator initiated HOLD; transitions blocked |
| Completed |
COMPLETE = 1 |
End step reached; auto-reset in AUTO mode |
| Aborted |
ABORT = 1 |
Operator issued ABORT command |
During a CPU restart, both state machines must be re-initialized. If the SFC was in the middle of a transition evaluation at the moment of stop, the saved state can be inconsistent because no step was active and no transition was complete.
3. Status Output Reference
The SFC faceplate in the OS WinCC Runtime exposes the following Boolean outputs from the SFC instance DB. These correspond to the I/O flags generated by the SFC compiler in the AS:
| Output | Tag Name (Suffix) | Meaning When TRUE |
|---|---|---|
| Operating mode | QAUTMAN |
1 = AUTO active, 0 = Manual active |
| Run state | RUN |
SFC currently executing (active step or transition) |
| Execution error | EXEC_ERR |
Logic error in active step (e.g. divide by zero, I/O access fault) |
| Group error |
ERRG (Collective Error) |
Any error condition; superset of EXEC_ERR and time errors |
| CPU restart detected |
CPU_REST (CPURestart) |
CPU restart occurred since last SFC start |
| Trigger CPU restart |
TRIG_CPU (TrigCPURestart) |
SFC must be acknowledged before continuing; latched until Resume/Reset |
| Time error | TIME_ERR |
Step or transition time monitoring exceeded |
| Operator request | OP_REQ |
An operator action is pending (acknowledge, confirm) |
When a CPU restart occurs and the SFC property Retain SFC state is enabled, the instance preserves the active step in its instance DB. On the next AS startup the chart is re-initialized to that saved state, but the CPU_REST and TRIG_CPU outputs are forced TRUE to signal that operator intervention is required.
4. Root Cause: Consistent vs Inconsistent SFC Data
Siemens officially documents two restart-data states in the PCS 7 SFC manual (PCS 7 SFC Manual):
4.1 Consistent Data
The AS stopped at a defined point: a step was active, or the chart was in Idle. The instance DB can be re-loaded and the chart resumes from that state. The faceplate shows a green returning arrow.
4.2 Inconsistent Data
The AS stopped during a transition evaluation, while a step change was in progress, or while a sequencer was being modified. The instance DB cannot be unambiguously restored. The faceplate shows a red returning arrow. A RESET is mandatory before any further command is accepted.
The "Consistent Data / Green Arrow" appearance combined with a latched TrigCPUR is misleading: although the data is structurally consistent, the operator policy of the system requires an explicit Resume to clear the restart latch. The Resume cannot be issued programmatically through standard I/O writes in some AS firmware versions; the operator must use the SFC Control Panel or the SFC Visualization faceplate.
5. SFC Properties and Retain State Behavior
Open the SFC type in the ES, right-click the chart, and select Object Properties. Three tabs affect restart behavior:
| Tab | Parameter | Restart Impact |
|---|---|---|
| Operating Parameters | Mode (AUTO/MANUAL/CASCADE) | Default mode after CPU restart |
| CPU Operating Parameters | Operating mode, Cyclic execution, Autostart | Determines if SFC self-starts after AS restart |
| Compile/Settings | Retain SFC state | Persistent storage of active step in instance DB |
5.1 Retain SFC State
When enabled: The active step is saved to the retentive area of the instance DB. After CPU restart, the SFC resumes from the saved step but requires Resume/Start acknowledgement.
When disabled: The SFC returns to Idle after CPU restart, regardless of prior state. The instance DB does not store the last active step.
TrigCPUR persists.6. Resolution Procedure: Recovering SFC After CPU Restart
Use the following decision-tree procedure on the OS WinCC Runtime faceplate.
6.1 Identify the State
- Open the SFC faceplate (double-click the SFC symbol in the OS picture).
- Observe the resume icon in the upper-right corner:
- Green returning arrow = consistent data (go to step 6.2).
- Red returning arrow = inconsistent data (go to step 6.3).
- Note the current operating mode from the
QAUTMANindicator.
6.2 Recovery from Consistent Data
- Click the Standard view of the SFC faceplate.
- Switch the chart to Manual mode using the MAN/AUTO button.
- Click Resume in the command group. The chart should clear
CPU_RESTandTRIG_CPU. - Switch back to Auto mode. Verify
RUN= 1 within one cycle.
If Resume has no effect, the SFC is in a protected state. Proceed to step 6.4.
6.3 Recovery from Inconsistent Data
- Open the SFC faceplate.
- Click Reset. The chart transitions to Idle and clears all error latches including
TRIG_CPU. - Click Start to begin execution. The chart will run from the initial step.
6.4 Programmatic Recovery (ES Side)
For automated recovery, use SFC control block commands via the SFC library FB 245 (SFC_CONTROL) or by writing the command word of the SFC instance DB at the symbolic address <SFC_Instance>.-CMD:
// Force Resume on SFC instance "REACTOR_1"
"REACTOR_1".-CMD := 16#0002; // RESUME command code
// Wait one OB1 cycle, then clear the command
"REACTOR_1".-CMD := 16#0000;
Command codes for the SFC instance command word:
| Code (Hex) | Action |
|---|---|
| 16#0001 | START |
| 16#0002 | RESUME |
| 16#0003 | HOLD |
| 16#0004 | ABORT |
| 16#0005 | RESET |
| 16#0006 | STOP |
| 16#0007 | END (acknowledge complete) |
On S7-400 CPUs with firmware V6.x and AS 410 with firmware V8.x, the command word must be pulsed for exactly one OB1 cycle. Holding the command word HIGH will cause the SFC to re-enter the command state on the next scan, creating an oscillation.
7. Configuring CPU Operating Parameters for Autostart
To prevent the manual Resume requirement on routine CPU restarts, configure the SFC to autostart:
- In the PCS 7 ES, right-click the SFC type in the component view.
- Select Object Properties → CPU Operating Parameters tab.
- Set the following parameters:
- Operating mode: AUTO
- Cyclic execution: Enabled (checked)
- Autostart: Enabled (checked)
- Compile and download the SFC to the AS.
With Autostart enabled, the SFC will begin executing from its saved or initial step automatically on the next AS RUN transition, and the TRIG_CPU output will be cleared by the system without operator intervention.
8. AS-OS Communication and Status Word Considerations
The SFC status outputs reach the OS through the AS-OS connection configured in NetPro. The relevant PCS 7 OS connection attributes are:
| Attribute | Recommended Value | Reason |
|---|---|---|
| Update time | 500 ms – 1000 ms | Balance between response time and AS load |
| Life beat monitoring | Enabled | Detect AS connection loss |
| S7 communication | Enabled | Required for SFC command/status transmission |
The status word of an SFC instance is mapped in the instance DB at offset +0 (WORD type). Bit assignments are documented in the PCS 7 SFC reference manual (SFC Reference Manual). The relevant bits for restart diagnosis are:
| Bit | Symbol | Meaning |
|---|---|---|
| 0 | BA_ST | Run state (1 = Running) |
| 1 | BA_AUTO | AUTO mode (1 = Auto) |
| 2 | BA_MAN | Manual mode (1 = Manual) |
| 3 | BA_CASC | Cascade mode (1 = Cascade) |
| 4 | BA_HELD | Held state |
| 5 | BA_ERRG | Group error (ColErr) |
| 6 | BA_EXER | Execution error (ExecErr) |
| 7 | BA_TERR | Time error |
| 8 | BA_CPUR | CPU restart detected (CPURestart) |
| 9 | BA_TGCR | Trigger CPU restart (TrigCPUR) |
9. Common Error Scenarios and Recovery Matrix
| Symptom | Likely Cause | Recommended Action |
|---|---|---|
| Red arrow on faceplate after restart, TrigCPUR latched | Inconsistent data; transition in progress during stop | Issue Reset from SFC faceplate, then Start |
| Green arrow on faceplate, TrigCPUR latched, Resume fails | Operator policy requires manual acknowledgement | Switch to Manual mode, then issue Resume |
| TrigCPUR not set, SFC does not restart | Autostart disabled in CPU Operating Parameters | Enable Autostart, recompile, download to AS |
| All SFCs in OS show TrigCPUR | AS connection lost and restored; entire AS restarted | Issue Resume on each SFC from OS overview picture |
| Resume possible only via faceplate, not by writing command | AS firmware does not accept pulsed command word | Use SFC Control Panel; do not attempt command-word writes |
| SFC returns to Idle despite Retain SFC state enabled | Retain SFC state not selected at SFC type level | Edit SFC type, enable Retain SFC state, recompile all instances |
| Issue persists after all recovery attempts | Corrupted instance DB or SFC type mismatch | Full download of AS station required |
10. Verification and Commissioning Checks
After applying the recovery procedure, verify the SFC has been correctly restored by executing the following checks in order:
-
Output verification: Confirm in the OS faceplate that
RUN= 1,CPU_REST= 0, andTRIG_CPU= 0. - State consistency: Watch the active step indicator in the SFC faceplate for 5 to 10 seconds; it should not flicker between two steps.
- Transition logging: In WinCC Alarm Logging, search for the SFC instance's transition messages; the latest message should correspond to a step change, not to "CPU restart acknowledged."
- Diagnostic buffer: In the ES, open the AS diagnostic buffer (PLC → Diagnostic/Setting → Diagnostic Buffer) and confirm no SFC-related errors are recorded after the recovery.
- Cyclic monitoring: Monitor the SFC instance DB online for 5 minutes; the active step number should change at least once if the process is live, or remain stable if the chart is intentionally idle.
11. Version-Specific Behavior and Firmware Notes
| PCS 7 Version | AS Firmware | Restart Behavior |
|---|---|---|
| V8.0 / V8.0 SP1 | AS 410 V8.0 | Retain SFC state default OFF; Autostart required for automatic recovery |
| V8.1 / V8.2 | AS 410 V8.1 / V8.2 | Resume command via instance DB accepted in all SFC states |
| V9.0 / V9.0 SP1 | AS 410 V9.0 | CPU restart icon optimization; TrigCPUR clears only via Resume or Reset |
| V9.0 SP2 / V9.1 | AS 410 V9.0 / V9.1 | F-runtime group integration improved; Autostart permitted on F-charts with F-permit logic |
The SFC behavior discussed in this article was reproduced and verified on PCS 7 V9.0 SP1 with AS 410 firmware V9.0. The reference to the Siemens support article 48933314 (Siemens Support Article 48933314) remains valid as the canonical procedure for SFC restart handling.
What does the TrigCPUR output mean on an SFC faceplate?
TrigCPUR (output TRIG_CPU_RESTART) is latched TRUE when the AS detected a restart while the SFC instance was retaining state. It signals that operator acknowledgement is required before the chart will continue executing. Clear it by issuing a Resume from the SFC faceplate in Manual mode, or by issuing a Reset followed by Start.
Why does my SFC show a green arrow but Resume does not work?
A green arrow indicates consistent saved data, but the operator policy of the SFC engine still requires an explicit Resume to clear the restart latch. The chart must be in Manual mode before Resume is accepted. Switch to Manual, then click Resume; the chart will continue from the saved active step and clear the TrigCPUR flag.
What is the difference between Reset and Resume for SFCs?
Resume continues the SFC from the saved active step. Reset returns the SFC to Idle and discards the saved step. Use Reset only when the saved state is invalid (red arrow, inconsistent data) or when the process must be restarted from the beginning.
How do I make SFCs autostart after every CPU restart without operator action?
In the SFC type's Object Properties, open the CPU Operating Parameters tab, and enable Operating mode = AUTO, Cyclic execution = Enabled, and Autostart = Enabled. Recompile the SFC type and download to the AS. The SFC will then begin executing on the next AS RUN transition without requiring Resume.
Can the SFC restart issue be resolved by a full download?
Yes. A full download of the AS station clears all instance DBs and reloads the SFC types, which resolves persistent TrigCPUR latch conditions that cannot be cleared by Resume or Reset. This is a last-resort action because it discards the current AS state; schedule it during a process outage or maintenance window.