Hi Everyone,
I`m trying to write a script that will Open automatically a certain Picture in DeltaV Operate Run and POP UP a windows telling the operator that a certain variable of in one of my control modules have changed from 0 to 1.
I`ve seen that there are come threads in this blog that discuss similar cases, and they try to solved my problem with the Scheduler, but I am new with this tool so if some can guide me to the solution I will appreciate.
Thanks
Andre Dicaire
We have a safety popup that can help you.
First you need a module with a boolean variable.
Then you go to schedule and add a new event.The properties of the event are:
The event itself you code in VB.
Private Sub EVENTNAME_OnTrue()On Error GoTo ErrorHandler Dim strPic2Open As String strPic2Open = "YOUR DISPLAY" frsOpenPic strPic2Open Exit SubErrorHandler: frsHandleErrorEnd Sub
If you only want to show it to certain workstations you can filter them:
Dim strUser As String strUser = frsreadvalue("DVSYS.THISUSER/USERNAME.A_CV") If (InStr(1, strUser, "PLANTA_") > 0) And _ StrComp(frsGetComputerName, "WORKSTATION1", vbTextCompare) <> 0 And _ StrComp(frsGetComputerName, "WORKSTATION2", vbTextCompare) <> 0 And _ StrComp(frsGetComputerName, "WORKSTATION3", vbTextCompare) <> Then strPic2Open = "YOUR DISPLAY" frsOpenPic strPic2Open End If
Mind that this code will execute whole the time.
If your variable is TRUE for a certain time then the display will be forced during that time period.
In reply to Peterlx01: