State

 

Remarks Properties Methods Samples

ED
avaliable
RT
avaliable

Remarks:Top

States are utilized by Reaction Matrices, in order to define the characteristics.

Properties:Top

AllValues CheckArt ClassIdx
Color Function GroupIdx
Hysterese Parent ReaAlarm
ReaAlarmBis ReaStatusExt ReaStatusFlankeExt
ReaStatusFlankeStd ReaStatusMaskeExt ReaStatusMaskeStd
ReaStatusStd ReaWert ReaWertFlanke
ReaWertMaske Status Text
charZaehlerindex    

Methods:Top

CreateSubState DynPropertiesEnum[GET] DynProperties[GET]
DynProperties[PUT] GetSubStateCount MoveSubState
SubStateItem    

Samples:Top

Binary Reaction Matrix state


Sub zenOn_SetStateForBinaryRema(ByRef zRema As Rema)

	'Declaration zState
	Dim zState As State

	'Intialize zState with the first state inside the passed binary rema
	Set zState = zRema.StateItem(1)

	'Defines the matching bit combination
	zState.ReaWert = &H89 'Sets Bit0, Bit3 and Bit7 TRUE
	zState.ReaWertMaske = &H81 'Defines that Bit0 and Bit7 will be checked (Bit3 is ignored)

	'User message that will be displayed when the event occurs
	zState.Text = "Bit combination is matched!"

	'Moreover, the first defined function will be called when the event occurs
	zState.Function = MyWorkspace.ActiveDocument.RtFunctions.Item(0)
	'The function will only be executed when the tpBitFkt is set. Additionaly the tpBitAlarm flag is set too.
	zState.Status = tpBitFkt Or tpBitAlarm

End Sub

Analog Reaction Matrix state


Private Sub zenOn_SetStateForAnalogRema(ByRef zRema As rema)

	'Declaration zState
	Dim zState As State

	'Intialize zState with the first state inside the passed analog rema
	Set zState = zRema.StateItem(1)

	'Sets the comparision mode to "greater"
	zState.CheckArt = 1

	'This definition constitutes the threshold value, where the alarm will be triggered
	zState.ReaAlarm = 11

	'This definition means that the system will be set back to its normal configuration, when "ReaAlarm" goes below 10 (hysteresis)
	zState.Hysterese = 1
	
	'User message that will be displayed when the event occurs
	zState.Text = "Limit is reached!"

	'Moreover, the first defined function will be called when the event occurs
	zState.Function = MyWorkspace.ActiveDocument.RtFunctions.Item(0)
	'The function will only be executed when the tpBitFkt is set. Additionaly the tpBitAlarm flag is set too.
	zState.Status = tpBitFkt Or tpBitAlarm

End Sub