11.3 Related features
In this section, you can find functions and subroutines frequently used for Recipe. Please refer to the table below for applicable functions/subroutines. For more detailed
information of each function and subroutine, please refer to the next section.
When you use a function in the script, there must be brackets since it has a return value. Brackets should be removed in subroutines.
When you use functions and subroutines in command expression, they must be used with brackets. In the script, the functions and subroutines have to be differentiated.
Command | Description | ||
Recipe Control | Subroutine | RecipeDialog | Brings up the Recipe dialog box. |
Subroutine | RecipeDownload | Downloads the recipe data from the tag | |
Subroutine | RecipeUpload | Uploads the tag group values to the recipe | |
Function | RecipeGetData | Brings the field value in the current recipe | |
Subroutine | RecipeSetData | Sets the value at the specific field of the | |
Subroutine | RecipeLoad | Loads the recipe data from the recipe file. | |
Subroutine | RecipeSave | Saves the recipe data into a recipe file. |
Details |
RecipeDialog | Brings up the Recipe dialog box | |
Subroutine | Command | RecipeDialog() |
Script | RecipeDialog | |
Description | This subroutine prompts the ‘Recipe dialog box’ which is used to control recipe function. You may check the setting values in the current recipe model, and save or modify them through buttons. | |
Example | Enter the command to open the recipe dialog box.Item Description |
Item | Description | |
Model Name | Select the recipe model. | |
Tag Group | Select the tag group of the recipe model. | |
Write | Applies the setting value to the tag. If the tag is defined as a real tag, the setting value will be downloaded to the connected PLC. | |
Read | Bring the tag value to the recipe setting value. | |
Save/Load | Saves or loads the tag value to the recipe setting value. | |
Product | Displays the name of a recipe file. | |
Description | Enter the description about the recipe file. | |
Load | Loads the selected product’s values to the current recipe. | |
Save | Saves the product to Historian DB. | |
Cancel | Cancels the file saving. | |
Delete | Deletes the selected product. |
RecipeDownload | Downloads the recipe data from the tag group. | |
Subroutine | Command | RecipeDownload (“Model Name”, “Tag Group Name”) |
Script | RecipeDownload “Model Name”, “Tag Group Name” | |
Description | This subroutine does the same action with [Write] in the recipe dialog box. | |
Example | Enter the command to download the data in ‘TagGroup1’ tag group into the tag. |
RecipeUpload | Uploads the tag group values to the recipe data. | |
Subroutine | Command | RecipeUpload(“Model Name”, “Tag Group Name”) |
Script | RecipeUpload “Model Name”, “Tag Group Name” | |
Description | This subroutine does the same action with [Read] in the recipe dialog box. | |
Example | Enter the command to upload the tag value in the ‘Chicken’ tag group into the recipe model 'Feed'. |
RecipeGetData | Brings the field value in the current recipe model. | |
Function | Command | RecipeGetData (“Model Name”, “Field Name”) |
Script | n = RecipeGetData (“Model Name”, “Field Name”) | |
Description | Brings the field value of the recipe model from currently stored in recipe memory. | |
Example | Enter the command to bring the value from ‘Oats’ field of ‘Feed’ model to the |
RecipeSetData | Sets the value at the specific field of the current recipe model. | |
Subroutine | Command | RecipeSetData(“Model Name”, “Field Name”, Value) |
Script | RecipeSetData “Model Name”, “Field Name”, Value | |
Description | This subroutine inputs a specific setting value in the field of the current model. | |
Example | Enter the command to set the value 100 at the ‘Oats’ field of ‘Feed’ model. |
RecipeLoad | Loads the recipe data from the recipe file. | |
Subroutine | Command | RecipeLoad(“Model Name”, “Product Name”) |
Script | RecipeLoad “Model Name”, “Product Name” | |
Description | This subroutine does the same action with [Open] in the recipe dialog box. The recipe data is retrieved from the specified recipe file. | |
Example | Enter the command to load the recipe data file ‘Pig feed’ to the ‘Feed’ model. |
RecipeSave | Saves the recipe data into a recipe file. | |
Subroutine | Command | RecipeSave(“Model Name”, “Production History Name”, ”Desc”) |
Script | RecipeSave “Model Name”, “Production History Name”, ”Desc” | |
Description | This subroutine does the same action as [Save] in the recipe dialog box. The recipe data is stored into a specified name. | |
Example | Saves the “Feed” model’s recipe data as the file name “Pig Feed_20240131”. |