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
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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:
UNIT_PLC(FB266): Represents the physical Unit (vessel, reactor, mixer) in the AS.BMOD(FB267) / Phase Interface: Arbitrates recipe phases, control words, and status words.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_PLCblock automatically provides deterministic boolean outputs reflecting batch lifecycle:BA_ACT(Batch Active): Set to1as soon as SIMATIC BATCH allocates and occupies the unit.OCC_RUN(Occupied and Running): Set to1when recipe execution actively begins, and resets to0when execution completes or pauses.BA_ID/BA_NA: Output the active Batch ID and Batch Name.
-
A rising edge on
OCC_RUNprovides an immediate, zero-configuration 'Recipe Start' trigger; a falling edge whileBA_IDis 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_BOOLblock is utilized. - In BatchCC, user-defined batch parameters appear as setpoints (
SP). BatchCC writes parameter setpoints toIEPAR_BOOL.SP_OUTupon reaching the configured recipe step. - Note: In BatchCC, parameters are displayed and managed as setpoints; control values (readback process values) are managed by
IEPARinputs (ACT_VAL). Setting a bit from BatchCC requires parameterizing anIEPAR_BOOLsetpoint.
Step-by-Step Implementation Procedure
-
Implementing Method 1: Native UNIT_PLC Signaling (Unit-Level Start/Complete):
* Open the CFC chart containing theUNIT_PLC(FB266) block for the target unit.
* Connect output pinOCC_RUNto the input of an edge detection block (e.g.R_TRIGfor start,F_TRIGfor 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. -
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 dropIEPAR_BOOL(FB256) into the chart.
* Name the block instance descriptively (e.g.Batch_Flag_Start). -
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: NameStart_Trigger, Data TypeBOOL, DirectionIN(Setpoint).
* Set the parameter attributeS7_m_c := 'true'.
* In CFC, connectIEPAR_BOOL.SP_OUTto the SFC Type'sStart_Triggerinput pin. -
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. -
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 parameterStart_Triggersetpoint toTRUE(1).
* In the completion step or end of the recipe, configure a step settingStart_TriggertoFALSE(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
- SIMATIC BATCH V9.0 Operating Manual
- SIMATIC PCS 7 Compendium Part C - Technical Functions with SFC Types
- SIMATIC BATCH Interface Blocks Manual
Related Articles
- Aborting and Deleting Blocked Control Recipes in SIMATIC BATCH when SFC Phases Hang
- Configuring Process Value References in SIMATIC BATCH to Display Actual Quantities in Batch Reports
- Troubleshooting Missing BatchCC Toolbar Icon in PCS 7 OS Client Runtime and Custom Button PDLs
- Cross-Controller AS-to-AS Data Communication with SEND_BO-REC_BO and BSEND-BRCV in PCS 7
Related Tags
- SIMATIC BATCH
- IEPAR_BOOL
- UNIT_PLC
- SFC Type
- BatchCC
- CFC
- Recipe Status
- PCS 7 V9.0