I have a processbook display with multiple alarms. Each alarm consists of a rectangle and a button. The rectangle has a multi-state associated with it. State 2's blink box is checked. When the alarm comes in for state 2 the operator can click the alarms button. This action calls VBA code that acknowledges the alarm. The onClick code stops the blinking by clearing the multi-state state 2 checkbox.
Dim sym As Symbol
Dim ms As MultiState
Dim mss As MSState
If (ThisDisplay.Button1.Selected = True) Then
ElseIf (ThisDisplay.Button2.Selected = True) Then
ElseIf (ThisDisplay.Button3.Selected = True) Then
Sub changeState(alarm As String)
Set sym = ThisDisplay.Symbols(alarm)
Set ms = sym.GetMultiState
Set mss = ms.GetState(2)
mss.Blink = False
After the pi tag resets to state 1 I would like for the blink checkbox in state 2 to become checked again. My question is how can I trigger a function when the state changes from 2 to 1.