RGMRecipe

 

Remarks Properties Methods DynProperties Samples

ED
avaliable
RT
avaliable

Remarks:Top

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

Properties:Top

Parent ValueCount  

Methods:Top

DynPropertiesEnum[GET] DynProperties[GET] DynProperties[PUT]
Execute Read Save
ValueItem    

DynProperties:Top

Name Type Description
Comment1 String This property returns the first comment which can be created via the MDI textbox of the RGM picture.
Comment2 String This property returns the second comment which can be created via the MDI textbox of the RGM picture.
Load Boolean this property shows if the recipe is loaded into the memory
PWLevel Long This property returns the selected authorization group of the recipe.
RecipeModified Boolean this property shows if the recipe is modified in memory (TRUE) but not yet saved in the recipe database
RecipeName String This property returns the name of the recipe in a specific group.
RecipeNumber Long This property returns the number of the recipe in a specific group.
TimeChange Double this property returns the time the recipe was saved last.
TimeSent Double this property returns the time, the recipe was executed last.
UserChange String This property returns the name of the user who has created / modified the recipe.
UserSent String this property returns the user which last executed the recipe.
WriteSync Boolean This property returns whether the "synchronous writing" is set or not.
WriteTimeout Long This property returns the writing timeout time.

Samples:Top

Public Sub zenOn_RGMRecipe()
	'Declarations
	Dim zRGM_Recipe As RGMRecipe

	'Initialization of zRGM_Recipe with the first recipe within the first recipe group
	Set zRGM_Recipe = MyWorkspace.ActiveDocument.RGMGroups.Item(0).RecipeItem(0)

	'Modify a Recipe:
	Call Modify_RGMRecipe(zRGM_Recipe)

	'Write Values from Recipe to variables
	Call Write_RGMRecipe(zRGM_Recipe)

	'Read from Variables and save as raceipe
	Call Read_RGMRecipe(zRGM_Recipe)
End Sub

Sub Modify_RGMRecipe(zRGM_Recipe As RGMRecipe)
	'Declarations
	Dim i As Integer
	
	For i = 0 To zRGM_Recipe.ValueCount - 1
		'Set action type to "Modify spontaneous value"
		zRGM_Recipe.ValueItem(i).DynProperties("Type") = 2
		'Set value...
		zRGM_Recipe.ValueItem(i).DynProperties("Value") = (i + 1) * 25
	Next i
	'Save the current value to the recipe
	zRGM_Recipe.Save
End Sub

Sub Read_RGMRecipe(zRGM_Recipe As RGMRecipe)
	'Read the current variable value and output the result
	zRGM_Recipe.Read
	'Save the current value to the recipe
	zRGM_Recipe.Save
End Sub

Sub Write_RGMRecipe(zRGM_Recipe As RGMRecipe)
	'Read the current variable value and output the result
	zRGM_Recipe.Execute
	'Save the current value to the recipe
	zRGM_Recipe.Save
End Sub