Understanding Step Processing and Action Execution Cycles in PCS 7 SFC Types

Understanding Step Processing and Action Execution Cycles in PCS 7 SFC Types

In SIMATIC PCS 7 SFC Types, each step executes through a defined three-phase lifecycle: Initialization ('Init'), Processing ('Run'), and Termination ('Term'). Initialization actions execute exactly once upon entering the step; Processing actions execute cyclically on every CPU scan cycle while the step remains active; and Termination actions execute exactly once when the succeeding transition condition evaluates to TRUE. Minimum and maximum step runtimes ('T_MIN' and 'T_MAX') govern step duration, preventing premature termination or raising timeout alarms if the transition fails to clear.

Table of Contents

Executive Summary

Developing deterministic procedural sequences and equipment phases in SIMATIC PCS 7 requires a comprehensive understanding of how the Sequential Function Chart (SFC) engine executes actions within individual steps. Automation engineers frequently encounter timing anomalies—such as pulse outputs triggering multiple times, setpoints failing to latch, or steps terminating before field actuators reach physical limit switches. This article provides an in-depth breakdown of the SFC step execution engine, the functional roles of Initialization, Processing, and Termination actions, and step timer mechanics.

Architecture and Fundamental Mechanics

SFC Step Execution Lifecycle and Internal Timing Mechanics:

  • The Three-Phase Step Lifecycle:
    1. Initialization Action (Init):
    • Executes for exactly one cycle when the step becomes active.
    • Typical Use: Pulsing command inputs, initializing step timers, resetting fault counters, and opening initial valve paths.
      2. Processing Action (Run):
    • Executes cyclically on every scan cycle as long as the step remains active and the transition condition is FALSE.
    • Typical Use: Continuous PID setpoint ramping, monitoring process variables, and maintaining interlock enables.
      3. Termination Action (Term):
    • Executes for exactly one cycle after the succeeding transition evaluates to TRUE, immediately before handing control to the next step.
    • Typical Use: Resetting command bits, turning off dosing pumps, and logging completion timestamps.
  • Step Time Management Parameters:
  • T_MIN (Minimum Run Time): Enforces a minimum dwell time. Even if the transition condition becomes TRUE immediately, the SFC engine holds the step in the Processing phase until T_MIN elapses.
  • T_MAX (Maximum Run Time): Supervisory timeout. If the step remains active longer than T_MAX, the SFC asserts a step timeout alarm (QSTEP_TIM_ERR).
  • T_ACT (Current Run Time): Elapsed runtime of the active step in seconds/milliseconds.

Step-by-Step Implementation Procedure

Best-Practice Procedure for Programming SFC Step Actions:

  1. Open the SFC Type / Sequencer Editor:
    - In SIMATIC Manager, open the SFC Type or CFC chart containing the SFC.
    - Open the Sequencer view and double-click the target step (e.g., Step_Dosing).
  2. Configure Initialization Actions (Init):
    - Under the Initialization tab, add statements that must occur only once:
    • Valve_Feed.OpenAut := TRUE;
    • Pump_Dose.StartAut := TRUE;
  3. Configure Processing Actions (Run):
    - Under the Processing tab, add continuous setpoint tracking:
    • PID_Flow.SP_Ext := Recipe_Dosing_Rate;
  4. Configure Termination Actions (Term):
    - Under the Termination tab, cleanly reset commands before advancing:
    • Pump_Dose.StartAut := FALSE;
    • Valve_Feed.OpenAut := FALSE;
  5. Configure Step Run Time Constraints:
    - In Step Properties -> Times tab:
    • Set Minimum run time (Tmin): e.g., T#5s (guarantees pump runs at least 5 seconds).
    • Set Maximum run time (Tmax): e.g., T#60s (trips timeout alarm if dosing stalls).
  6. Compile and Download:
    - Compile CFC/SFC changes and download to the AS.

Verification

To verify step action execution:
1. In the SFC editor, switch to online test mode.
2. Start the sequence; observe that upon stepping into Step_Dosing, the step color turns dark green (active).
3. Confirm that Initialization actions execute on cycle 1.
4. Verify that the transition does not evaluate until T_MIN expires, and observe that upon transition confirmation, Termination actions execute cleanly on cycle $N$ before the step turns light green (inactive).

Limitations and Operational Precautions

Operational precautions:
- Do not place continuous setpoint assignments inside Init actions if downstream blocks continuously overwrite them; continuous tracking belongs in Processing (Run).
- Avoid zero-duration steps without T_MIN on physical field devices, as rapid cycling can cause mechanical stress on contactors and valves.
- Ensure that T_MAX timeouts are interlocked with plant alarms so operators are alerted to stalled material feeds.

Engineer FAQ

What is the difference between Initialization and Processing actions in an SFC step?

Initialization actions execute once on the first cycle upon entering the step; Processing actions execute cyclically on every CPU scan while the step is active.

When do Termination actions execute?

Termination actions execute for exactly one cycle immediately after the succeeding transition condition evaluates to TRUE.

What happens if a transition is TRUE but T_MIN has not elapsed?

The step remains active in the Processing phase until the minimum run time T_MIN expires.

Does exceeding T_MAX stop the SFC automatically?

By default, exceeding T_MAX raises a step error flag and alarm, but does not abort the sequence unless an explicit abort interlock is programmed.

Where do I reset valve commands when leaving a step?

In the Termination (Term) tab of the step, ensuring actuators de-energize before entering the next phase.

Technical References

Related Articles

Related Tags

  • SFC Step Processing
  • Init Run Term
  • Step Times
  • T_MIN T_MAX
  • Sequencer Logic
20 respuestas