Resolving Disabled Control Buttons and Freezes in SIMATIC PCS 7 SFC Test Mode
SFC control buttons remain disabled in Test mode when the chart is set to Automatic mode, when ENSTART is FALSE, or when the CPU or S7-PLCSIM instance is not actively executing the SFC runtime group in cyclic interrupt OB35. Freezes occur during test mode termination due to PG/PC communication timeouts. To enable manual testing, switch the SFC operating mode to Manual (MANUAL = 1), verify the CPU is in RUN-P, and confirm cyclic execution.
Table of Contents
- Diagnostic Overview and Symptom Analysis
- SFC Runtime State Machine and Operating Modes
- Step-by-Step Resolution and Testing Procedure
- SFC Operating Modes and Command Control Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Diagnostic Overview and Symptom Analysis
In SIMATIC PCS 7 SFC (Sequential Function Chart) engineering, commissioning logic in S7-PLCSIM or online on a physical controller requires entering Test Mode (Debug > Test Mode or pressing the glasses icon). Engineers frequently observe that upon entering test mode:
1. The execution toolbar buttons at the bottom of the SFC editor (Start, Hold, Resume, Abort, Complete, Reset) remain greyed out or inactive.
2. The current step status does not advance even though transition conditions appear logically satisfied in the logic monitor.
3. Attempting to deactivate test mode or close the SFC window causes the STEP 7 engineering environment to freeze or hang for several minutes while attempting socket teardown.
This behavior occurs because SFC execution logic is governed by an internal hierarchical state machine according to NAMUR NE 33 and ISA-88 standards. The SFC editor serves solely as an online visualization interface to the underlying runtime block (SFC_RTSC / SFC runtime system block) executing in the automation system. If the controller is halted, if the SFC is locked into an external Automatic sequence, or if communication buffers between the engineering station and the AS are misconfigured, interactive command intervention is blocked.
SFC Runtime State Machine and Operating Modes
The SFC block in the automation system processes commands only when specific interlock and operating mode conditions are met:
-
Operating Mode Interlocks (Manual vs. Automatic):
* Automatic Mode (AUTO): The SFC sequence is driven entirely by external block inputs (such as higher-level SIMATIC BATCH recipes, master coordination charts, or CFC interconnections to inputsAUTO,START,HOLD). In Automatic mode, manual operator intervention from the SFC test interface is prohibited by design to prevent recipe corruption.
* Manual Mode (MANUAL): Operator intervention via the SFC Editor or WinCC OS faceplate is permitted. The test buttons activate only when the chart operating state is explicitly switched to Manual. -
Start Enable Signal (
ENSTART):
* Even in Manual mode, the command button Start remains greyed out if the internal parameterENSTART(Enable Start) evaluates to0(FALSE).ENSTARTis typically linked to safety interlocks, process ready states, or device feedback signals. -
Cyclic Interrupt Execution (OB35 Runtime Group):
* When an SFC chart is compiled, CFC places the compiled runtime blocks into an execution group inside a cyclic interrupt organization block (typically OB35, configured at 100 ms). If S7-PLCSIM is placed inSTOPmode, or if the cyclic task OB35 is disabled or overloaded, the runtime system does not calculate state transitions. -
S7 Communication Buffer Hangs:
* During test mode, the SFC editor establishes high-frequency variable polling via S7 Communication. In simulated environments using S7-PLCSIM, improper PG/PC interface selection (e.g., selecting an active physical network card instead ofPLCSIM(MPI)orPLCSIM(ISO)) leads to unacknowledged TCP/MPI frames. When exiting test mode, the editor thread blocks while waiting for the communication layer to acknowledge the termination frame, presenting as an application freeze.
Step-by-Step Resolution and Testing Procedure
1. Verify Simulation Interface and CPU Run State
- In the Windows taskbar, open S7-PLCSIM.
- Confirm the operating switch is in RUN-P (Run with Program read/write access), not
RUNorSTOP. - Open Set PG/PC Interface in SIMATIC Manager (
Options > Set PG/PC Interface). - Set the Access Point of the Application
S7ONLINE (STEP 7)toPLCSIM.MPI.1orPLCSIM.TCPIP.1, matching your hardware configuration.
2. Verify Compilation and Download Parity
- In SIMATIC Manager, select the Chart folder.
- Execute PLC > Compile and Download Objects. Select Charts with Scope: Entire program and download to S7-PLCSIM.
- Open the SFC chart and verify the timestamp matches the compiled AS program.
3. Switch SFC to Manual Mode
- In the SFC Editor toolbar, click the Test Mode icon (glasses).
- Observe the operating mode drop-down box located in the top-left area of the SFC window header.
- If it displays Auto, click the drop-down and select Manual.
- Alternatively, open the associated CFC chart where the SFC external view block or SFC type instance is placed, and ensure the input
MANUALis forced to1orAUTOis set to0.
4. Enable Operator Commands and Overrides
- Check the status bar at the bottom of the SFC editor:
* IfReadyis displayed, verify whether the Start button is illuminated.
* IfStartis greyed out, double-click the SFC header to open SFC Properties > Operating Parameters.
* Verify thatENSTART = 1. If interlocked, trace the connection in CFC and satisfy the permissive condition. - Set the execution mode to Step by step or Continuous depending on your test objective.
5. Prevent Environment Freezes on Disconnect
- Before closing the SFC editor or switching off S7-PLCSIM, click Debug > Test Mode to deactivate online monitoring.
- Wait 3 to 5 seconds for the status bar to show offline status before closing the window or resetting S7-PLCSIM.
SFC Operating Modes and Command Control Matrix
ENSTART = 1, CPU in RUN-PSTART pulse, ENSTART = 1TRUEINTLOCK)INTLOCK = 0 clears faultVerification
- Switch S7-PLCSIM to
RUN-P. - Open the SFC chart in the SFC Editor and activate Test Mode.
- Confirm that the operating mode selector displays Manual.
- Confirm that the Start button at the bottom of the window turns dark/active.
- Click Start; observe that the initial step transitions from
ReadytoActive(green illumination). - Deactivate Test Mode; confirm the window returns to edit mode cleanly within 2 seconds without hanging.
Limitations and Operational Precautions
- Production Controller Warning: Never switch an active production SFC to Manual mode without process authorization. Manual mode decouples the sequence from automated interlock transitions and higher-level recipe managers.
- SFC Instance vs SFC Type: For an SFC Type instantiated inside a CFC chart, commands executed in the SFC Type test editor will affect all instances unless test mode is opened specifically from the instance faceplate or CFC instance block.
- Target Communication Limits: Running test mode on multiple SFC charts simultaneously over a low-bandwidth connection or heavily loaded simulator can exhaust AS communication resources, triggering CPU buffer overruns.
Engineer FAQ
Why does the SFC test button stay disabled even after selecting Manual mode?
The start permissive parameter ENSTART is likely FALSE, or an interlock input such as INTLOCK or LOCK is active on the SFC block. Inspect the runtime block inputs in CFC to verify all run permissives.
Why does my SFC jump straight to 'Aborted' or 'Held' upon starting in test mode?
Check the pre-programmed abort conditions (ENABORT) or hold conditions (ENHOLD). If an external error condition is simulated as active in S7-PLCSIM, the SFC state logic transitions directly to the configured fail-safe state.
Can I force transitions to pass in SFC test mode?
Yes. In SFC Test Mode, you can double-click a transition, check the live values of the boolean inputs, and select the 'Force' or 'Take Over' option to simulate satisfied transition logic during debugging.
Technical References
- SIMATIC Process Control System PCS 7 SFC for S7 (V8.0) Programming and Operating Manual
- SIMATIC Process Control System PCS 7 S7-PLCSIM V5.4 Operating Instructions
- SIMATIC S7-400 Programmable Controller CPU 410-5H Process Automation
- Siemens Industry Online Support: Operating and Testing SFCs in SIMATIC PCS 7 (SIOS Entry ID 109780813)
Related Articles
- Troubleshooting S7-PLCSIM Connection Timeouts with SIMATIC PCS 7 Engineering Stations
- SFC Type versus SFC Chart Architecture in SIMATIC PCS 7 APL
- Configuring ISA-88 State Logic Transitions in PCS 7 SFC Sequences
Related Tags
- SFC
- S7-PLCSIM
- PCS 7 V8.0
- Test Mode
- CFC
- SFC_RTSC