How to Check Tank Inventory Before Starting a SIMATIC BATCH Batch

How to Check Tank Inventory Before Starting a SIMATIC BATCH Batch

Check current usable tank inventory before authorizing the batch-start command; do not substitute recipe validity checking for that live operational decision. With Industry Library V9.0 SP1, BatchIf provides a documented CFC command interface that can be gated by project-specific inventory logic. The manufacturer command procedure is described below, but the measurement, units and reservation logic must be engineered for the actual tank so an earlier availability check is not mistaken for a later transfer guarantee.

Table of Contents

Recipe Validity and Available Inventory Are Different

A request to transfer five tonnes from a tank needs a current available-quantity check. Recipe validation checks the recipe's consistency and configured parameter conditions; it does not establish that the source tank physically contains the required usable material at the intended start.

The SIMATIC BATCH V9.0 SP1 manual documents validation results for recipe headers, materials, steps, transitions and normalized batch quantities. Keep that validation, but add the live operational requirement separately.

Define the Project Inventory Gate

The inventory decision is project-specific engineering. Define the measurement source, engineering units, usable quantity and data-validity criteria. Do not compare a mass requirement directly with an unconverted level or volume.

For the five-tonne example, the gate should assess usable available mass against the requested transfer, while accounting for any project-defined reservation or operating allowance. No universal allowance or measurement conversion is supplied here.

Also define what happens if another request consumes or reserves material after the check. A one-time comparison does not guarantee inventory at the later start or during transfer.

Documented BatchIf Implementation Baseline

Industry Library V9.0 SP1 documents BatchIf for batch commands through CFC. Its prerequisites include SIMATIC BATCH Base on the relevant OS stations, configured and loaded BATCH client functionality, and running OS Runtime and BATCH Server.

For an external-command implementation:

  1. Configure the applicable BatchIf instance and its documented OS integration for the installed version.
  2. Supply PCell, OrderCat, RecipeName, RecipeVersion and the intended batch-identifying and quantity inputs.
  3. Implement the reviewed inventory decision and permit command generation only after that decision is satisfied.
  4. With IntOp = 0 and CmdBusy = 0, issue the intended CmdLi value change. Command 3 creates, enables and starts a batch; choose it only when the entire combined action is intended.
  5. Return CmdLi = 0 for at least one cycle after activation, as documented.
  6. Observe completion and OS_RetValOut when CmdBusy falls; 1 indicates the command was accepted, while an error requires investigation.

The command handshake is manufacturer-documented. The inventory calculation, reservation and command-permission logic are project adaptations, not built-in BatchIf inventory guarantees.

Do Not Move a Prestart Requirement After Start

A recipe transition that checks a current value after the batch has started addresses a different requirement. It can support process sequencing, but it does not satisfy a requirement to reject an insufficient-inventory request before start.

Define separately which runtime checks must remain effective if inventory changes during execution. Do not remove those protections merely because a prestart comparison was added.

Verification

In a test environment, exercise sufficient inventory, insufficient inventory, invalid quantity information and competing requests. Verify both the gate decision and whether an actual BATCH command is issued.

For an allowed request, inspect BatchIf's completion result and the intended batch in BatchCC. For a rejected request, confirm that no unintended start command is generated. Also test a quantity change between checking and execution; record the project's chosen reservation or recheck behavior.

Limitations and Operational Precautions

The actual quantity measurement, reservation design and installed BATCH/IL combination are unspecified. The central site-specific inventory guarantee remains unresolved; the documented BatchIf mechanism supplies an implementation baseline.

No claim about APF lifecycle or suitability is needed to implement this distinction. Preserve the project and recipe baseline, validate units and data quality, and test command generation before production use. An accepted BATCH command does not prove that the physical transfer can safely complete.

Engineer FAQ

Does Check validity solve the live inventory example?
It does not establish current usable tank inventory.

Does BatchIf calculate stock availability automatically?
No such guarantee is established; implement the decision explicitly.

Is a transition after batch start a prestart check?
No. Its timing is different.

Technical References

Related Articles

Related Tags

20 respuestas