Resetting Sequential Function Chart (SFC) Step Visual Status to Idle (Gray) in SIMATIC PCS 7
In SIMATIC PCS 7 Sequential Function Charts (SFC), when an operator or automation program executes the 'Reset' command and the sequencer transitions to the 'Idle' state, steps that previously completed or held frequently remain highlighted in green or blue instead of clearing to neutral gray. To ensure that all steps visually reset their statuses to gray upon entering Idle: the sequencer must execute a complete initialization pass by configuring the SFC Operating Mode to 'Auto' with parameter 'INIT_RUN = 1', or by configuring the SFC visualization properties to clear inactive step markers upon sequencer reset.
Table of Contents
- SFC State Machine and Step Visualization Mechanics
- Why Step Status Colors Persist After Sequencer Reset
- Configuring Automatic Step Initialization on Reset (INIT_RUN)
- SFC Operating State vs Step Visual Representation Table
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
SFC State Machine and Step Visualization Mechanics
In SIMATIC PCS 7, Sequential Function Charts conform to the standardized state transition diagram defined by NAMUR and ISA-88. An SFC operates through a formal state machine (Idle, Starting, Run, Holding, Held, Aborting, Aborted, Resetting):
- Step Color Coding in SFC Visualization:
* Dark Gray: Inactive / Unprocessed step (Initial idle baseline).
* Bright Green: Active step currently executing actions.
* Dark Green / Blue: Completed step (transition evaluated TRUE, but step history preserved for operator review).
* Red: Step timed out or transition interlocked / errored.
* Yellow: Step held or suspended.
- Visual Memory vs Controller State:
* For operator diagnostic convenience, the SFC runtime engine (FB 300 / FB 247) deliberately retains the visual history of the last executed batch or sequence run.
* When a sequence reaches the Completed or Aborted state, the steps that fired remain colored so plant technicians can trace the exact trajectory taken through parallel branches.
Why Step Status Colors Persist After Sequencer Reset
When an operator issues the Reset command from a WinCC faceplate (@[email protected]) or writes RESET = 1 in CFC:
1. The Transition to Idle:
- The sequencer transitions from Completed, Aborted, or Stopped into the Idle state.
2. Retention of Step History Flags:
- By default, the step status byte array within the SFC work data block retains the bit flags indicating past execution.
- Unless the controller code performs an explicit initialization cycle (INIT_RUN), the runtime engine does not zero out the step status bitmasks.
- In Graphics Runtime, the WinCC SFC Visualization OCX (@SFC_Visualization.ocx) reads the non-zero status array and continues rendering the completed steps in dark green or blue, misleading operators into thinking the sequence is still partially active.
Configuring Automatic Step Initialization on Reset (INIT_RUN)
To force the SFC engine to flush all step statuses and reset every graphic step to gray upon entering Idle:
-
Enable Automatic Step Initialization in SFC Properties:
- In SIMATIC Manager, open the target SFC chart in the SFC Editor.
- In the menu bar, select SFC > Properties.
- Navigate to the Options tab.
- In the Operating Characteristics section:- Check Initialize steps on transition to Idle (or Initialize on Reset).
- Check Autoreset if the sequence should clear automatically upon completion.
-
Parameterize SFC Runtime Control Pins in CFC:
- Open the CFC chart containing the SFC instance.
- Locate the input pinINIT_RUN(Initialize Run):- Connect the sequencer's
IDLEstatus output (or an invertedBUSYsignal) through a one-shot edge trigger toINIT_RUN. - When
INIT_RUN = 1, the SFC engine wipes the internal step history registers, setting all step status words to16#0000.
- Connect the sequencer's
-
Configure WinCC SFC Visualization Settings:
- In Graphics Designer, open the SFC display picture.
- Right-click the SFC Control object and select Properties.
- Under Appearance / Colors, verify that Clear on Reset is set toTRUE.
- Re-compile the CFC program and download changes to the AS.
SFC Operating State vs Step Visual Representation Table
The following table details the relationship between SFC sequencer states and step visualization colors:
INIT_RUN executesVerification
To confirm that the SFC resets all steps to neutral gray upon entering Idle:
1. Open the SFC chart in test mode within the SFC Editor, or open the SFC faceplate in WinCC Runtime.
2. Execute a sequence run: observe the sequencer progress through several steps, confirming active steps turn bright green and completed steps turn dark green/blue.
3. Allow the sequence to reach Completed (or issue an Abort command).
4. Click the Reset button in the faceplate (or pulse RESET = 1 in CFC).
5. Verify that:
- The sequencer state transitions immediately to Idle.
- Every individual step graphic in the chart instantly dumps its color and turns uniform Dark Gray.
- The active step indicator clears to step 0 / none.
Limitations and Operational Precautions
When configuring automated SFC step resets:
1. Loss of Diagnostic Traceability: Flushing step statuses immediately upon entering Idle eliminates post-trip sequence forensics. Operators will be unable to see which step was executing when an emergency shutdown occurred. For safety-critical sequences, require an explicit manual reset.
2. Step Exit Actions: Ensure that clearing steps via INIT_RUN does not bypass critical step termination actions (e.g. closing emergency valves). All physical safety closures must be commanded in the sequence termination or aborting branches, not reliant on visual step initialization.
3. SFC Types vs SFC Charts: In SFC Types, the step initialization behavior is configured globally within the SFC Type template in the Master Data Library and propagated via 'Update Block Types'.
Engineer FAQ
Why does PCS 7 keep completed steps green after the sequence finishes?
By design, PCS 7 preserves the visual history of the completed sequence so operators can review which branches executed and verify that all criteria were met before starting a new batch.
What does the INIT_RUN input do on an SFC block?
INIT_RUN executes a master re-initialization of the SFC engine. It forces all internal step timers, transition flags, and status registers to their initial default values (all steps inactive/gray).
Can I reset step colors without resetting the entire SFC?
No. Step colors reflect the internal execution state of the SFC engine. Individual steps cannot be visually cleared while the sequencer is actively running.
Where is the 'Autoreset' option configured in SFC?
In the SFC Editor, select SFC > Properties > Options. Enabling 'Autoreset' causes the SFC to transition automatically from Completed to Idle without waiting for an operator click.
Technical References
- SFC for SIMATIC S7 / PCS 7 Programming Manual
- SIMATIC PCS 7 Advanced Process Library (APL) Sequential Control Guide
- Siemens Industry Online Support Entry 168212 - Managing SFC Step Status Displays
Related Articles
- Configuring Dynamic SFC Step Execution Times from WinCC in SIMATIC PCS 7
- Resolving SFC Calculation Function Execution Failures in SIMATIC PCS 7 v8.2
- Identifying Data Blocks and Instance DBs Generated by SFC Charts in SIMATIC PCS 7 - Chart Reference Data and S7 Resource Allocation
Related Tags
- PCS7_SFC
- SFC_Visualization
- Step_Status
- Idle_State
- INIT_RUN
- Sequencer_Reset
- WinCC_SFC