Batch & Recipe Management
Within Alarms, Reports & Diagnostics > Recipes, are three pages dedicated to providing support for batch processing operations:
-
Batch & Recipe Management
-
Batch History
-
Batch Details
Within the tag browser there are several tags that are used to configure batch processing operations, chief among them is the Recipe Book tag which comes pre-configured with several default child tags.
Control over running the batch is expected to remain with the PLC. VTScada's role is to provide sets of values for the recipe used in a batch, start the run (if allowed by the PLC), and report when the batch has finished (if that information is provided by the PLC).
Recipes are not stored in databases
Recipes are stored under the VTScada Distributed Version Control System using CSV files, rather than under the Historian. Unlike other systems, where loss of access to the central database could cause downtime, the VTScada system ensures that production can continue because the files are synchronized across all workstations, automatically.
Any changes by an operator on any workstation will immediately be reflected in the running copy (and files) on all connected workstations. If a workstation was offline when an update was made, its copy of the recipes will be updated as soon as it comes back online.
The other benefit of storing recipes in the version control system is that you get a complete revision log of every change, including the ID of the operator and on which workstation that change was made.
Recipes can be imported from and exported to an external database to facilitate the use of other recipe management tools.
General Process
1) In all cases, the first step is to create a Recipe Book Tag. This will hold your recipes, give you access to key configuration settings, and define the communication link to the PLC. (Refer to Tag Structure for Recipes)
2) A Parameters context tag is automatically generated as a child of a Recipe Book tag. Parameters can hold values that are passed along at the start of each step in a batch to inform the PLC or controller how to operate. Each Parameter is stored in a Recipe Parameter Tag. These should be created as child tags of your RecipeBook\Parameters tag.Each Recipe Parameter is a two-tag structure where the parent Parameter tag holds the overall description of what the Parameter is, and a child I/O tag holds the I/O address and other specifications required to write a value for that parameter to the PLC.
Optionally, some or all of your Recipe Parameters can use a Recipe Proportions Tag. Use these when parameter values should be multiplied by a given factor from one batch to another, or when values can vary proportionally to each other.
In each Recipe Book, there is only one Parameter tag structure for each parameter, no matter how many recipes or recipe versions call for that parameter by varying values (including the value of zero).
3) After creating the Recipe Book tag and a set of Recipe Parameter tags, open The Batch & Recipe Management Page to set, retrieve, edit, and store parameter values for each recipe and to add steps in the Recipe Book. (It is possible, but rarely necessary, to build your own recipe page using the library of Recipe Management WidgetsAfter setting values for the parameters that are included in a recipe, save them to a new recipe name. You cannot run the batch with unsaved changes. The option to set a version number is available only if you selected that feature when you created the Recipe Book tag.
Any parameter that is not used in a given recipe or step should have a blank (or zero) value.
Read/Write Sequence of Events
VTScada's recipe system works in tandem with an external PLC to execute recipe batches. VTScada and the PLC must both be correctly configured to run a batch. To use some features (such as updating an ongoing batch) the PLC must also be capable of responding to these events. Here is a list of steps detailing this sequence of events as it relates to the PLC that is controlling the batch.
Click the run button in VTScada to start the batch.
An operator provides a Batch Number, an optional note and possibly a multiplier. This information is stored in the event log.
Each Recipe Parameter tag linked to a Recipe Proportions tag is scaled (if scaling is enabled) and written to the address provided in the I/O tab of each Recipe Parameter tag.
VTScada writes to the PLC and then reads back what was written. If the parameter value read back doesn't match the expected value, VTScada will pause, display the conflict at the bottom of the screen, and offer the option to skip the conflict or cancel the batch. If the operator selects "skip" VTScada will proceed with the batch without altering the conflicted value read from the PLC.
VTScada will write to the start address provided in the I/O tab of the Recipe Parameter tag. This event signals to the PLC to begin the manufacturing process. Depending on how the PLC is configured, it may reassign a FALSE value to a Done address.
If the recipe is updated while the batch is ongoing VTScada changes the values assigned to the applicable parameter address. This option must be enabled in VTScada and the PLC must be capable and configured to respond to these changes.
VTScada monitors the state of the Done address in the Batch Complete tag nested under the Recipe Book tag. The batch is Done when the PLC signals that it is done by writing to the done address specified in the I/O tab of the Recipe Book tag. This address is being monitored by VTScada.
If there is a Trigger tag configured to respond to a completed batch, writing to the done address is the event that triggers it.
If the recipe is a multi-step recipe, the PLC writing to the done address will signal VTScada to start the whole process over again using the values for the next step. You can see what step is in progress from the caption at the bottom of the screen.
The start and done values may be cleared by the PLC or by VTScada depending on your configuration and the capabilities of your PLC. You may have two separate addresses that are written to and cleared by VTScada and the PLC in turn. Or you may have a single address to which VTScada writes a 1 to start the batch and the PLC writes a 0 to signal the batch is done (while simultaneously clearing the start)
The history tab of the alarm page displays Batch Started, Batch Complete and each time the value of a parameter is changed.
You can technically start a batch without providing a start or done address but it is extremely inadvisable because this will break many features and functions and the batch will never be flagged done.
It is possible to configure VTScada to operate with externally triggered recipe batches. In this configuration, VTScada does not write anything to the PLC, but simply monitors the changes as they are made by an external, third party HMI. VTScada will display information and record historical information about these batches as they occur. Read Externally Triggered Recipe Batches for more information.
Notes:
The value for each parameter in a recipe or recipe version is stored in a file that is controlled and maintained as part of the application's version control system. While parameter values can be set individually by working with your Recipe Parameter tags in the Recipe & Batch Management Page, it is also common to import parameter values from either of:
- A Microsoft Access file
- A Microsoft Excel file
You can also start the retrieve process from the Tag Browser by a Recipe Book then clicking the Import button.
In earlier versions of VTScada, Batch & Recipe related parameters were called ingredients and Recipe Parameter tags were called Recipe Ingredient tags. Some residual Easter eggs may still be found in the documentation and debugging tools.