Handling Aborted and Stopped SFC Phases in SIMATIC BATCH Without Recipe Blocking

Handling Aborted and Stopped SFC Phases in SIMATIC BATCH Without Recipe Blocking

In SIMATIC BATCH, when an active SFC phase is aborted or stopped via LOCKABORT or LOCKSTOP, the recipe operation (ROP) halts execution because the batch engine treats the abnormal phase termination as a blocking condition to prevent hazardous out-of-sequence processing. To allow the recipe to automatically advance to subsequent steps without requiring manual operator intervention in BatchCC: 1. Use LOCKCOMPLETE instead of LOCKABORT during controlled abort sequences, signaling successful phase termination while setting an internal fault flag; 2. Configure alternative transition branches in the recipe that evaluate the phase completion status; or 3. Utilize an automated AS command block or SIMATIC BATCH API routine to automatically acknowledge and reset the aborted phase step.

Table of Contents

Executive Summary

In complex batch process plants running SIMATIC BATCH V8.2 or V9.0, automated equipment phases governed by SFC Types frequently encounter operational interruptions such as interlock trips, operator aborts, or vessel drainage holds. When an engineer asserts LOCKABORT or LOCKSTOP at the SFC-type interface in CFC, the phase transitions immediately to the Aborted or Stopped state. However, from the perspective of the SIMATIC BATCH recipe execution engine, this abnormal termination causes the parent Recipe Operation (ROP) to halt with the diagnostic message 'a sub-object is blocking'. The recipe freezes, requiring manual operator intervention in BatchCC to reset the step. This article analyzes the ISA-88 state machine within SIMATIC BATCH, explains why abnormal phase termination blocks recipe execution, and provides three proven engineering designs to achieve automated error recovery and continuous recipe progression.

Architecture and Fundamental Mechanics

SIMATIC BATCH State Machine, SFC Type Interface Pins, and Recipe Progression Mechanics:

  • ISA-88 / NAMUR NE 33 State Architecture in SIMATIC BATCH:
  • SIMATIC BATCH coordinates recipe execution through sequential function charts according to ISA-88 state models.
  • In a normal recipe lifecycle, a recipe phase step (RPH) transitions: Ready -> Starting -> Running -> Completing -> Completed.
  • When a phase reaches the Completed state, the BATCH engine satisfies the step condition and evaluates the downstream transition.
  • However, if the phase terminates abnormally via Aborting -> Aborted or Stopping -> Stopped, the BATCH engine treats this as an unhandled fault. To protect plant safety and batch integrity, the recipe engine enters a blocked state (Sub-object blocking) and refuses to advance automatically.

  • SFC Interface Control Inputs (LOCKABORT, LOCKSTOP, LOCKCOMPLETE):

  • LOCKABORT: Forces the SFC phase directly into the Aborting sequence, culminating in Aborted. This signals a severe fault and locks the BATCH recipe step.
  • LOCKSTOP: Drives the phase into Stopping -> Stopped.
  • LOCKCOMPLETE: Instructs the SFC phase to execute its normal Completing logic and enter Completed.
  • The Held State Dilemma: If an SFC phase is currently in the Held state due to an interlock or pause command, asserting LOCKCOMPLETE directly is ignored by standard SFC runtime logic because an SFC cannot jump directly from Held to Completing without first passing through Resuming.

  • Design Pattern 1: Controlled Abort Sequence via LOCKCOMPLETE with Status Flag:

  • Instead of abruptly pulsing LOCKABORT, the AS control logic triggers a controlled cleanup sequence in the SFC abort logic.
  • If the phase is in Held, the logic asserts RESUME followed by a transition to a dedicated 'Fault Completed' branch.
  • The SFC asserts an output parameter FaultStatus = TRUE and pulses LOCKCOMPLETE.
  • Because the phase finishes in Completed, SIMATIC BATCH does NOT block the recipe. The recipe transition evaluates FaultStatus and branches cleanly to an emergency drainage or cleanup ROP.

  • Design Pattern 2: AS Command Block / Batch API Auto-Reset:

  • If LOCKABORT must be retained for safety compliance, an automated supervisory block in CFC detects QSTATE = Aborted.
  • The supervisory block issues an automated step reset command via the SIMATIC BATCH communication interface, clearing the sub-object blocking condition in BatchCC and permitting recipe branch evaluation.

Step-by-Step Implementation Procedure

  1. Implement Controlled Fault Handling in the SFC Type:
    * In SIMATIC Manager, open the Master Data Library and open the target SFC Type.
    * Add an output parameter: PhaseFaulted (BOOL).
    * In the Aborting or Stopping sequence of the SFC Type, insert logic to de-energize actuators (close valves, stop agitator).
    * In the final step of the abort logic, set PhaseFaulted = TRUE.
    * If transitioning via controlled completion, configure the transition out of the abort handler to trigger LOCKCOMPLETE so the phase finishes with state Completed.

  2. Handle the 'Held' State Transition Logic:
    * In the CFC chart hosting the SFC instance, inspect the hold condition logic.
    * Ensure that an abort request while in Held triggers an automatic pulse on RESUME_I prior to commanding the termination sequence, allowing the state machine to transition through Resuming.

  3. Configure Alternative Branches in SIMATIC BATCH Recipe Editor:
    * Open the master recipe in SIMATIC BATCH Recipe Editor.
    * Immediately following the Recipe Operation (ROP) containing the phase, create an Alternative Branch.
    * Branch A (Normal Path): Configure transition condition PhaseFaulted = FALSE.
    * Branch B (Fault Recovery Path): Configure transition condition PhaseFaulted = TRUE.
    * In Branch B, place the appropriate recovery operations (e.g. Vessel Flush, Material Reject, or Safe Park).
    * Validate the recipe and release it for production in BatchCC.

  4. Deploy Automated Step Reset Logic (Alternative for True LOCKABORT):
    * If pure LOCKABORT must be retained, instantiate an SFC Command block or Industry Library coordination block in CFC.
    * Monitor the phase state parameter BA_STATE.
    * When BA_STATE = 7 (Aborted), assert a timed one-shot reset command to the BATCH communication channel to clear the block.

Verification

  1. In SIMATIC BATCH, create and start a test batch using the updated master recipe.
  2. In CFC test mode, simulate a fault condition that triggers the abort sequence on the active SFC phase.
  3. Verify that the SFC executes its abort logic, sets PhaseFaulted = TRUE, and cleanly transitions to Completed.
  4. Verify in the BatchCC Control Recipe View that the recipe does NOT enter the 'Sub-object blocking' state.
  5. Verify that SIMATIC BATCH automatically selects Branch B (Fault Recovery) and begins executing the recovery operation.

Limitations and Operational Precautions

Transitioning an SFC phase to Completed via LOCKCOMPLETE following an abnormal termination must be carefully documented in validated pharmaceutical and chemical processes (GMP/FDA CFR 21 Part 11). The batch electronic record will list the phase as completed, so the output parameter PhaseFaulted and audit trail comments must clearly record that an abort condition occurred. Direct API manipulation requires appropriate SIMATIC BATCH API licensing.

Engineer FAQ

Why does SIMATIC BATCH say 'a sub-object is blocking' when an SFC aborts?

Because the recipe engine expects the phase to reach the Completed state. An abnormal end (Aborted or Stopped) is treated as a safety fault that halts automated recipe progression.

Can LOCKCOMPLETE be triggered directly while an SFC is Held?

No. The standard SFC state machine requires an SFC in Held to transition through Resuming before it can enter Completing.

What is the cleanest way to automate recovery after an abort?

Execute safe shutdown actions within the SFC abort sequence, assert an output flag PhaseFaulted = TRUE, complete the phase via LOCKCOMPLETE, and use alternative transition branching in the recipe.

Does an aborted phase automatically release allocated equipment?

No, allocated equipment remains locked to the active batch until the recipe operation finishes or an explicit deallocation occurs.

Can recipe transitions read SFC output parameters?

Yes, any output parameter defined on an SFC Type and configured as an OCM/Batch attribute can be evaluated in recipe transitions.

Technical References

Related Articles

Related Tags

  • SIMATIC BATCH
  • SFC Type
  • LOCKABORT
  • LOCKSTOP
  • LOCKCOMPLETE
  • Recipe Blocking
  • BatchCC
  • ISA-88
20 respuestas