Configuring SFC Type State Logic for Holding, Resuming, and Custom Step Skipping

Configuring SFC Type State Logic for Holding, Resuming, and Custom Step Skipping

When an SFC Type enters the Held state following an interlock or pause command in SIMATIC PCS 7, issuing a Resume command restarts execution from the step recorded at interruption (CUSEQ/CUSTEP). To resume execution from a different step or skip steps, configure dedicated branch transitions within the 'Resuming' state sequencer or evaluate a technological 'ResumeIndex' parameter. Avoid hardcoding internal step numbers as constants, because modifying sequencer structure during compilation re-indexes step IDs. Alternatively, operators with appropriate privileges can select a target step in Manual mode prior to resuming.

Table of Contents

Executive Summary

In SIMATIC PCS 7 (V8.0 through V9.1), object-oriented batch and phase control implemented via SFC Types follows ISA-88 / NAMUR state machine models. When a process exception occurs, the SFC sequencer transitions from Running through Holding to the Held state. Standard SFC runtime behavior resumes the sequence at the exact step where execution stopped. However, process operating procedures often require skipping pre-heating, venting, or dosing steps upon resumption if process criteria have already been fulfilled. This article provides the architecture of SFC Type state sequencers, explains the risks of hardcoding step numbers, and details robust branching and parameter-driven resumption methods.

Architecture and Fundamental Mechanics

State Machine Architecture and Resumption Mechanics in SFC Types:

  • ISA-88 State Transition Model:
  • SFC Types maintain separate, independent sequencers for distinct operational states:

    • RUNNING: Executes normal forward batch or continuous unit operations.
    • HOLDING: Executes safe pause actions (e.g. closing feed valves, halting agitators).
    • HELD: Static quiescent state waiting for operator or automated resume commands.
    • RESUMING: Executes preparatory startup actions (e.g. purging lines, restarting heating).
    • COMPLETING, ABORTING, STOPPING: Dedicated terminal and exception handlers.
  • Internal Tracking Registers (CUSEQ and CUSTEP):

  • When an SFC transitions to Holding, the runtime system captures the active sequence index (CUSEQ) and active step index (CUSTEP).
  • When the Resume command is triggered, the RESUMING sequencer executes to completion, and control automatically hands back to CUSEQ and CUSTEP in the RUNNING sequencer.

  • Risks of Constant Step Number Assignment:

  • Engineers sometimes attempt to force resumption by manually writing integer constants into CUSTEP.
  • Crucial Architectural Warning: Step numbers in SFC Types are assigned dynamically by the CFC/SFC compiler based on chart topological coordinates. If an engineer inserts, deletes, or rearranges a step in the library template, step numbers shift. Hardcoded numerical constants will jump to unintended steps, creating serious safety hazards.

  • Recommended Technological Branching Architecture:

  • Instead of manipulating internal step counters, implement a technological decision step in the RESUMING sequencer or at the entry of the resumed phase.
  • Use an integer control parameter (e.g. ResumeTargetStep or boolean flags like SkipDosing) evaluated by alternate transition branches. This ensures deterministic, compiler-safe navigation.

Step-by-Step Implementation Procedure

Step-by-Step Procedure to Implement Parameter-Driven SFC Resumption:

  1. Define Technological Resumption Parameters:
    - Open the target SFC Type in SIMATIC Manager Component View or Master Data Library.
    - In the tree view, navigate to Characteristics -> Inputs/Outputs.
    - Create an integer parameter ResumeTarget (Data type: INT, default 0).
    - Create a boolean command flag ApplyTarget (Data type: BOOL).
  2. Configure the Resuming State Sequencer:
    - In the SFC Type sequencer dropdown, switch from RUNNING to RESUMING.
    - Program necessary safety re-initialization actions in the RESUMING steps (e.g. confirming cooling water flow, verifying permissive pressures).
    - In the final transition of RESUMING, confirm process permissives are satisfied.
  3. Implement Alternative Branches in the Main Running Sequencer:
    - Switch back to the RUNNING sequencer.
    - At critical phase junctions where steps may be skipped, insert an alternative transition branch.
    - Branch A (Normal): Evaluates standard step completion conditions.
    - Branch B (Skip/Jump): Evaluates condition ResumeTarget == N AND ApplyTarget == TRUE.
    - Route Branch B directly around the skipped steps to the target step.
  4. Reset Resumption Flags:
    - In the initialization action of the target step, reset ApplyTarget := FALSE and ResumeTarget := 0 to prevent unintended branching on subsequent runs.
  5. Compile and Update Block Types:
    - Save and compile the SFC Type.
    - In CFC, execute Options -> Block Types -> Update... to synchronize all SFC instances across the project.

Verification

Verification Procedure:
1. Normal Resume Test: Open an SFC Instance in CFC Test Mode. Start the sequence; trigger an interlock to force the SFC into Held. Issue Resume without setting ResumeTarget. Verify execution resumes at the interrupted step.
2. Step Skip Test: Re-run the test, transition to Held, and set ResumeTarget = 3 and ApplyTarget = TRUE. Issue Resume. Confirm the sequencer executes the Resuming sequence and branches directly to Step 3, bypassing Steps 1 and 2.
3. Parameter Reset Check: Verify that upon arriving at Step 3, ApplyTarget is automatically cleared to FALSE.

Limitations and Operational Precautions

Operational Precautions and Process Safety Constraints:
- Never bypass safety interlocks: Skipping process steps must not skip essential purging, venting, or pressure-relief procedures required by plant HAZOP guidelines.
- Manual Mode Overrides: In Manual mode, an authorized operator can use the 'Set Step' command on the WinCC SFC faceplate to manually activate a specific step before clicking Resume.
- S88 Batch Integration: If the SFC Type is driven by SIMATIC BATCH, manual step forcing must be coordinated with the recipe unit recipe allocation to prevent batch recipe state desynchronization.

Engineer FAQ

What happens by default when an SFC resumes from the Held state?

By default, the SFC executes its 'RESUMING' sequencer and returns to the exact step and sequence where it was interrupted, tracked by internal registers CUSEQ and CUSTEP.

Why is hardcoding CUSTEP numbers in logic dangerous?

Because the compiler dynamically renumbers internal step IDs whenever the sequencer layout is modified or recompiled, leading to unintended branch jumps.

Can an operator manually force an SFC step from WinCC?

Yes. In Manual mode with appropriate user authorization, an operator can select a step on the SFC faceplate and execute the 'Set Step' command.

What sequencer handles shutdown actions when an SFC is stopped?

The STOPPING sequencer handles controlled shutdown actions before entering the STOPPED state.

Do SFC Types support bumpless step transfers?

Yes. Step transitions in SFC execute deterministically within the configured cyclic interrupt OB without dropping output values.

Technical References

Related Articles

Related Tags

  • SFC Type
  • State Logic
  • Holding and Resuming
  • ISA-88
  • Batch Control
20 respuestas