Recipes serve for the assembling of input lists for setpoint values and commands which in online operation are executed with a function call.
Needed authorization group for editing the
recipe in the Runtime.
Unique name of the recipe.
Executing a function with this recipe is not finished, before a
positive confirmation of the writing action is received or the
defined timeout is over.
If "Write synchronous" is activated, here the
timeout can be defined.
Sub zenOn_Recipe(ByRef zRecipes As Recipes) 'Declarations Dim zRecipe As recipe Dim zVariable As Variable Dim i As Integer 'Initialization of zRecipe with the first element in the "zRecipes" object Set zRecipe = zRecipes.Item(0) 'Initialization of zVariable with the first element in the "Variables" object Set zVariable = thisProject.Variables.Item(0) 'Create new "RecipeValue" object 'Assign zVariable with a default value of 50 zRecipe.Create zVariable.PvID, 50 'For every "RecipeValue" object in zRecipe,... For i = 0 To zRecipe.Count - 1 '... output the name Debug.Print "Name: " & zRecipe.Item(i).ItemVariable.Name 'and value Debug.Print "Value: " & zRecipe.Item(i).Value Next i 'Delete the former created "RecipeValue" object zRecipe.Delete (zVariable.PvID) End Sub