Resolving SIMATIC BATCH SFC Allocation Errors After Emergency Recipe Aborts

Resolving SIMATIC BATCH SFC Allocation Errors After Emergency Recipe Aborts

When an emergency abort or unexpected termination of a control recipe in SIMATIC BATCH leaves SFC type instances in an invalid allocation state ('Falscher Belegungszustand' / Allocation Error with a red lightning bolt in Batch Control Center), the automation system (AS) and BATCH Server have lost synchronization over the Unit Recipe allocation handshake. Instead of restarting the CPU, resolve the fault online by selecting the affected unit in Batch Control Center, choosing 'Release allocation' (Belegung freigeben), and setting the SFC instance faceplate in WinCC to Manual mode to issue an explicit 'Reset' command. If the unit block (UNIT_PLC) remains locked, clear parameters BA_ID and BA_EN in the CFC chart.

Table of Contents

Architecture of SIMATIC BATCH Unit and SFC Allocation

In recipe-driven batch manufacturing, SIMATIC BATCH orchestrates execution by allocating physical plant equipment (Units / Teilanlagen) and driving sequential function charts (SFC types and SFC instances) in the automation controller. Allocation is governed by a bidirectional handshake between the SIMATIC BATCH Server and the AS controller blocks (UNIT_PLC and SFC instances).

When a batch begins, the BATCH Server issues an allocation request: the UNIT_PLC block sets OCCUPIED = 1, and the AS receives the unique Batch ID (BA_ID), Batch Name, and recipe step numbers. In turn, individual SFC instances within that unit transition into BATCH mode (BA_EN = 1) and execute under external server control.

Causes of the 'Falscher Belegungszustand' (Allocation Error)

When an emergency stop, recipe abort, or network disruption interrupts a running batch, the orderly shutdown sequence is truncated. This leads to an inconsistent state known in the Batch Control Center (BCC) as 'Falscher Belegungszustand' (Invalid Allocation State), visually flagged by a red lightning bolt on the unit:

  1. Asynchronous Reset: The BATCH Server marks the batch as aborted or terminated, but the SFC instance in the AS remains halted, held, or locked in an intermediate step (HELD or STOPPED).

  2. Orphaned Batch Identifiers: The UNIT_PLC block or SFC instance retains the obsolete BA_ID and BA_EN flags in AS memory. When a new batch attempts to acquire the unit, the AS rejects the command because the unit appears occupied by an old batch.

  3. Inappropriate CPU Restarts: Inexperienced engineers often resort to power-cycling the S7-400 CPU to wipe memory. While a restart clears volatile registers, it disrupts active equipment across the entire controller and is completely unnecessary.

Comparison of Allocation States and Recovery Methods

The table below details SIMATIC BATCH unit allocation states, visual indicators, and corresponding online recovery workflows.

Allocation StateBCC Visual IconAS Parameter StatusOnline Recovery Action (No CPU Restart)Idle / FreeGreen checkmark / white unitUNIT_PLC.OCCUPIED = 0, BA_ID = 0None; unit is ready for new batch acquisitionAllocated / RunningBlue folder / active gearUNIT_PLC.OCCUPIED = 1, BA_ID = [BatchID]Normal recipe execution in progressAllocation ErrorRed lightning bolt on unitOCCUPIED = 1, but SFC instance in abort stateRight-click unit in BCC -> Release allocation (Belegung freigeben)Held / PausedYellow pause symbolSFC state in HELD; waiting for operator actionResume batch or abort gracefully from BCC control menuOrphaned AS HandshakeRed lightning boltBA_EN = 1, BA_ID != 0 in CFC after BCC releaseSwitch SFC faceplate to Manual -> Reset; pulse UNIT_PLC.BA_EN = 0

Step-by-Step Online Recovery Procedure Without CPU Restart

Follow this standard operating procedure to clear allocation faults online without restarting the automation controller:

  1. Release Allocation in Batch Control Center (BCC):
    - In BCC, navigate to the affected unit in the plant tree.
    - Right-click the unit displaying the red lightning bolt and select Release allocation (Belegung freigeben).
    - Confirm the security prompt. BCC attempts to clear server-side unit locks.

  2. Reset SFC Instance via WinCC Runtime Faceplate:
    - On the WinCC operator client, navigate to the process screen containing the SFC instance.
    - Open the SFC faceplate. Switch operating mode from Auto (Batch) to Manual.
    - Click Reset (Rücksetzen) to transition the SFC state machine from Aborted / Stopped back to Ready / Idle.
    - Return operating mode to Auto.

  3. Clear AS Unit Block Registers (If Lock Persists):
    - If the unit still reports occupied, open the CFC chart containing the UNIT_PLC block.
    - In online test mode, verify inputs BA_ID and BA_EN. If orphaned values persist, set BA_EN = 0 and toggle RST_OCC (Reset Occupied) to 1.

  4. Synchronize BATCH Server:
    - In BCC, select Options -> Update BATCH project to refresh synchronization between server memory and the controller.

Verification

Verify unit recovery through the following systematic checks:
1. In Batch Control Center, verify that the red lightning bolt disappears and the unit displays a green ready state.
2. On the WinCC SFC faceplate, confirm that status indicates 'Ready' and Batch ID is cleared.
3. Create a test water batch in BCC and assign it to the recovered unit: verify that the unit is successfully allocated (OCCUPIED = 1) without errors.
4. Confirm that recipe steps start and transition according to recipe phase instructions.

Limitations and Operational Precautions

Before forcibly clearing unit allocation in BCC or resetting SFC blocks in CFC, verify physical plant conditions! Ensure that feed valves are closed, agitators are stopped, and material transfers are completely halted. Forcibly releasing a unit while material is in transit can result in tank overflows, recipe discrepancies, or cross-contamination. Always follow local plant SOPs for hazardous material disposition.

Engineer FAQ

Why did a CPU restart fix the allocation error for the forum user?

Power-cycling the CPU forces an OB100 warm restart, which reinitializes all non-retentive block registers and resets OCCUPIED and BA_EN to zero. However, this is bad practice because it disrupts the entire plant and risks hardware damage.

Can I release unit allocation while a batch is running?

No. The 'Release allocation' function is only accessible when the batch assigned to the unit has terminated, aborted, or entered a fault state.

What does the red lightning bolt indicate in Batch Control Center?

The red lightning bolt indicates an allocation error (Belegungsfehler), signifying a mismatch between the BATCH server's recipe model and the actual state of the AS unit/SFC blocks.

Technical References

Related Articles

Related Tags

  • SIMATIC BATCH
  • SFC Types
  • BCC
  • UNIT_PLC
  • Allocation Error
  • Recipe Control
6 respuestas