All,
I'm having an issue properly executing a script in Cimplicity. I want to execute a temporary push button, and that part of my script is working fine:
'set the point
Pointset "TAG", 1
'wait 1 second
Sleep 1000
'release the point
Pointset "TAG", 0
that part is working properly throughout (Cimplicity, PLC, interposing relay all pick up for one second). My issue is that I wanted to encapsulate that script in a MsgBox, so the operator has an opportunity to cancel the command. My script has the MsgBox (ebYesNo) pop up, and the yes button executes the script, however the no button also executes the script.
Yes and No buttons execute script:
Sub OnMouseUp (x As Long, y As Long, flags As Long)
MsgBox "OpenV-FG30-1?",ebYesNo,"V-FG30-1"
If ebYes Then
'set the point
Pointset "TAG", 1
'wait 1 second
Sleep 1000
'release the point
Pointset "TAG", 0
End If
End Sub
Any help on pointing me in the right direction of getting the no button to properly function would be great.
Thanks
Chris
I'm having an issue properly executing a script in Cimplicity. I want to execute a temporary push button, and that part of my script is working fine:
'set the point
Pointset "TAG", 1
'wait 1 second
Sleep 1000
'release the point
Pointset "TAG", 0
that part is working properly throughout (Cimplicity, PLC, interposing relay all pick up for one second). My issue is that I wanted to encapsulate that script in a MsgBox, so the operator has an opportunity to cancel the command. My script has the MsgBox (ebYesNo) pop up, and the yes button executes the script, however the no button also executes the script.
Yes and No buttons execute script:
Sub OnMouseUp (x As Long, y As Long, flags As Long)
MsgBox "OpenV-FG30-1?",ebYesNo,"V-FG30-1"
If ebYes Then
'set the point
Pointset "TAG", 1
'wait 1 second
Sleep 1000
'release the point
Pointset "TAG", 0
End If
End Sub
Any help on pointing me in the right direction of getting the no button to properly function would be great.
Thanks
Chris