Proficy ME View VBScript

TECH4Hire

Member
Join Date
Oct 2013
Location
Rutland, Vermont
Posts
1
I am trying to call the home panel of a view project from a plc variable. I think it would be best done in vbscript but i do not know how to call the variable in vbscript for the plc. I am trying to use an if statement. I would like to open home page where i'm displaying a message to check data before going back to auto mode.
 
If you are trying to open the main screen when a PLC variable tag goes true the following code in this code im assuming your PLC variable is of a boolean data type for simplicity, if it is an Interger adjust accordingly, im typing this code from memory so you would need to adjust it accordingly if my syntax is wrong, if you see a ' symbol it means its the identifier for comments i highlighted this in bold letters

'Start your main Function
Sub Main()
'Create the Variable that we will store the value of the actual PLC variable in this case the variable is called p
Dim p As Boolean

'Lets reference your actual PLC tag thats a tag in cimplicity to the variable that we created called p

p = PointGet("PLC Variable tag")

'Now that your p is referencing the plc tag you have assigned, start your If statment to open a .cim screen that you specify type the name of the screen excluding the .cim part into the parameter CIM_SCREEN_TO_OPEN
If p = TRUE Then
Set MyApplication = CreateObject("CimView")
Set MyScreen = MyApplication.ActiveScreen
MyProjectDir = Environ("SITE_ROOT")
MyNewScreen = MyProjectDir & "screens\"CIM_SCREEN_TO_OPEN".cim"
Myproject = PointGet("$PROJECT")
Newscreen = Myapplication.Open(MyNewScreen,Myproject,True)

End if

End Sub


This code should open a .cim screen when a plc tag that you assign goes true. Hope this helps
 
actually disregard my post it applies to a cimplicity HMI application i don't know if it would apply to a Proficy application.
 
The easiest way is to drag and drop the variable from the declarations to the script.

In VBScript, you should end up with something like: PLC.Element("MyVariable").Value.

Code:
IF PLC.Element("MyVariable").Value = x
    View.PanelOpen "MyHomeScreen"
END IF
 
GEIP has a white paper on this, it is old but still very close to today's version of Proficy ME View.
 

Similar Topics

Having trouble connecting and uploading from a Quickpanel View to Proficy Quickpanel communcates to PLC no problem Quickpanel IP...
Replies
13
Views
2,456
Hi all i have project ME windows PC view HMI my PLC GE90-30 cpu 364 i have 2 Questions 1- on graphical panels i used numerical Data Entry (DIN)to...
Replies
7
Views
2,599
Hello all, I am trying to open a program from a client that was done on ge proficy machine edition 9.5 but everytime i try it I get the missing...
Replies
9
Views
3,346
Dear all, I have 2 flowcomputers floboss600+ and according to the several problems of scada software (IFIX 5.8) i need to use rsview32 instead...
Replies
2
Views
1,443
I'm looking to implement some complex recipes within a GE Quickpanel and noticed in the help files that it's possible to use equations within the...
Replies
2
Views
2,226
Back
Top Bottom