The
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.
WARNING | |
---|---|
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 . 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).
To add a
object to the , select the node, click the green plus button, and execute the command . Confirm the dialog box by clicking and the node is inserted below the node.You can add one or several Recipe Definition.
objects to a node. To achieve this, click the green plus button of the node and execute the command . Enter a in the dialog box, and click . 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 chapterBy default, the recipes will be stored automatically to files according to the settings in the
tab of the editor.
Parameter |
Description |
---|---|
|
Select or storage type. |
|
Specify the location where the recipe is to be saved in the controller or in the local file system.
NOTE: For recipe managers that work in simulations, the file path must start with a dot (.), for example,
./Rcp .
|
|
Specify the file extension of the recipe file. |
Parameter |
Description |
---|---|
|
In case of textual storage, the columns selected for storage will be separated by a separator. Select 1 of the 6 options proposed. |
|
All columns of the recipe definition, represented by the respective header. |
|
Selected columns of the recipe definition, that is, the columns to be stored. At least the column containing the 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. |
and 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 tab. |
|
Click the button to use the settings made within this dialog box as default settings for each further recipe manager inserted. |
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.)
Parameter |
Description |
---|---|
|
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. |
|
|
|
This option is available only if the option is selected.Select the option to update recipe files automatically in runtime mode whenever a recipe is changed. |
|
If the option is activated, the following two options are available to configure the download from the controller. |
|
Select the option 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). |
|
Select the option 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. |
|
|
|
Select the option to write the defined minimum or maximum value to the controller if the recipe contains a value that is beyond the value range. |
|
Select the option 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. |
|
|
|
Use the function block RecipeManCommands of the RecipeManagement library to read recipes. Do not call the method cyclically as this is time and controller capacity-consuming. Select the option to read the variable values present in the controller into the recipe with each method call. Only if the values have changed, the recipe file is overwritten with the present values. As this procedure generates additional code for comparing the old and the present values, consider that it has an impact on the performance. If the option is not selected, the variable values present in the controller are read into the recipe with each method call. The recipe is then written to the recipe file in the local file system.
NOTE: This write process to the local file system with each method call may have a considerable impact on the controller performance.
|