Cimplicity MsgBox Script Help

Sapper307

Member
Join Date
Nov 2017
Location
Maryland
Posts
107
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
 
It sounds like you want a confirmation screen. It has been a long time since I used Cimplicity but I thought it had a confirmation checkbox. Then you enter you message for confirmation. Yes would execute the script and no closed the message box.

But again it's been a long time since my last project.
 
The confirmation check box is an option when you create the Event as a Procedure. If you create the event as a script, you have to execute everything in the script including message boxes etc. My problem with executing the Event as a Procedure is that I need the 1 second temporary push button, which is not an option in Procedures.
 
EUREKA!



Sub OnMouseUp (x As Long, y As Long, flags As Long)
Result= MsgBox ("OpenV-FG30-1?",ebYesNo,"V-FG30-1")

If Result=6 Then
'set the point
Pointset "TAG", 1

'wait 1 second
Sleep 1000

'release the point
Pointset "TAG", 0
End If
End Sub
 

Similar Topics

Hi good day Everyone, I have a cimplicity v10 project with 7 to 8k tags communicating with AB PLC through OPC and Rslinx classic. I have this...
Replies
1
Views
82
Hi All, I am trying to program some new Versamax micro PLCs through PAC using some programs saved in our archive however whenever i go to import...
Replies
2
Views
88
Hi All, Im using Cimplicity 8.2. after the last restart Server Scada, the PTDL_RP process can not running. so Process can not be login to database...
Replies
2
Views
122
Good morning, I have a Emerson/GE PLC with Cimplicity SCADA. I need to export data of a specific point/object to a CSV file and load the CSV file...
Replies
7
Views
209
Hi Everyone, currently i'm developing a project using Cimplicity version 10. I'm facing an issue where every time i press the same button to open...
Replies
9
Views
746
Back
Top Bottom