800xA Batch Management Acquire Equipment
I am looking for inputs on a good and robust way to solve the following issue regarding use of the Acquire Equipment (or Reserve Equipment) BMA:
In the plant there is a number of identical Reactors, all these Reactors are fed from two identical rawmaterial feeding units, which are quite Manual operated (The feeding Unit is actually a Pumping station used to empty Trucks).
The selection of the feeding units is very flexible; a Reactor can be fed from one alone or from both simultaneously. Lets call the feeding units: "X" and "Y".
Immediately following scheduling of a Batch, the Operator preselects which Feeding Unit(s) to use, i.e. via a Message BMA to preselect of one specific or both. The normal situation is to preselect both.
After execution of this Message BMA, the preselected Feeding unit(s) are Acquired via the Acquire BMA in the Unit Procedure. The Recipe Procedure contains two Unit Procedures in paralell; one for each Feeding Unit, and the Acquire is performed in these Unit Procedures.
By now, both Feeding Units (X & Y) are acquired by this Batch; BatchID = "A".
As each Batch will require multiple Trucks to be fed into the Reactor, the Feeding Unit's Unit Procedure do inside contain a loop back to a message BMA instructing the Operator to select: NewTruck or FinishFeeding. This procedure logic loop is between the Acquire and Release BMA's, so the Feeding Unit is NOT released between the Trucks for the same batch (business desition).
On Batch "A", the Operator now selects to FinishFeeding on Feeding Unit "X", but continues feeding on Feeding Unit "Y".
A second Batch is now created from the same Master Recipe, and the Operator do also for this Batch; BatchID = "B", preselect to use Both Feeding Units.
Batch "B" will now acquire both Feeding Units, but it only suceeds in acquiring Feeding Unit "X", as the Acquire BMA for Feeding Unit "Y" will put Batch "B" on Feeding Unit "Y" as a Pending Batch, thus initially Batch "B" can only use Feeding Unit "X".
In the case, where Batch "B" finishes feeding all the Trucks from Feeding Unit "X" before Batch "A" finishes feeding all its Trucks from Feeding Unit "Y", and there by whishes to Complete the Feeding part of the Batch, this is not possible as Batch "B" still have the Acquire BMA active in the Unit Procedure for Feeding Unit "Y", as it is a Pending Batch.
How can I in the above described scenario, make design the Unit Procedure for the Feeding Unit, so it will allow completion of the Unit Procedure?
I have investigated the Reserve BMA, but it will give the same result where the Reserve BMA will be left active.
I am actually missing a Batch feature (BMA block) which will perform Acquire or Reserve of a Unit, then the BMA block shall immediately complete and return the result of the Acquire or Reserve as a for of output (Unit Acquired if acquired or Unit busy if the unit is already Acquired), then the procedure logic in the Recipe would allow me to define the functionality I'm required to do.
As I see it, with the current functionality of 800xA Batch Management, the only possibility I have is to use an Excetion Procedure in parallel with the Acquire BMA, and then let the Exception Procedure trigger a Kill of the Acquire BMA. This would work, but I do not think it is the proper way to acheive the functionality.
Any comments on this issue is welcome.
Voted best answer
Add an OPC Datapoint Unit Attribute to the FeedUnit for “Acquired”. If the Feed Unit is a Pseudo Unit the attribute references Batch.Status and the syntax in the Transition FeedAvail is getvaluestring(unitattget(Unit,”Acquired”)) == “Available”
If the FeedUnit is a physical 800M you could still reference Batch.Status and use the above syntax, but it is better to get the status from the controller. Reference _bBatchConnection.BMAcquired
getvalue(unitattget(Unit,”Available”)) == 0
In the other selection branch transition test for the other feed unit to be Complete:
If this unit procedure is FeedX then test FeedY complete. To do this I would also add a Recipe Parameter that the message sets that Both were Selected. Both is a integer parameter where Both = 1 for True, 0 for False. Add another Parameter for the “OtherUnit” as an Equipment List Type. Add to the Feed Units an attribute that references the Name. I always use “UnitName” select OPC Datapoint and .:Name:Name
Use a bvar so both procedures can “see” the setting. This gets a little tricky but you want to create the bvarName based on the Name of the “OtherUnit”. In the Transition “Other Feed Complete”
Both == 0 || \
mplete”,0) == 1 && \
Both == 1)
(Both is false or the other unit is complete and Both is true). In the bvarget equation the , 0 initializes the value to 0 (false) so you do not get an error that the variable is undefined.
Finally in the Compute after the release set the bvar for the feed unit unit you are using to 1
bvarget(getvaluestring(unitattget(FeedUnit,”UnitName”)) + ”Complete”,1)
(Image of the Batch Procedure Attached)