Values, properties and variables can be accessed in code using [ ], such as in the Debug/CLI Window, in Event Code or serial data from the controller for examples.
Values of the following can be returned to the code:
•Properties of interfaces and controls
•Values of interfaces and controls
•Created variables
•Constants such as colors, [RED]
•Intrinsic values such as the current time, [systemTime]
•Dialog Values for user interaction
The Debug/CLI is a great method of accessing properties and values and testing. Typing an open bracket ([) will show all available properties, variables and values accessible along with the controls. By typing in [controlName. all available properties and values for that control will be listed. The Debug/CLI allows auto-completion and by typing sufficient letters and hitting CTRL-Space it will auto-complete with the first in the list. The list choice may also be double-clicked. The Code Editor provides similar operations.
Main Examples
Typing [ will update the list with available values to access by scrolling down to the Main Properties. Typing letters of one will filter down the list. The current values are shown to the right. Use the Interface Editor to edit properties if desired. They may also be changed using it as an instruction: !title=My Interface
The following images show examples of the different sections of listing (types letters of one to filter the list):
Variables and Controls created Main Values Main Properties
To access any property, values, or variable, enclose in [ ], such a printing to the value of it to the Debug/CLI Window:
? [title]
Control Examples
Typing [controlName. for an available control will update the list with available options for the control. Typing letters of a choice will filter down the list. For example, typing [met0. will show the listing for available values and properties for the meter 0.
To access a property or value:
? [met0.minAlarm]
Dialog Values
Dialog values for main are a special case in that they will prompt the user for input and return that value. Processing is halted until the user completes the response.
Please see Dialog Windows for more information.
|