Configuring Dynamic SFC Step Execution Times from WinCC in SIMATIC PCS 7

Configuring Dynamic SFC Step Execution Times from WinCC in SIMATIC PCS 7

In SIMATIC PCS 7 Sequential Function Charts (SFC), configuring dynamic, operator-adjustable step execution limits from WinCC without hardcoding static constants (such as T#5m) or adding external Timer_P blocks to CFC is achieved by utilizing SFC Types with technological input parameters or linking dynamic time variables to internal step runtime attributes. By assigning an operator-controllable TIME input to the step maximum runtime attribute (CUSTEPMAXRT) or comparing the current step elapsed time (CUSTEPRT) in transition branches, operators can modify batch step durations online while preserving native sequencer timing.

Table of Contents

Static vs Dynamic Step Timing in SIMATIC PCS 7 SFC

In standard SIMATIC PCS 7 SFC charts, each sequencer step incorporates native time attributes for minimum run time (Tmin) and maximum run time (Tmax). In standard practice, engineers parameterize these attributes as fixed literals (such as T#30s or T#10m). While effective for fixed automated sequences, batch and multi-grade production processes frequently require operators to adjust heating phases, mixing durations, or reaction hold times directly from runtime faceplates without reopening engineering tools.

Historically, engineers added external timer blocks (such as Timer_P from the standard library) in CFC charts and cross-wired timer outputs into SFC transitions. This approach introduces engineering clutter, consumes additional Process Objects and memory, and complicates sequencer visualization. Modern PCS 7 engineering provides native mechanisms within SFC Types and chart attributes to parameterize dynamic step execution times cleanly.

Configuring Operator TIME Inputs in SFC Types

The most robust architecture for runtime time adjustment is creating a technological parameter within an SFC Type:

  1. Open the SFC Type Editor: In SIMATIC Manager, navigate to the Master Data Library and open the target SFC Type.
  2. Define Technological Characteristic:
    - In the characteristics tree, right-click Inputs and insert a new characteristic (e.g., StepHoldTime_Op).
    - Set Data Type to TIME.
    - Set initial value (e.g., T#5m), high limit (T#60m), and low limit (T#1m).
    - Check the attribute S7_m_c = true to expose the parameter to the OS.
  3. Compile OS: Perform a changes-only OS compilation. The parameter automatically populates the WinCC SFC faceplate parameter tab, enabling authorized operators to change the time setpoint online.

Utilizing CUSTEPMAXRT and CUSTEPRT Internal Attributes

Inside the sequencer logic, the operator parameter can be evaluated through two distinct methods:

  • Method 1: Dynamic Assignment to CUSTEPMAXRT:
  • In the step initialization or run action, assign the technological variable to the internal step maximum run time attribute:
    StepName.CUSTEPMAXRT = StepHoldTime_Op
  • The SFC runtime engine replaces the nominal maximum step time with the dynamic value. If the step remains active longer than this value, the sequencer triggers a step timeout error (StepName.Tmax = True).

  • Method 2: Transition Comparison via CUSTEPRT:

  • In the transition following the timed step, inspect the current step run time:
    StepName.CUSTEPRT >= StepHoldTime_Op
  • When the elapsed active step time reaches the operator's setpoint, the transition evaluates to True, advancing the sequence cleanly to the subsequent step without auxiliary timer blocks.

Comparison of Dynamic SFC Timing Methods

The following table compares architectural methods for implementing dynamic step timers in PCS 7:

Timing MethodImplementation LevelProcess Object / License ImpactOperator Faceplate VisibilityEngineering ComplexityStatic Constant (T#5m)Step PropertiesZero PO impactNone (Requires ES modification)MinimalExternal Timer_P in CFCCFC Chart InterconnectionConsumes AS PO / Work MemoryRequires separate timer faceplateHigh (Cluttered interconnections)SFC Type + CUSTEPMAXRTSFC Type CharacteristicZero extra POs (Included in SFC)Native SFC Type Parameter TabLow (Clean technological design)SFC Type + CUSTEPRTTransition Logic ComparisonZero extra POs (Included in SFC)Native SFC Type Parameter TabLow (Highly flexible branching)

Note: Utilizing native SFC attributes preserves step-time audit logging in SIMATIC BATCH and Process Historian archives.

Verification

Verify dynamic step execution timing in WinCC Runtime:
1. Open the SFC Type faceplate in WinCC Runtime and navigate to the Parameters tab.
2. Modify StepHoldTime_Op from T#5m to T#20s and click Apply.
3. Start the sequence; observe the step active timer counting upwards.
4. Verify that when the timer reaches 20 seconds, the transition satisfies immediately and the sequencer advances to the next step.
5. In test mode, set the time below allowable limits; confirm that high/low plausibility bounds prevent invalid operator entries.

Limitations and Operational Precautions

Key precautions when designing dynamic SFC timers:
- Always define strict high and low plausibility limits on the TIME parameter in the SFC Type to prevent operators from inadvertently inputting zero or days-long holding times.
- Step timers execute within the cyclic interrupt OB hosting the SFC (e.g., OB32 at 1.0 s or OB35 at 100 ms); timing precision is limited to the configured task cycle interval.
- Modifying step time setpoints while the step is already actively running will take effect immediately, but reducing time below the already elapsed duration will trigger instantaneous transition.

Engineer FAQ

Can I use dynamic time parameters in standalone SFC Charts as well as SFC Types?

Yes, but in standalone SFC charts, the variable must be declared in a CFC block or shared DB and wired into the SFC chart inputs, whereas SFC Types expose parameters natively.

What is the difference between CUSTEPRT and CUSTEPMAXRT?

CUSTEPRT represents the current elapsed active time of the step, while CUSTEPMAXRT represents the configured maximum allowable runtime before a step error is flagged.

Can an operator pause the step timer during runtime?

Yes. By utilizing the SFC Hold state (HOLD), the sequencer pauses execution and halts CUSTEPRT counting until resumed (RESUME).

Technical References

Related Articles

Related Tags

  • SFC
  • SFC Types
  • Step Runtime
  • CUSTEPRT
  • Dynamic Timers
6 respuestas