DeltaV Operate includes global pages that allow you to store public objects, methods, forms, and variable objects so they can be accessed from anywhere within your system.
The FactoryGlobalspage contains the subroutines and all of their supporting variables, forms, and functions. The FactoryGlobals file is write-protected to maintain the integrity of these scripts. See the globalsubroutines.txt file, located in the DeltaV\iFIX\NLS folder, for more information on the subroutines that are stored in the FactoryGlobals page.
The User page is the location where you can put your own objects, methods, forms, and variables that you want to use globally.
Since you can access the items that you define as public in the User page from anywhere in the system, make sure that what you enter is really what you want to expose. If you create a global public variable, remember that it can be changed from any script at any time.
This section provides examples of the items that you might want to include in your User page, including:
Variable objects can be stored in the User page so that they can be accessible throughout your application, regardless of which pictures are open.
To make a variable object global by adding it to the User page:
You can also create a global variable using the Variable Expert:
You can also configure a system-wide threshold table. Global threshold tables provide you with more centralized control over your system's data conversions. If you created a global threshold table that defined colors for value ranges, and you need to change a color or a value because you are moving to a different system, you only need to change it in one place.
To create a global threshold table that is used for all current alarms in the system:
To name the table:
Once you have named your threshold table, you can make connections from DeltaV Operate objects to this table. The following procedure provides an example of how to connect an object, in this case an oval, to a global threshold table named CurrentAlarmThresholds.
To connect an oval to a global threshold table:
The oval will now use the CurrentAlarmThresholds table instead of a custom table. Likewise, you can configure all objects that are assigned a Color By Current Alarm animation to use the CurrentAlarmThresholds table. If you ever need to change a color, value, or type, you only have to change it in one place.
You may want global access to subroutines and functions if you use them frequently. DeltaV Operate provides global subroutines and functions, such as OpenPicture, ToggleDigitalPoint, and OnScan, that you can use in your pictures and schedules. You can also include your own global subroutines and functions in the User page.
The following example adds a global subroutine to the User page:
Enter the following code in the Code window:
Public Sub DisplayMyMessage()
MsgBox "This is my message box."
End Sub
DisplayMyMessage