Controlling SIMATIC PCS 7 SFCs from External DBs and Third-Party HMIs - ENAUT, ENSTART, and Control Word Interconnections

Controlling SIMATIC PCS 7 SFCs from External DBs and Third-Party HMIs - ENAUT, ENSTART, and Control Word Interconnections

To control a SIMATIC PCS 7 SFC (Sequential Function Chart) from an external Data Block (DB), third-party HMI, or supervisory PLC, the SFC must first be switched into Automatic mode by asserting BA_EN or ENAUT and setting AUT = 1. Furthermore, specific command execution permissions must be asserted simultaneously: ENSTART = 1 must be active when triggering START = 1, and ENSTOP = 1 must be active when triggering STOP = 1. Without asserting these enable gates, manual or external start commands are rejected by the SFC runtime executive.

Table of Contents

PCS 7 SFC Operating Modes and Command Authorization Architecture

In SIMATIC PCS 7 (v8.0, v8.1, v8.2, and v9.x), Sequential Function Charts (both SFC Charts and SFC Types) are controlled through an internal operating state logic (OSL) engine based on ISA-88 / NAMUR state transitions:
* Operating Modes:
* Manual Mode (MAN): The SFC is controlled exclusively by an operator from the WinCC SFC Visualization faceplate. Control commands arriving from program interconnections or external DBs are locked out unless specific overrides are configured.
* Automatic Mode (AUT): The SFC execution is orchestrated by interconnected automation logic (e.g., SIMATIC BATCH, higher-level coordinating CFC charts, or external supervisory systems via DB pointers).
* Command Interlock Protection:
To prevent unexpected machine movement caused by spurious network writes, PCS 7 enforces a dual-handshake architecture. A control trigger (such as START, HOLD, STOP, ABORT, or RESET) is ignored by the runtime engine unless its associated permission bit (ENSTART, ENHOLD, ENSTOP, ENABORT, ENRES, ENRESET) is evaluated as boolean TRUE during the exact same controller scan cycle.
* SFC Chart External View:
When opening an SFC Chart in the SFC Editor, selecting View -> External View exposes the SFC as a standard CFC block interface containing input/output pins for all operating state commands and status words.

Mandatory Enable Gates for External Command Execution (ENAUT, ENSTART, ENSTOP)

The most common configuration error when automating an SFC from an external source (such as a Modbus gateway, third-party panel, or standard STEP 7 Data Block) is asserting START while leaving ENSTART disconnected or low:
* Mode Selection Handshake:
* ENAUT: Enable Automatic mode switchover (must be TRUE).
* AUT: Switch SFC into Automatic mode (pulse or steady TRUE).
* ENMAN: Enable Manual mode switchover.
* MAN: Switch SFC into Manual mode.
* Execution Handshakes:
* ENSTART: Enable Start. If ENSTART = FALSE, setting START = TRUE produces no state change; the SFC remains in Ready or Idle.
* START: Initiate sequence execution from Step 1.
* ENSTOP: Enable Stop command.
* STOP: Transition active SFC sequence to Stopping -> Stopped.
* ENABORT: Enable Abort command (emergency sequence termination).
* ABORT: Transition immediately to Aborting -> Aborted.
* ENRESET: Enable Reset command.
* RESET: Reset an aborted or completed SFC back to Idle / Ready.

Interconnection Table: SFC External Interface Control Signals and Data Types

The table below outlines the core control and feedback signals exposed in the SFC External View:

Pin NameDirectionData TypeDefault ValueFunctional DescriptionENAUTInputBOOLFALSEEnable transition to Automatic operating modeAUTInputBOOLFALSERequest Automatic operating mode (1 = Auto)ENMANInputBOOLFALSEEnable transition to Manual operating modeMANInputBOOLFALSERequest Manual operating mode (1 = Manual)ENSTARTInputBOOLFALSEPermission bit enabling external sequence startSTARTInputBOOLFALSECommand pulse to start the SFC sequenceENSTOPInputBOOLFALSEPermission bit enabling external sequence stopSTOPInputBOOLFALSECommand pulse to stop the SFC sequence gracefullyENABORTInputBOOLFALSEPermission bit enabling emergency sequence abortABORTInputBOOLFALSECommand pulse to trigger immediate sequence abortENRESETInputBOOLFALSEPermission bit enabling sequence resetRESETInputBOOLFALSECommand pulse to return to Idle / Ready stateQDIS_STARTOutputBOOLFALSEFeedback indicating start command is currently disabledQDIS_STOPOutputBOOLFALSEFeedback indicating stop command is currently disabledSTATUSOutputDWORD16#00000000Full 32-bit SFC runtime operating state wordREADY_TCOutputBOOLFALSEReady to complete signal indicating final step active

Configuring External DB Interconnections via SFC External View

To link an external DB to the SFC inputs:
1. Create Interface Data Block:
In SIMATIC Manager, create a shared DB (e.g., DB100_SFC_Interface) containing individual boolean control bits (bAutoModeEnable, bAutoModeReq, bStartEnable, bStartCmd, bStopEnable, bStopCmd).
2. Open SFC External View:
In the CFC chart where the SFC is instantiated, open the SFC or double-click the SFC block representation. If working with an SFC Chart, switch to the external view to see the block pins.
3. Wire Interconnections:
Drag and drop the corresponding DB tags from the symbol list or enter absolute/symbolic addresses into the SFC input pins:
* Connect DB100.DBX0.0 to ENAUT.
* Connect DB100.DBX0.1 to AUT.
* Connect DB100.DBX0.2 to ENSTART.
* Connect DB100.DBX0.3 to START.
4. Execution Timing Considerations:
If controlling the SFC from an HMI push button, the HMI script or PLC logic must set ENSTART = 1 continuously or set both ENSTART and START together. Once the SFC enters the Starting or Running state (verified via STATUS or QSTART), the trigger bit START must be reset to 0 to prevent unintended auto-restarts upon sequence completion.

Step-by-Step Procedure to Implement External SFC Control from HMI or Third-Party PLC

  1. Verify Operating State Logic (OSL):
    Ensure the target SFC is in a valid state to accept start commands (state must be Ready or Idle, status bit 16#00000001).
  2. Assign Automatic Mode:
    Ensure ENAUT = 1 and AUT = 1. Monitor QMAN_AUT: when it turns to 1, Automatic mode is confirmed.
  3. Bridge Enable and Command Inputs in External Logic:
    In your interface DB or ladder logic routine:
    pascal // Example SCL logic for external start command IF #HMI_Start_Button THEN "DB100_SFC_Interface".bStartEnable := TRUE; "DB100_SFC_Interface".bStartCmd := TRUE; ELSE "DB100_SFC_Interface".bStartEnable := FALSE; "DB100_SFC_Interface".bStartCmd := FALSE; END_IF;
  4. Compile and Download Changes:
    Perform a delta CFC compilation and delta download to the target AS (e.g., CPU 410-5H or S7-416).
  5. Test State Progression Online:
    Open the SFC Chart online. Trigger the start signal from the external interface DB and observe the state transition from Idle -> Starting -> Run.

Verification

To verify that external SFC control is functioning reliably:
1. Open the SFC chart online in the SFC Editor. Confirm that the mode indicator displays AUTO.
2. Monitor input pins ENSTART and START in the CFC test mode or VAT table.
3. Pulse the external start input. Confirm that the status switches to Run without manual operator intervention.
4. Verify that pulse commands are cleared: START must return to 0 while Run remains active.
5. Trigger an external stop with ENSTOP = 1 and STOP = 1. Verify that the SFC transitions smoothly through Stopping into Stopped.

Limitations and Operational Precautions

  • SIMATIC BATCH Interference: When an SFC is acquired by SIMATIC BATCH, external chart interconnections to START, STOP, and HOLD are disabled by the BATCH interface block (BA_CONTROL). Do not mix direct DB wiring with SIMATIC BATCH recipe execution.
  • Continuous Start Lockout: Leaving START = 1 permanently tied high can cause the SFC to instantly re-execute upon completion, causing unexpected cycling. Always use momentary pulses (minimum 1 AS scan cycle duration).
  • Emergency Stop Precautions: External stopping of an SFC does not guarantee physical equipment isolation. Safety-critical interlocks must be hardwired or implemented in F-Systems F-Blocks independently of SFC state charts.

Engineer FAQ

Technical References

Related Articles

Related Tags

  • PCS 7 SFC
  • SFC External View
  • ENSTART
  • ENAUT
  • S7-400
  • WinCC SFC Visualization
8 respuestas