Skip to main content
Version: 5.6

Variables Plug-in

Using the Variables plug-in, you can define any number of variables with a name, type, and initial value. At runtime, you can, of course, assign values to the variables and retrieve them. In addition, several system variables are available for use in your project configuration.

Variables are therefore ideal for fixed values that are needed repeatedly but are not stored in a database, or for temporarily storing values that cannot or should not be stored in a database. In complex projects, variables can also be used to make values available across multiple flows.

Variables

The standard procedure is as follows:

  • Open the plug-in from the “Advanced” category under the “Plug-ins” menu by double-clicking “Variables”
  • Choose between global and local variables:
    • Global variables: The variable’s value is always the same across all flows in which it is used.
    • Local variables: The variable is declared individually in each flow. Each value assignment applies only within that specific flow.
  • Select “Add” or double-click an existing entry.
  • Configure the necessary settings in the dialog:
PropertyDescription
NameName of the variable; appears in the project configuration. The variable name must be unique.
PersistenceIf enabled, the variable’s last value is reloaded after the OPC router restarts. If disabled, the set initial value is loaded. Every variable change is saved to the database; local variables are excluded from this.
ScopeCheck this box to generate a local variable. The values of local variables are only available in the flows in which they are used.
TypeSelect the appropriate data type so that the value can be interpreted unambiguously—for example, to distinguish between a 1 as a number and a 1 as a Boolean value. “Untyped” is also an option; in this case, the variable can be assigned any value.
ValueInitial value of the variable. In flow configuration, you can read this value and, of course, change it. You can also enter the value DB-NULL to output NULL values in the transfer object.
  • Confirm by clicking “OK.”

The variable is now available for configuring a flow.