Activating Sequential Function Chart (SFC) Sequence Test Mode with S7-PLCSIM

Activating Sequential Function Chart (SFC) Sequence Test Mode with S7-PLCSIM

Sequential Function Chart (SFC) Sequence Test Mode operates seamlessly within S7-PLCSIM in SIMATIC PCS 7. Because S7-PLCSIM executes the compiled S7-400 instruction set and system function blocks (FB300 / SFC runtime) identically to physical controller hardware, engineers can activate Test Mode directly within the SFC Editor. Sequence Test Mode allows validation of recipe phases, step actions, transition logic, and operating state logic (OSL) without physical I/O. Users can manually step through transitions, force conditions, simulate step run times, and verify holding, aborting, and resetting sequences safely in a simulated environment.

Table of Contents

SFC Execution Architecture in S7-PLCSIM

In SIMATIC PCS 7, Sequential Function Charts (SFC) compile into standard SIMATIC S7 program blocks—primarily function blocks (e.g., FB300) and instance data blocks executing in cyclic organization blocks (typically OB32 or OB35). When simulating an automation station using S7-PLCSIM, the virtual controller fully executes this compiled logic. The engineering interface between the PCS 7 SFC Editor and S7-PLCSIM communicates across the simulated MPI, PROFIBUS, or Industrial Ethernet (ISO/TCP) communication channel without requiring special simulation drivers.

Operating Modes: Process Mode vs Sequence Test Mode

The SFC Editor provides distinct operational test modes to evaluate sequential logic:

Operating ModeExecution BehaviorControl Over Steps & TransitionsTypical Engineering ApplicationProcess Mode (Online Monitoring)SFC executes in real time tied to controller scan cycles and live field inputs.Read-only observation; transition criteria depend on live process variables.Live plant operation; standard runtime monitoring.Sequence Test Mode (Simulation)Internal step timers can be accelerated; automatic transition advancement can be paused.Engineers can manually advance steps, force transition criteria, or set breakpoints.Virtual commissioning; recipe validation; edge-case logic testing.Step Control Mode (Manual Stepping)Sequential chart halts at each step until an operator manually commands progression.Manual trigger required per transition regardless of boolean condition state.Step-by-step logic tracing; hardware safety interlock audits.

Workflow for Enabling Sequence Test Mode

To activate and operate Sequence Test Mode using S7-PLCSIM:

  1. Launch Simulation: In SIMATIC Manager, select Options -> Simulate Modules to launch S7-PLCSIM.
  2. Download Program: Download the hardware configuration, CFC charts, and SFC charts to S7-PLCSIM, then switch the simulated CPU to RUN-P.
  3. Open SFC Chart: In SIMATIC Manager Plant View or Component View, double-click the target SFC chart or SFC type instance.
  4. Switch to Online Test: In the SFC Editor menu, select Debug (or Test) -> Test Mode (or click the eyeglasses icon).
  5. Enable Sequence Test Mode:
    - Navigate to Debug -> Operation Mode -> select Sequence Test Mode.
    - Confirm the yellow status bar indicator changes from Process Mode to Sequence Test.
  6. Control Execution: Use the SFC debugging toolbar to trigger commands: Start, Hold, Resume, Abort, or Step Advance.

Verification

To verify that Sequence Test Mode is actively executing in S7-PLCSIM:

  1. In the SFC Editor window, verify the status bar displays Online: RUN and Sequence Test Mode.
  2. Observe the active step (highlighted in bright green with an active run indicator).
  3. Double-click a downstream transition object: verify that transition conditions display live evaluation states (green for true, red for false).
  4. Force an unsatisfied transition condition to True: confirm that the SFC immediately transitions to the subsequent step.
  5. Verify that corresponding block outputs in CFC reflect the newly executed step actions.

Limitations and Operational Precautions

Operational boundaries when testing SFCs in S7-PLCSIM:

  • Asynchronous Timing Variations: S7-PLCSIM cycle times depend on host PC processor load and do not guarantee hard real-time deterministic scan cycles identical to physical AS 410-5H controllers.
  • OS Interlock Synchronization: If testing SFCs interconnected with WinCC OS faceplates, ensure WinCC is connected to the S7-PLCSIM virtual adapter (PLCSIM.TCPIP.1 or PLCSIM.ISO.1).
  • Never Download While in Sequence Test: Always exit Test Mode before executing full or changes-only chart downloads from CFC or SFC editors.

Engineer FAQ

Can I force transition conditions inside Sequence Test Mode without modifying CFC logic?

Yes. In Sequence Test Mode, opening the transition properties window allows engineers to manually override individual boolean conditions or force the entire transition result to True.

Does Sequence Test Mode accelerate step timer durations in S7-PLCSIM?

Yes. Engineers can configure time scaling factors within the SFC test settings to compress multi-hour batch step holding times into seconds for rapid sequential validation.

What happens to physical I/O during Sequence Test Mode in S7-PLCSIM?

In S7-PLCSIM, physical I/O does not exist; all inputs and outputs reside in the process image partition tables, which are safely driven by test scripts, simulation models, or manual overrides.

Can multiple SFC charts be monitored simultaneously in Sequence Test Mode?

Yes, multiple SFC charts and SFC type instances can be opened and monitored concurrently in the PCS 7 engineering environment connected to S7-PLCSIM.

Technical References

Related Articles

Related Tags

  • SFC
  • S7-PLCSIM
  • Sequence-Test-Mode
  • Simulation
  • Operating-State-Logic
  • Virtual-Commissioning
8 respuestas