|PGM Syntax||Data Types||Declaring Variables||Predefined Variables||Formatting|
Watch variable Watch classInstance Watch classInstance.DataMember
Special case uses of Watch:
NOTE: Although the Watch keyword can be used to display PGM code data variables in the Access window, the convention is to use the shortcut syntax when Declaring Variables, including variables within a user Class.
The Watch function:
- Allows any variable to be displayed in the Access window as input fields. This is equivalent to appending a ' * ' to the end of the variable when Declaring Variables.
- Allows any instance of a class to be displayed. This will add all the data members for the class.
- Allows selective display of data members in a class instance. The Dot Notation would be used to access the required data member of the class instance.
- When used with a ' @ ' after the variable, will display the variable as a result field in the Access window.
- Any number of variables, class instances or class data members can be watched using a single watch command if each one is separated by a comma.
REAL a,b Noise x, y WATCH a, b@, x, y.StdDev
- This is used to make variables of a class instance not visible in the access window.
- Further information with Class ExcludeWatch.
const long Count = 7 MyClass C[Count] ExcludeWatch C
Syntax available from Build 139.32335: PageLabel "string"
This is used to create a new access window tab page with the specified string.
- This will create a tab page with name "Data". (see example below)
- Use "" to enclose the label name.
- The Label length should not be too long. The maximum length allowed is 40 characters. Any characters over the maximum length will be trimmed.
- Within a Class definition, use ClassAsPageLabel to automatically create a tab page matching the variable name of each class instance.
Syntax available from Build 139.32335: TextLabel "string", "string"
Syntax: TextLabel("string", "string")
This is used to create text description lines on the access window.
- For a single comment:
TextLabel(" Enter the feed options:")or
TextLabel " Enter the feed options:"
- For a blank line:
TextLabel ""or simply
TextBreak(available from Build 139.33027).
- To insert a text label with a blank line before the label, specify a comma before the label:
TextLabel(, " Water Flows In")or
TextLabel , " Water Flows In"
- You can specify multiple lines with comma (,) separator:
TextLabel("" ," ======Alumina=======", " Area 5")or
TextLabel "", " ======Alumina=======", " Area 5"
- Text Labels will appear on the access window as Italic text
Note: Do not use a tab in the string, it will be replaced with a single space.
Available from Build 139.33027.
This is used without parameters to create a single blank line or text break between two sections. This is equivalent to TextLabel "".
This code will show the following Access Window view:
Class instances can have text comments displayed in the Access window as described by ClassComment keyword.
Class instances can be displayed in Grids (Tables) in the Access window as described by ClassGrid keyword.
Associated formatting keywords that can be used within the class definition affecting the display of the grid are ClassGridColumnWidth, ClassGridMaxColumns, ClassGridHideComment and ClassGridHideText.