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.
Variable with a string value
Dynamic link between the Text property of a button and the string variable

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 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.
Constrained analog variable
Constrained linear gauge that sources data from the analog variable (runtime)

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
  • Instance
    . The node can be only an instance
  • Type
    . The node can be only a typ
  • Any
    . The node can be an instance or a type
For example,
Data logger
objects have
Store
node pointer properties.
Node pointer that targets database objects
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.