Please help me for some reason I cannot get the loop to continue, it is based on a screen name and if the screen is on the start page the script should loop.
It runs once when the script starts but fails to loop. What have I got wrong.
Thanks for anybodies help
Dim ScreenName
Do
ScreenName = HmiRuntime.BaseScreenName
Loop Until ScreenName <> "Start page"
If SmartTags ("Chuck_Part_clamped_with component") = True Then
SmartTags ("presence_chuck") = 1 'internal tag for animation green
ElseIf SmartTags ("Chuck_Part_clamped_with component") = True And SmartTags("Machine running") = True Then
SmartTags ("presence_chuck") = 2 'internal tag for animation yellow
Else SmartTags ("presence_chuck") = 0 'internal tag for animation red
End If
If SmartTags ("Tube_Part_presence_ready") = True Then
SmartTags ("presence_tube") = 1 'internal tag for animation green
ElseIf SmartTags ("Tube_Part_presence_ready") = True And SmartTags("Machine running") = True Then
SmartTags ("presence_tube") = 2 'internal tag for animation yellow
Else SmartTags ("presence_tube") = 0 'internal tag for animation red
End If
It runs once when the script starts but fails to loop. What have I got wrong.
Thanks for anybodies help
Dim ScreenName
Do
ScreenName = HmiRuntime.BaseScreenName
Loop Until ScreenName <> "Start page"
If SmartTags ("Chuck_Part_clamped_with component") = True Then
SmartTags ("presence_chuck") = 1 'internal tag for animation green
ElseIf SmartTags ("Chuck_Part_clamped_with component") = True And SmartTags("Machine running") = True Then
SmartTags ("presence_chuck") = 2 'internal tag for animation yellow
Else SmartTags ("presence_chuck") = 0 'internal tag for animation red
End If
If SmartTags ("Tube_Part_presence_ready") = True Then
SmartTags ("presence_tube") = 1 'internal tag for animation green
ElseIf SmartTags ("Tube_Part_presence_ready") = True And SmartTags("Machine running") = True Then
SmartTags ("presence_tube") = 2 'internal tag for animation yellow
Else SmartTags ("presence_tube") = 0 'internal tag for animation red
End If