Transmitting Batch Recipe Start and Complete Status Bits Between SIMATIC BATCH and PCS 7 Controllers

Transmitting Batch Recipe Start and Complete Status Bits Between SIMATIC BATCH and PCS 7 Controllers

To signal batch execution milestones (such as recipe start and completion) from SIMATIC BATCH to a PCS 7 AS controller, engineers use either integrated unit control block status outputs or the IEPAR_BOOL (FB256) parameter block. The standard and recommended PCS 7 method utilizes the native interface of the UNIT_PLC block (FB266) and the phase SFC Type. UNIT_PLC automatically asserts the OCC_RUN (Unit occupied and running) and BA_ACT (Batch active) output signals to CFC logic. When a specific recipe phase completes, the phase SFC asserts its COMPL or READY status. Alternatively, for arbitrary user-defined recipe flags, engineers instantiate IEPAR_BOOL in CFC, configure it as a batch parameter in the SFC Type, and command its set/reset value directly from recipe step instructions in BatchCC.

Table of Contents

Executive Summary

In automated process plants controlled by SIMATIC BATCH, engineers frequently need to coordinate peripheral automation systems-such as starting shared utility cooling skids, locking safety interlock zones, or triggering plant-floor audio-visual alarms-based on recipe lifecycle events in the controller. A common engineering challenge is establishing clean, deterministic signaling from SIMATIC BATCH recipes down to the S7-400 automation station without programming custom raw communication drivers. This article evaluates native UNIT_PLC status outputs versus configurable IEPAR_BOOL parameter blocks, explains how BatchCC writes setpoint parameters to the AS, and provides verified implementation patterns for recipe start and completion signaling.

Architecture and Fundamental Mechanics

SIMATIC BATCH to AS Communication Mechanics and Interface Blocks:

  • Architecture of SIMATIC BATCH AS Interface Blocks:
  • SIMATIC BATCH does not communicate with controllers using low-level raw network blocks (like PUT/GET or BSEND). Instead, communication flows through the WinCC OS Server via standardized BATCH Interface Blocks from the PCS 7 BATCH block library:

    1. UNIT_PLC (FB266): Represents the physical Unit (vessel, reactor, mixer) in the AS.
    2. BMOD (FB267) / Phase Interface: Arbitrates recipe phases, control words, and status words.
    3. IEPAR_* Blocks: Expose recipe parameters (booleans, integers, reals, strings) between BATCH and CFC.
  • Method 1: Native Status Signaling via UNIT_PLC (Recommended for General Unit Milestones):

  • The UNIT_PLC block automatically provides deterministic boolean outputs reflecting batch lifecycle:
    • BA_ACT (Batch Active): Set to 1 as soon as SIMATIC BATCH allocates and occupies the unit.
    • OCC_RUN (Occupied and Running): Set to 1 when recipe execution actively begins, and resets to 0 when execution completes or pauses.
    • BA_ID / BA_NA: Output the active Batch ID and Batch Name.
  • A rising edge on OCC_RUN provides an immediate, zero-configuration 'Recipe Start' trigger; a falling edge while BA_ID is valid provides the 'Recipe Complete' trigger.

  • Method 2: Custom Milestone Signaling via IEPAR_BOOL (FB256):

  • If specific recipe steps (rather than overall unit execution) must set and reset discrete boolean flags, the IEPAR_BOOL block is utilized.
  • In BatchCC, user-defined batch parameters appear as setpoints (SP). BatchCC writes parameter setpoints to IEPAR_BOOL.SP_OUT upon reaching the configured recipe step.
  • Note: In BatchCC, parameters are displayed and managed as setpoints; control values (readback process values) are managed by IEPAR inputs (ACT_VAL). Setting a bit from BatchCC requires parameterizing an IEPAR_BOOL setpoint.

Step-by-Step Implementation Procedure

  1. Implementing Method 1: Native UNIT_PLC Signaling (Unit-Level Start/Complete):
    * Open the CFC chart containing the UNIT_PLC (FB266) block for the target unit.
    * Connect output pin OCC_RUN to the input of an edge detection block (e.g. R_TRIG for start, F_TRIG for complete).
    * Link the rising edge trigger to your 'Batch Running' auxiliary logic (e.g. start cooling pump, energize beacon).
    * Link the falling edge trigger to your 'Batch Finished' logic.

  2. Implementing Method 2: IEPAR_BOOL Parameter Signaling (Recipe-Level Flags):
    * Open the CFC chart containing the Equipment Phase or SFC Type instance.
    * From the SIMATIC BATCH library, drag and drop IEPAR_BOOL (FB256) into the chart.
    * Name the block instance descriptively (e.g. Batch_Flag_Start).

  3. Configure SFC Type Parameter Characteristics:
    * In SIMATIC Manager, open the SFC Type Editor from the Master Data Library.
    * Navigate to Characteristics -> Parameters.
    * Insert a new parameter: Name Start_Trigger, Data Type BOOL, Direction IN (Setpoint).
    * Set the parameter attribute S7_m_c := 'true'.
    * In CFC, connect IEPAR_BOOL.SP_OUT to the SFC Type's Start_Trigger input pin.

  4. Compile BATCH Types and Instances:
    * In SIMATIC Manager, select Options -> SIMATIC BATCH -> Compile and Download Objects.
    * Compile Batch Types and update the Batch server database.

  5. Configure Parameter in BatchCC Master Recipe:
    * Open BatchCC and open the Master Recipe in the Recipe Editor.
    * In the recipe start step, open Step Properties -> Parameters.
    * Set parameter Start_Trigger setpoint to TRUE (1).
    * In the completion step or end of the recipe, configure a step setting Start_Trigger to FALSE (0).
    * Release the recipe and verify that the AS pin toggles when the batch is executed.

Verification

Verify Batch Status Signaling in CFC Test Mode:
1. Start the batch order in BatchCC.
2. Open the CFC chart in test mode; verify that UNIT_PLC.OCC_RUN transitions from 0 to 1 immediately upon recipe start.
3. If using IEPAR_BOOL, verify that output pin SP_OUT updates to TRUE as the corresponding recipe step activates.
4. When the recipe completes in BatchCC, confirm that UNIT_PLC.OCC_RUN drops back to 0.

Limitations and Operational Precautions

Operational Precautions and Latency Boundaries:
- IEPAR parameter transfers are mediated through the WinCC OS server communication channel and are asynchronous. Do not utilize SIMATIC BATCH parameter bits for high-speed, safety-critical machine interlocks (e.g. emergency stops); use hardwired safety circuits or S7 F-Systems.
- If a batch recipe is aborted abnormally, steps configured to reset parameter bits may be skipped. Always include fail-safe timeout logic or clear flags when UNIT_PLC.OCC_RUN drops to 0.

Engineer FAQ

What is the easiest way to detect that a batch has started in CFC?

Monitor the OCC_RUN output pin on the UNIT_PLC block (FB266). It transitions from 0 to 1 the moment a batch begins running in that unit.

Why can't I see 'control values' to set in BatchCC?

In BatchCC recipe editing, only recipe setpoints (SP) can be commanded. Control values (CV) are process readback values transmitted from the AS to BatchCC, not vice versa.

What block is used to receive a boolean setpoint from BatchCC?

The IEPAR_BOOL block (FB256) from the SIMATIC BATCH block library receives boolean recipe setpoints from BatchCC.

Can I pass strings (such as batch name or recipe name) to CFC?

Yes, the IEPAR_STR block transfers ASCII strings, and UNIT_PLC.BA_NA directly outputs the current batch name.

What happens to UNIT_PLC outputs if the batch is aborted?

When a batch is aborted, UNIT_PLC.OCC_RUN immediately transitions to 0, providing a reliable reset trigger for AS logic.

Technical References

Related Articles

Related Tags

  • SIMATIC BATCH
  • IEPAR_BOOL
  • UNIT_PLC
  • SFC Type
  • BatchCC
  • CFC
  • Recipe Status
  • PCS 7 V9.0
20 respuestas