Variables

Variables

A variable is an element that represents a figure or a characteristic of an object and specifies the value of that characteristic.

Overview

Each variable:
  • Contains a DataType attribute
  • Can be structured to contain other variables
  • Contains descriptive attributes
  • Cannot contain objects
TIP: You cannot remove properties from predefined objects. For example, you cannot remove the
Text
property from a
Label
object.

Variable values

You can set the value of a variable by specifying:
  • A fixed value
  • An inherited value from the variable type or object type definition
  • A dynamic link that sets the value of a variable based on the value of another variable
    TIP: To use and display values from a field device or a controller, you must import the tags and variables into the project and synchronize them. Variables imported from a field device or controller are tagged with the communication protocol type used to transfer the value. For more information, see Communication drivers.

Variable examples

For example, a variable can represent:
The speed of a physical object
The
Speed
variable with a numeric (Int32) value defines the speed of the Motor object.
A style characteristic of a graphic object
The
Text color
variable defines the color of the Label object.
Various object properties
A dynamic link to the
EmbeddedDatabase1
object defines the Store variable value.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.