Formatting
(Redirected from Labels)
Jump to navigation
Jump to search
Navigation: PGMs ➔ PGM Programming and Conventions ➔ Formatting
PGM Syntax | Data Types | Declaring Variables | Predefined Variables | Formatting |
---|
Watch Keywords
Watch
Syntax:
Watch variable
Watch classInstance
Watch classInstance.DataMember
- The Watch function allows any variable to be displayed in the permanent PGM data watch window. This is equivalent to appending a ' * ' to the end of the variable in the Variable declaration.
- Similarly, the Watch function allows any instance of a class to be displayed in the permanent PGM data watch window. This will add all the data members for the class to the permanent PGM data watch window.
- The Watch function also allows one to selectively add data members of an instance of a class to the permanent PGM data watch window. The Dot Notation would be used to access the required data member.
- 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.
Examples:
REAL a
Noise b, c
WATCH a, b, c.GetVal
ExcludeWatch
Syntax:
ExcludeWatch UserClass[index]
- This is used to make variables of a class not visible in the access window.
Example:
ExcludeWatch C[0]
Labels
PageLabel
Syntax from Build 139.32335: PageLabel "string"
Syntax: PageLabel("string")
This function is used to create a new access window tab page with the specified string.
For Example:
PageLabel("Data")
- 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.
TextLabel
Syntax from Build 139.32335: TextLabel "string", "string"
Syntax: TextLabel("string", "string")
This function is used to create text description lines on the access window.
- For a single comment:
TextLabel(" Enter the feed options:")
- For a blank line:
TextLabel()
- To insert a text label with a blank line before the label, specify a comma before the label:
TextLabel(, " Water Flows In")
- You can specify multiple lines with comma (,) separator:
("" ," ======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.
Labels Example
This code will show the following Access Window view: