FTBatch behaviour on some conditions

Hello,

I'm starting a batch application soon, my first, and looking at the concepts around phases, equipment and control modules, things click into place but there's still some behaviours of the batch software (FT Batch is what we're going with) that aren't clear in any of their documentation or forums and I wondered if someone has experience that can clarify this and provide some tips?

The big doubt from my side is whether all phases should terminate or not. For example, should I have a temperature control phases htat is always on and receives parameters and reacts accordingly? Or should I create more specific phases like heat, cool, maintain?
The big concern from the question above is that when putting phases in parallel, the said temperature phase won't complete so I'll use some other condition and am not sure what happens to the Temperature phase.

Imagine a parallel branch running Temperature control and Charge_water. The condition to move from this parallel branch is Charge_Water.Complete.
In this instance, what happens to the Temperature control phase when the transition becomes active? Does it run the Stop command? Does it prevent the transition from evaluating?

Any tips from your experience around this? The company this is going to has a standard, but it's incredibly poor (effectively set and forget) with overly complicated PLC logic that stops them from introducing new recipes and this project is to alleviate that.
 
Perhaps look at ISA-88, FTBatch is based on that but to be honest, it is a standard with so many holes in it.
One major food manufacturer I did work for based their system on S88 but split it slightly differently as it did not suit completely & as you pointed out seems a little complicated to understand,
Procedure: The end-to-end instructions to make the entire batch.
Unit Procedure: Steps within a single Unit (e.g., filling with a product, mixing).
Operation: individual processing activities (e.g., heating, blending).
Phase: The lowest executable actions (e.g., "open valve" or "turn on stirrer")
The system they introduced was named differently i.e.
Task: Make a batch of product.
Unit Process: Steps of say adding a component like water.
Equipment Control: individual or a small group of components (real world actions like valves, sensors).
It was over 26 years ago I was involved but in general parrallel operations would come to their natual end but the process would not step on until all processes
were complete.
As for Recipe's, these contained a header section that was arranged as what they considered standard operations like if it used a blender, A reduction phase perhaps if parrallel operation could be done & some other variables.
The recipe stages were all exactly the same format, in other words type of operation (e.g. add water, add slurry, add manual ingredients, add oil etc.) Heating time/temperature, agitator speed agitator time & so on even though each stage will only add one particular ingredient this was a typical number from 0-10 0 = no addition, 1 = Water, 2 = oil, 3 = Manual addition & so on.
The core recipe stage would then be populated with the weights and alarm limits (often some manual ingredients would contain many actual ingredients) with their description & weights based on the smallest batch size possible, then the PLC would calculate the actual addition(s) when the operator entered the actual batch required size. any actual fields not used would be 0.
The PLC would load the standard recipe, operator enter the required batch size & so on.
That's all I can remember off the top of my head.
 
Yeah, I've gone through all I can from ISA-88 and there's no specific advice or examples out there, really.

The main doubt is really what happens to the phase running, judging by one specific manual detailing "transfer of control" mechanism, gut feeling is that it'll stop the phase but there's no clarity anywhere in the manual about this particular bit.

Which ends up being important to design what those phases will do.

Thanks for the reply though.
 
Unfortunately my experience has been that all batch application are wholly unsuitable for the task their built for.
It's like those who built it had either no experience building complex batching or just did what they're told according to some standard (who was designed by people with little experience).

It's not going to help you but I feel your frustration.
 
Personally, I think it's better to roll your own & taylor it to the specs the customer gives you, all those years ago, the customer gave us the code for the batch control & for us to put the meat on the bones as they never supplied any documentation, I spent many years doing projects for them & came across a number of systems done by other systems houses that were installed in their factories & in most cases, they had installed the standard code & just manipulated the data that should have been produced to sent up to their own higher level system, in other words they never implenented any of the control just made it looked like it worked, in actual fact, the higher level systems were never put in place & it was abandoned in favour of a later system, I know a number of integrators including me were tasked with writing some standard blocks for valve & motor control etc.
 
If you understand Ladder Logic, most sequential processes use some something equivalent to Step Pattern, or one of the other patterns (e.g. the Five Rung pattern. They don't always use bits for the active phase(s), and a single integer value to keep track of the currently active phase often makes for cleaner code, but the cascade of logic [trigger phase X, perform phase X actions, detect end of phase X to trigger next phase Y] means that the logic for all phases is evaluated continuously (actually discretely in scan cycles but it appears continuous), but only the active phases actually do anything. The key point is that the process is modeled in memory; some memory like discrete and analog input channels, is controlled externally and only read by the user program e.g. temperatures, pressures, levels, etc., while some memory is both written and read by the user program e.g. outputs, and non-I/O memory bits that keep track of the current sequence phase.

The primary suggestion I would make, whether ISA-88 or the Step pattern or an integer Step tag is use, is to keep the Sequence Logic separate from the Business Logic.
  • Sequence Logic looks at inputs (measurements from the process, operator inputs from HMI) and keeps track of the current sequence phase and trigger transitions between phases, but it does not write to the outputs.
  • Business Logic reads the phase memory bit values and writes to the outputs accordingly.
For example, say there is a tank that is to be filled, then heated, and finally drained, and it has a PLC output memory bit controlling a valve at the bottom that is open for the filling and draining, and closed for the heating. The Business Logic for the output connected to that valve for this sequence might be valve_output ← (filling active OR draining active).

The main advantage there is that it allows the Sequence Logic to be implemented more simply and cleanly because the three areas of Sequence Logic, one for filling, one for heating, and one for draining, do not have to coordinate with each other over which currently has control of the valve. And having logic that is simpler and cleaner and easier to read and understand is money in the bank, because the cost of writing code amortizes to zero over the life of a project measured in decades, but the cost or reading code (e.g. for troubleshooting some obscure instrumentation failure) accumulates over the life of a project.
 
Thanks for the replies guys.

We'll be using PlantPAx and using Phase Manager so a lot of this is pre-made and has some interesting mechanisms built like ownership, etc...
The Phase logic is separated from the control and all the phase will do is replace the operator in doing a task. It's the specifics and trying to understand if we're painting ourselves in a corner by developing phases in a certain way that's been bugging me.
 
The big doubt from my side is whether all phases should terminate or not. For example, should I have a temperature control phases htat is always on and receives parameters and reacts accordingly? Or should I create more specific phases like heat, cool, maintain?
The big concern from the question above is that when putting phases in parallel, the said temperature phase won't complete so I'll use some other condition and am not sure what happens to the Temperature phase.

This is an excellent question, with a subtle answer. There really is no "standard", from an S88 perspective. Much is going to depend on how you want to visualize what is going on to your users, and how you want to manage hold propagation. It applies to any type of continuous control, whether temperature, pressure, agitation, etc.

You effectively have two "objects" in your system, a "Temperature Control phase" and a Temperature Control Equipment module. There are legitimately two approaches:

a) Have batch engine launch the temperature control phase and it runs continuously, taking ownership of the PID loop and all the auxiliary valves, pumps, etc., When the batch goes into hold, the phase also goes into hold, putting the system into some safe state. But the question is, when does this phase complete?

b) When the batch engine launches the temperature control phase, that phase passes the recipe setpoint, an PID Auto mode command, etc. to the Equipment module, which then performs all the regulatory functions, and the phase ends (perhaps waiting until the temperature has be "reached" (i.e., close, since the PID may approach the temperature asymptotically, and you may not want to hold up executing the next phase indefinitely). Later, the Batch will trigger the phase again, but this time with recipe parameters which "turns off" the Temperature Control equipment module. But the question here is, if the batch holds, what tells the EM to do anything differently? How will batch Abort tell the EM to turn off without a phase (since FT Batch, unlike phases, doesn't have "abort routines", at least last I checked (it's been a while).

As you can see, either solution has a trap built in. Solution (a) also has the potential issue of having a Batch recipe structure with long parallel side branches to keep the regulatory phases running but yet branches can't cross each other (I'm looking at you, InBatch!). This can make Batch design nearly impossible, or at best, convoluted.

So (b) tends to be the favored approach. But how to manage that "runaway train" that is the equipment module with no phase actively commanding it? This is where that "Ownership" comes in. Unfortunately, I've been mostly working with InBatch in recent years and I don't remember the details of how FT Batch interacts with "Units" in terms of what data is exchanged between the two, if any. I know that InBatch manages some of its Hold propagation through the Units, sending "UHOLD" commands and the like to the PLC, and then those Units can take action on their respective "children" (such as a vessel's temperature, pressure, agitator, etc. equipment modules). However, InBatch is built on a different batch engine than FT Batch, so I can't give you the specific answer here.

There is also another potential "gotcha" to solution (b): How does the operator know what's going on with the EM ? And can she / how does she take manual control of it to override what the (now asleep) phase told it to do?

I do not believe that PAx has built-in objects for this sort of thing yet. Last time I did it, I had to create my own. "Fun" times.

Good luck.
 
Thanks Aardwizz, great answer!!

This is an excellent question, with a subtle answer. There really is no "standard", from an S88 perspective. Much is going to depend on how you want to visualize what is going on to your users, and how you want to manage hold propagation. It applies to any type of continuous control, whether temperature, pressure, agitation, etc.
Yeah, I get this and there's not many people in my company to help me as the previous "developer" implemented your approach b in a much looser way (tabular editor in Proficy Batch, but only about 15% of it).

You effectively have two "objects" in your system, a "Temperature Control phase" and a Temperature Control Equipment module. There are legitimately two approaches:

a) Have batch engine launch the temperature control phase and it runs continuously, taking ownership of the PID loop and all the auxiliary valves, pumps, etc., When the batch goes into hold, the phase also goes into hold, putting the system into some safe state. But the question is, when does this phase complete?

This is the question I'm battling with, would batch issue a stop command to it? On a parallel branch where the transition for both phases is simply that one of them completes. Would the non'terminating one receive a Stop command?

FTBatch has this functionality called transfer of control where you can have a phase, a transition (obviously not for that phase to complete) and the same phase again. In this situation, batch keeps the phase running and indicates the Equipment Phase in the PLC to request new phase parameters.
This solves the agitation and temperature phases always being called from start to finish and to implement operations and unit procedures.

b) When the batch engine launches the temperature control phase, that phase passes the recipe setpoint, an PID Auto mode command, etc. to the Equipment module, which then performs all the regulatory functions, and the phase ends (perhaps waiting until the temperature has be "reached" (i.e., close, since the PID may approach the temperature asymptotically, and you may not want to hold up executing the next phase indefinitely). Later, the Batch will trigger the phase again, but this time with recipe parameters which "turns off" the Temperature Control equipment module. But the question here is, if the batch holds, what tells the EM to do anything differently? How will batch Abort tell the EM to turn off without a phase (since FT Batch, unlike phases, doesn't have "abort routines", at least last I checked (it's been a while).
This is a bit of a non-starter for me as it complicates a few things:
- Puts the operator in charge, the purpose of this is to cut out as much of the operator as possible since they're not paid as well as before and as such have zero ownership.
- Creates issues in running parallel phases since we may have to have a phase at some point waiting for the result of that action. This means that for each phase, we'd need a separate HoldFor to witness the result of this phase.
- "Hides" the behaviour of the phase. Since we're logging what the phase does and how long it takes, this is important information. Granted we'll likely be tracking the Operation and Unit Procedure but it's more hassle overall.
As you can see, either solution has a trap built in. Solution (a) also has the potential issue of having a Batch recipe structure with long parallel side branches to keep the regulatory phases running but yet branches can't cross each other (I'm looking at you, InBatch!). This can make Batch design nearly impossible, or at best, convoluted.
I suppose having a Heat, Cool, Maintain set of phases would provide natural breaking points in the logic to start the next one... but there's no guarantee the recipe writer includes them either. And as you say, then there's no hold propagation... which would add a lot of logic to the PLC to cover for what the batch doesn't do.
So (b) tends to be the favored approach. But how to manage that "runaway train" that is the equipment module with no phase actively commanding it? This is where that "Ownership" comes in. Unfortunately, I've been mostly working with InBatch in recent years and I don't remember the details of how FT Batch interacts with "Units" in terms of what data is exchanged between the two, if any. I know that InBatch manages some of its Hold propagation through the Units, sending "UHOLD" commands and the like to the PLC, and then those Units can take action on their respective "children" (such as a vessel's temperature, pressure, agitator, etc. equipment modules). However, InBatch is built on a different batch engine than FT Batch, so I can't give you the specific answer here.
PlantPAx does have Area and Unit instructions in the PLC logic from which to propagate commands... not sure about Phase control commands though.
There is also another potential "gotcha" to solution (b): How does the operator know what's going on with the EM ? And can she / how does she take manual control of it to override what the (now asleep) phase told it to do?
PlantPAx does have faceplates for EM and EP constructs inside the PLC. It's actually pretty neat and something I'll be using and a supervisor can have access to them to take control when needed.

I think the two main areas I'm missing is experience with FT Batch, particularly this behaviour of the parallel phase construct and how the recipe writer would like to create his recipes.
I think I need to get a workshop set up to design a recipe in SFC and define within that recipe what each of those blocks would do.
 

Similar Topics

Does anyone have expereince creating a custom API to build a campaign management system for FactoryTalk Batch? Stuck between using a REST API or...
1
Replies
1,488
Views
I would be so grateful for advice from this forum's Rockwell networks veterans on how to approach Rockwell on the issue I am reporting below. I am...
0
Replies
176
Views
Hi, I have a question about an HMI button. I want the button to stay ON even when I switch screens, without having to modify my PLC program...
4
Replies
329
Views
Hi guys, Can someone give me some help understanding this image from PLCopen? I can't understand it. For safety function reset I'm using this...
3
Replies
346
Views
Hi, hope every is doing well. We have a redundant system of control logix 1756-L72 Controllers. And I have some questions regarding behavior of...
1
Replies
878
Views
Top