Remarks Properties Methods DynProperties Samples



Recipes serve for the assembling of input lists for setpoint values and commands which in online operation are executed with a function call.


Count Name Parent


Create Delete DynPropertiesEnum[GET]
DynProperties[GET] DynProperties[PUT] ExecuteValues
Export ExportXML ImportXML
Item ReadValues Save


Name Type Description
PasswordLevel Long

Authorization group

Needed authorization group for editing the recipe in the Runtime.
A user is only allowed to change recipe values (read, edit, delete), if he has the according authorization level.
Minimum: 0.
Maximum: 127.
Default: 0.

Read more in the online manual

RecipeName String


Unique name of the recipe.
Default: Recipe_x (where x is a consecutive number).

Read more in the online manual

SyncWrite Boolean

Write synchronously

Active: 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.
In scripts this can make sure, that the following function is not started, before this one is finished.
The confirmation can also be evaluated with the status bit "WR-SUC".
Inactive: Do not wait for the writing confirmation.
Default: inaczive.

Read more in the online manual

SyncWriteTimeout Long

Timeout [ms]

If "Write synchronous" is activated, here the timeout can be defined.
If 0 is entered here, the control system calculates the timeout in the following way:
3000+(100*number of datapoints)
Minimum: 0.
Maximum: 4294967295.
Default: 0.

Read more in the online manual


Sub zenOn_Recipe(ByRef zRecipes As Recipes)
	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