Variable types
A variable type is a model variable from which you can create instances of the variable. Variable instances can contain other specific variables.
Predefined and custom variable types
Each project contains these predefined variable types:
Custom variable types that you or the application logic create are available only in the project in which you create them.
TIP:
Changes to a variable type automatically apply to all instances of the variable. If you delete the variable type, you also delete all the subtypes of the variable type, along with the corresponding instances of the variable.
Variable
Variables contain specific data types (for example, a numeric Int32 value or a String value).
By default, every variable contains these attributes:
Attribute | Description |
---|---|
BrowseName | Name of the variable in the project. |
DataType | Data type that the variable can contain. |
Description | Description of the variable. |
DisplayName | Translatable variable name that can appear on the interface at runtime. |
NodeId | Automatically assigned unique identifier. |
Value | Value of the data. |
For example, you can create a label with a string value of
OK
and then create a dynamic link between the variable and the Text
property of a Button
object.
Analog variable
Analog variables are structured variables that represent physical characteristics and ranges.
By default, every analog variable contains these attributes:
Attribute | Property | Data type | Description |
---|---|---|---|
EngineeringUnits
TIP:
The
dynamic link window displays the EngineeringUnits variable type. See Develop a label with a localized engineering unit and Develop a gauge with a localized engineering unit. | Description | Localized text | Description of the unit of measurement. |
DisplayName | Localized text | Name of the unit of measurement. | |
UnitId | Int32 | Numeric unit of measurement. | |
EURange | Lower limit | Double | Lower limit of the range of values for the variable. |
High Limit | Double | Upper limit of the range of values for the variable. | |
Constrain | Boolean | If True: Values out of range of not accepted and the previous value is retained. If False: Values out of range are accepted. |
For example, you can create a constrained linear gauge that sources data from a constrained variable. See Develop a constrained linear gauge.
Node pointer
Node pointers references nodes in the project.
The referenced node must be of the type and class defined by these properties:
Property | Data type | Description |
---|---|---|
Kind | NodeId | Type of object or type of variable from which the node is derived |
NodeClass | NodePointerNodeClass |
|
For example,
Data logger
objects have Store
node pointer properties.
Provide Feedback