Understanding Step Actions and Signal Retention in SIMATIC PCS 7 SFC Sequences
In SIMATIC PCS 7 SFC and SFC Types, step actions are categorized into Initialization, Processing, and Termination. Signals modified during the 'Processing' (Bearbeitung) phase perform latching assignments and are NOT automatically reset when the step terminates. If an action sets a boolean variable to TRUE during Processing, that variable remains TRUE in all subsequent steps unless it is explicitly reset to FALSE in the step's 'Termination' (Beendigung) tab or by an action in a later step.
Table of Contents
- Executive Summary
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
Sequential Function Charts (SFC and SFC Types) govern discontinuous state transitions, procedural recipes, and equipment control logic in SIMATIC PCS 7. A fundamental point of confusion for automation engineers transitioning to PCS 7 is the operational lifecycle of step actions: specifically, whether actions executed while a step is active automatically clear when the sequence advances to the next step.
In standard IEC 61131-3 SFC implementations outside PCS 7, some non-stored qualifiers (such as 'N' - Non-stored) automatically drop when a step deactivates. However, in SIMATIC PCS 7, step actions operate as explicit latching variable assignments. A drive start command or valve open flag energized in 'Processing' will remain latched indefinitely if not explicitly managed. This guide explains the exact execution order of Initialization, Processing, and Termination phases, analyzes signal retention mechanics, and outlines best practices to prevent unintended actuator commands.
Architecture and Fundamental Mechanics
The execution model of SIMATIC PCS 7 SFC complies with strict cyclic interrupt timing within the S7 controller:
-
The Three Step Action Phases:
- Initialization (Initialisierung): Executed exactly ONCE during the first CPU execution cycle in which the step becomes active. Used for latching initial conditions, starting timers, or triggering edge-detected pulses.
- Processing (Bearbeitung): Executed CYCLICALLY on every Organization Block scan (e.g., OB35 at 100 ms) while the step remains active and its outgoing transition is FALSE. Used for continuous control actions, setpoint ramping, and interlock tracking.
- Termination (Beendigung): Executed exactly ONCE during the CPU cycle in which the step's outgoing transition evaluates to TRUE, immediately before the step deactivates and passes control to the successor step. Used for turning off actuators, resetting flags, and archiving step metrics. -
Signal Retention (Latching Behavior):
- In PCS 7 SFC, step actions perform direct memory assignments (Target := Value).
- There is NO automatic clearing mechanism for variables modified in 'Processing'. IfValve_Open.Value := TRUEis executed in Processing, the underlying instance DB or global variable retainsTRUEafter the step terminates.
- If the engineer fails to assignValve_Open.Value := FALSEin the Termination tab, the valve remains commanded open in subsequent steps, introducing severe process and safety hazards. -
Comparison with CMT Technological Actions:
- In modern Control Module Type (CMT) and Equipment Phase Type (EPHT) architectures, technological 'Commands' encapsulate automatic termination rules. When a technological command is used, the CMT defines the reset action upon termination automatically. However, in traditional SFC step programming, manual assignment in the Termination tab is strictly mandatory.
Step-by-Step Implementation Procedure
Follow these rules and steps to configure deterministic step actions and signal resets in PCS 7 SFC:
-
Structure Step Actions Across the Three Lifecycle Tabs:
- Open the target Step Object Properties in the SFC Editor.
- Identify the operational purpose of each signal assignment:- Initialization: Use for setting initial step setpoints, resetting step error flags, or pulsing one-shot triggers.
- Processing: Use for asserting active run commands (e.g.,
Pump_Start := TRUE) and passing continuous setpoints. - Termination: ALWAYS configure the inverse reset action for any temporary command asserted in Processing (e.g.,
Pump_Start := FALSE).
-
Implement Safe Termination Actions:
- In the Step Properties dialog, click the 'Termination' tab.
- In the action table, add explicit reset lines for every actuated device:Feed_Valve.OpenAut.Value := FALSEAgitator.StartAut.Value := FALSEDosing_Active_Flag := FALSE- Click 'Apply' to save the termination logic.
-
Manage Abort and Hold Exception Sequencers:
- Standard sequence stepping handles termination when transitions pass normally. However, if an operator clicks 'Hold', 'Abort', or 'Stop', the active operational step is immediately exited!
- When an SFC transitions intoHOLDINGorABORTING, the normal operational step's Termination tab is bypassed.
- To ensure plant safety, open the SFC Type's dedicatedHOLDINGandABORTINGsequencers.
- In the initial step of the abort sequencer, insert explicit de-energization commands for all field actuators. -
Utilize Step Time (TI) and Run Time (TR) Deterministically:
- Monitor step duration using internal attributesStepName.TI(Time In step, active execution time) andStepName.TR(Time Running, including held periods).
- In the outgoing transition, evaluate process completion alongside minimum run times (e.g.,Level_OK AND Step_Dose.TI >= T#5s). -
Compile and Verify Execution:
- Save and compile the SFC Type or SFC chart.
- Download changes to the controller in RUN mode.
Verification
- In the CFC Editor, open the chart containing the SFC instance and switch to Test Mode (Online).
- Open the SFC Editor in online monitoring mode.
- Trigger sequence execution: observe the sequence entering the configured step. Verify that in 'Processing', the actuator command switches to
TRUE. - Satisfy the transition conditions to advance the sequence: observe the step deactivating.
- Verify online in the CFC sheet that the commanded pin immediately drops to
FALSEupon step exit, confirming that the Termination tab executed successfully. - Test exception handling: trigger an emergency Hold while the step is active. Confirm that the
HOLDINGsequencer de-energizes the actuator instantly.
Limitations and Operational Precautions
Never rely on the subsequent step to reset an actuator command from a previous step; if an alternative sequence branch is taken, the reset step may be skipped entirely, leaving the actuator stuck in an energized state. In fail-safe or safety-critical applications, sequence termination logic must be backed by hardware-level safety interlocks in safety CFCs. Verify all software engineering tools and licensing options through an authorized Siemens distributor or the Siemens Industry Mall.
Engineer FAQ
Does PCS 7 SFC support automatic non-stored (N) qualifiers?
No. Unlike some third-party IEC 61131 tools that automatically clear non-stored actions upon step exit, PCS 7 SFC actions are latching assignments. You must explicitly configure reset logic in the Termination tab.
What is the difference between Initialization and Processing tabs?
Initialization executes only once on the first cycle the step activates. Processing executes cyclically on every OB cycle while the step remains active.
When exactly does the Termination tab execute?
The Termination tab executes once during the CPU cycle in which the outgoing transition becomes TRUE, immediately before control passes to the next step.
What happens to active step commands if the SFC is aborted?
The active step's Termination tab is bypassed when aborting. You must explicitly reset actuator commands within the initial step of the ABORTING sequencer.
Can I view step execution times in WinCC faceplates?
Yes. The SFC faceplate displays the active step name, current step run time (TI), and total sequencer run time in real time.
Technical References
- SIMATIC Process Control System PCS 7 SFC for S7 (V8.2 / V9.0 / V9.1) Manual
- SIMATIC Process Control System PCS 7 Advanced Process Library Manual
- Siemens Industry Online Support FAQ 109740190 - Step Action Execution and Lifecycle in PCS 7 SFC
Related Articles
- how-to-use-dummy-step-and-dummy-bit-sfc
- SFC-Type--Bit-Memory
- Action-(Technological)-not-working-as-it-should---PCS7-V9-1-with-SFC-V9-0+SP5+Upd2
Related Tags
- SFC
- Step Actions
- Initialization
- Processing
- Termination
- PCS 7 V9.1