Object Viewer
- Last UpdatedAug 12, 2024
- 2 minute read
The Object Viewer monitors the status of the objects and their attributes and can be used to modify an attribute value for testing purposes.
To add an object to the Object Viewer Watch list, you can manually type the object and attribute names into the attribute reference box in the menu bar and select Go. When prompted to enter the Attribute Type, select OK.
You can save a list of items being monitored. Once you have a list of attributes in the Watch Window, you can select all or some of them and save them to an XML file. Right-click on the Watch window to save the selection or load an existing one. You can also add a second Watch window that shows as a separate tab in the bottom of the Viewer.
Note: Do not use Ctrl + S to save the Watch window. Instead of saving the Watch window, this key combination will instead create an empty file.
Refer to the platform and engine object help for information about attributes that may indicate system health. These attributes provide alarm and statistics on how much load a platform or engine may have when executing application objects or communicating with I/O servers and other platforms.
Testing the Quality Value of Attributes
When you use Attribute Data Quality for diagnostic purposes, observe the following tips:
Best Practice - To test for the Attribute Quality Value
The actual value of a Bad and Good quality is 0 and 192, respectively. Past methods for testing the Quality value have resulted in code such as:
If MyObject.PV.Quality == 192 then
A more appropriate way to code such tests is to call one of the quality test functions available within the QuickScript language. The previous example for testing for a GOOD quality condition would be coded as:
If IsGood(MyObject.PV.Quality) then
The available functions for testing the Quality value of an attribute are as follows. The functions return a Boolean (True) value for success and a Boolean (False) for failure of the test.
Test Condition:
-
IsBad
-
IsGood
-
IsInitializing
-
IsUncertain
-
IsUsable
As in the above example, the coding syntax requires the desired function (the specific attribute to test). Note that the parenthesis around the quality is required.
Best Practice - To use the Set Condition Function
The available functions for setting the Quality value of an attribute are as follows. The functions return a Boolean (True) value for success and a Boolean (False) for failure of the test.
Set Condition:
-
SetBad
-
SetGood
-
SetInitializing
-
SetUncertain
The syntax for the Set Condition functions is the same as the Test Condition functions except that the attribute to be SET must be an attribute within the object that the script is attached to.
Example:
SetInitializing(me.PV)
For more information on Attribute Data Quality, see Templates.