In this video, You can learn How to start & Stop a motor with Operator Confirmation using Vbscript.
Script for "START"
Sub OnClick(ByVal Item)
Dim A
A = Msgbox ("Do you want to switch ON the motor?",4,"Operator Confirmation")
If A = 6 Then
HMIRuntime.Tags("01START" ).Write 1
HMIRuntime.Tags("03MOTOR" ).Write 1
Elseif A= 7 Then
HMIRuntime.Tags("01START" ).Write 0
HMIRuntime.Tags("03MOTOR" ).Write 0
End If
End Sub
Script for "STOP"
Sub OnClick(ByVal Item)
Dim A
A = Msgbox ("Do you want to switch OFF the motor?",4,"Operator Confirmation")
If A = 6 Then
HMIRuntime.Tags("01START" ).Write 0
HMIRuntime.Tags("03MOTOR" ).Write 0
Elseif A= 7 Then
HMIRuntime.Tags("01START" ).Write 1
HMIRuntime.Tags("03MOTOR" ).Write 1
End If
End Sub