Resolving Disabled Control Buttons and Freezes in SIMATIC PCS 7 SFC Test Mode

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

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:

  1. 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 inputs AUTO, 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.

  2. Start Enable Signal (ENSTART):
    * Even in Manual mode, the command button Start remains greyed out if the internal parameter ENSTART (Enable Start) evaluates to 0 (FALSE). ENSTART is typically linked to safety interlocks, process ready states, or device feedback signals.

  3. 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 in STOP mode, or if the cyclic task OB35 is disabled or overloaded, the runtime system does not calculate state transitions.

  4. 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 of PLCSIM(MPI) or PLCSIM(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

  1. In the Windows taskbar, open S7-PLCSIM.
  2. Confirm the operating switch is in RUN-P (Run with Program read/write access), not RUN or STOP.
  3. Open Set PG/PC Interface in SIMATIC Manager (Options > Set PG/PC Interface).
  4. Set the Access Point of the Application S7ONLINE (STEP 7) to PLCSIM.MPI.1 or PLCSIM.TCPIP.1, matching your hardware configuration.

2. Verify Compilation and Download Parity

  1. In SIMATIC Manager, select the Chart folder.
  2. Execute PLC > Compile and Download Objects. Select Charts with Scope: Entire program and download to S7-PLCSIM.
  3. Open the SFC chart and verify the timestamp matches the compiled AS program.

3. Switch SFC to Manual Mode

  1. In the SFC Editor toolbar, click the Test Mode icon (glasses).
  2. Observe the operating mode drop-down box located in the top-left area of the SFC window header.
  3. If it displays Auto, click the drop-down and select Manual.
  4. Alternatively, open the associated CFC chart where the SFC external view block or SFC type instance is placed, and ensure the input MANUAL is forced to 1 or AUTO is set to 0.

4. Enable Operator Commands and Overrides

  1. Check the status bar at the bottom of the SFC editor:
    * If Ready is displayed, verify whether the Start button is illuminated.
    * If Start is greyed out, double-click the SFC header to open SFC Properties > Operating Parameters.
    * Verify that ENSTART = 1. If interlocked, trace the connection in CFC and satisfy the permissive condition.
  2. Set the execution mode to Step by step or Continuous depending on your test objective.

5. Prevent Environment Freezes on Disconnect

  1. Before closing the SFC editor or switching off S7-PLCSIM, click Debug > Test Mode to deactivate online monitoring.
  2. 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

Operating ModeCommanded ViaSFC Test Buttons StatusPermissive PreconditionsTypical Use CaseManual (MAN)SFC Editor / OS FaceplateEnabledENSTART = 1, CPU in RUN-PEngineering testing, manual commissioning, local overrideAutomatic (AUTO)External CFC logic / SIMATIC BATCHDisabled (Greyed out)External START pulse, ENSTART = 1Automated continuous plant operations, batch recipe executionContinuous (CONT)Sequential Transition LogicActive upon StartTransitions evaluate TRUEStandard automatic step-to-step progressionStep-by-step (STEP)Operator 'Next Step' buttonActive (Step enabled)Transition satisfied, waiting for operator confirmationSingle-step debugging and commissioning validationDisabled / InterlockedProtection Interlock (INTLOCK)All command buttons lockedINTLOCK = 0 clears faultProcess safety trip, trip interlock active

Verification

  1. Switch S7-PLCSIM to RUN-P.
  2. Open the SFC chart in the SFC Editor and activate Test Mode.
  3. Confirm that the operating mode selector displays Manual.
  4. Confirm that the Start button at the bottom of the window turns dark/active.
  5. Click Start; observe that the initial step transitions from Ready to Active (green illumination).
  6. 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

Related Articles

Related Tags

  • SFC
  • S7-PLCSIM
  • PCS 7 V8.0
  • Test Mode
  • CFC
  • SFC_RTSC
6 respuestas