The basic execution flow of a recipe is as follows:
The initial step of the recipe runs and arms its transition.
Once armed, the DeltaV system monitors the value of the transition.
When the transition evaluates to true, the DeltaV Batch system deactivates the preceding steps and activates the subsequent steps and transitions.
Once the subsequent steps are connected, the transitions following them are armed.
The connected steps are issued Start commands.
These steps (2 through 5) are repeated until the entire recipe has been executed.
This basic flow is repeated at every level of the procedural hierarchy with the following additions:
If the current step is another recipe, when it starts to run, the execution passes down one level of the procedural hierarchy, and the recipe at that level starts to run. For example, when the step ADDITIVE runs, the execution passes down to the unit procedure ADDITIVE and the first step of the unit procedure starts to run.
When there are no more steps in a recipe at a specific level, the execution passes up one level in the procedural hierarchy. When this happens, the transition of the active step at the higher level is evaluated. If the transition evaluates to true, the recipe continues to the next step.
If two steps follow the currently armed transition, both steps execute simultaneously when the transition evaluates to true. Thereafter, each branch executes as previously described.
A phase's STEP_INDEX is reset to zero (0) after the phase is sent a Start command.
Consider what happens when the following application runs:
A command is sent from the Batch Operator Interface to the DeltaV Batch Executive to start the MAKE_PAINT recipe.
The initial step of the procedure runs and arms its transition.
Once armed, the DeltaV system monitors the value of the transition. Since this transition is TRUE, the initial step stops running and the BASE and ADDITIVE steps in the And sequence selection start running simultaneously.
The DeltaV system then examines each step to determine if either step is a recipe.
Since both steps are recipes, the DeltaV system passes execution down to the unit procedures BASE and ADDITIVE. As a result, the initial steps of these recipes start running and their transitions arm.
Once armed, the DeltaV system monitors the values of these transitions. Since both transitions are TRUE, the initial steps stop running and the MAKE_BASE and MAKE_ADDITIVE steps start running.
The DeltaV system then examines each step to determine if either step is a recipe.
Since both steps are recipes, the DeltaV system passes execution down to the operations MAKE_BASE and MAKE_ADDITIVE. As a result, the first steps of these recipes start running and their transitions arm.
Each phase in these operations executes. When the two operations complete, execution passes back to the BASE and ADDITIVE unit procedures and then back to the top level procedure MAKE_PAINT.
When both unit procedures are complete, the transition following these steps evaluates to TRUE and the MAKE_FNL step starts to run.
The recipe continues as described until the last phase completes and passes control back to the top-level procedure. Then the recipe ends.