The Recipe Manager provides the functionality for handling user-defined lists of project variables, named recipe definitions, and definite value sets for these variables within a recipe definition, named recipes.
You can use recipes to modify or read recipe values for a specific set of variables (recipe definition) on the controller. They can also be loaded from and saved to files. These interactions are possible by using visualization elements which you have to configure appropriately (input configuration execute command). You can also use certain recipe commands in the application.
When you have selected a recipe, validate that the recipe is appropriate for the process that will be controlled.
|
UNINTENDED EQUIPMENT OPERATION |
oConduct a safety analysis for the application and equipment installed. oVerify that recipe is appropriate for the process and equipment or function in the installation. oSupply appropriate parameters, particularly for limits and other safety-related elements. oVerify that all sensors and actuators are compatible with the recipe selected. oThoroughly test all functions during verification and commissioning. oProvide independent paths for critical control functions (emergency stop, over-limit conditions etc.) according to the safety analysis and applicable codes and regulations. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
By default, the recipe manager is loaded to the controller during download. It handles the writing and reading of recipes when the application is running on the controller. However, it is not necessary to load the recipe manager to the controller to use recipes only for exchanging parameters during startup of the system (that is when EcoStruxure Machine Expert is still connected to the controller). You can deactivate its download for this purpose using the option Recipe Management in the PLC. The writing and reading of recipe values will then be handled by the standard online commands and services. If the recipe management has to run on the controller, because it is needed by the application program during run time, then the RecipeCommands function block is responsible for handling the recipe commands.
For a description of the behavior of recipes in the various online modes, refer to the chapter Recipe Definition.
If the recipe manager is located on another controller other than the application being affected by the recipes, the data server will be used to read/write the variables contained in the recipes. Reading and writing of the variables is done synchronously. By calling g_RecipeManager.LastError after reading/writing, you may verify if the transmission has been carried out successfully (g_RecipeManager.LastError=0 in this case).
Recipe Management Objects in the Tools Tree
To add a Recipe Manager object to the Tools tree, select the Application node, click the green plus button, and execute the command Add other objects... > Recipe Manager.... Confirm the Add Recipe Manager dialog box by clicking Add and the Recipe Manager node is inserted below the Application node.
You can add one or several Recipe Definition objects to a Recipe Manager node. To achieve this, click the green plus button of the Recipe Manager node and execute the command Recipe Definition.... Enter a Name in the Add Recipe Definition dialog box, and click Add. Double-click the node to view and edit recipe definitions including the particular recipes in a separate editor window. For a description of the behavior of recipes in the various online modes, refer to the chapter Recipe Definition.
Recipe Manager Editor, Storage Tab
By default, the recipes will be stored automatically to files according to the settings in the Storage tab of the Recipe Manager editor:
Parameter |
Description |
---|---|
Storage Type |
Select Textual or Binary storage type. |
File Path |
Specify the location where the recipe is to be saved in the controller or in the local file system. In the controller, the path must end with a backslash (\), such as MyRecipes\. |
File Extension |
Specify the file extension of the recipe file. |
NOTE: A storage file can also be defined by the input on a visualization element (input configuration - execute command - save/load a recipe from a file). However, when defining the name of such a file in the visualization configuration, do not overwrite the * .txtrecipe file defined here in the recipe manager.
Parameter |
Description |
---|---|
Separator |
In case of textual storage, the columns selected for storage will be separated by a separator. Select 1 of the 6 options proposed. |
Available Columns |
All columns of the recipe definition, represented by the respective header. |
Selected Columns |
Selected columns of the recipe definition, that is, the columns to be stored. At least the column containing the Current Value is included in this part. It cannot be deselected. |
arrow buttons |
The other columns can be shifted to the right or to the left by selecting the respective entry and clicking the arrow buttons. You can also shift all entries from one side to the other at once by using the double arrow buttons. |
Up and Down buttons |
Click these buttons to adjust the order of the selected columns, which represents the order of the columns in the storage file. For each recipe, a file <recipe name>.<recipe definition>.<file extension> will be created in the specified folder. This file will be reloaded to the recipe manager at each restart of the application. For the update configuration of the recipe storage files, refer to the description of the General tab. |
Save as default |
Click the Save as default button to use the settings made within this dialog box as default settings for each further recipe manager inserted. |
NOTE: Floating point values (type REAL/LREAL) are stored in the textual recipe files in decimal format as well as in hexadecimal format. (Because the hexadecimal value represents the exact value whereas the decimal REAL value represents the value to the seventh decimal place.)
Example: PLC_PRG.realVar:=22.0F16#1600000H-5
For manually modifying a value in the recipe file, edit the decimal value and remove the subsequent hexadecimal entry. (If both values are available, the hexadecimal value is loaded.)
Recipe Manager Editor, General Tab
Parameter |
Description |
---|---|
Recipe Management in the PLC |
If the recipe manager is not needed on the controller, because no recipes are to be handled during run time of the application, you can deactivate this option so that the manager is not downloaded. An automatic update of the recipe file is only possible after the download has been performed. To download the recipe management to the controller, select this option. |
Save recipe |
|
Save changes to recipe files automatically |
This option is available only if the option Recipe Management in the PLC is selected. Select the Save changes to recipe files automatically option to update recipe files automatically in runtime mode whenever a recipe is changed. |
Load recipe |
|
Load only by exact match of the variable list |
Select the option Load only by exact match of the variable list to load recipe files only if the file contains all variables available in the variable list of the recipe definition of the application. The variables in the file must be in the same order as in the variable list. Additional entries at the end are ignored. Otherwise, the recipe cannot be loaded and the return value ERR_RECIPE_MISMATCH is set (RecipeManCommands.GetLastError). |
Load matching variables by variable name |
Select the option Load matching variables by variable name to load only variables with matching variable names from the recipe file. No error status is set when the variable list in the file is different from the list in the recipe definition of the application. Thus, recipe files can also be loaded if variables in the file or in the recipe definition have been deleted. |
Write recipe |
|
Limit the variable to min/max when recipe value is out of the range |
Select the option Limit the variable to min/max when recipe value is out of the range to write the defined minimum or maximum value to the controller if the recipe contains a value that is beyond the value range. |
Do not write to a variable when the recipe value is out of the min/max range |
Select the option Do not write to a variable when the recipe value is out of the min/max range to prevent a value from being written to the controller if the recipe contains a value that is beyond the value range. The value that is present in the controller will be retained. |
Click the Write Recipe button to write the selected values of a recipe to the variables in the controller when the application is in online mode.
NOTE: The present values in the controller will be overwritten by the recipe values.