Skip to main content
Version: 5.3

Variable/Static plug-in

With the variable plug-in you can define any number of variables with name, type, and initial value. Of course, at runtime you can write values ​​in the variables and trigger them again. In addition, some system variables are available that you can use in your configuration.

The use of variables thus lends itself to fixed, repeatedly required values ​​that are not stored in a database or also to cache values ​​that can not or should not be stored in a database. In complex projects, variables can also be used to provide values ​​in multiple connections.

Create variable

The operation is standard:

  • Open the plug-in by double-clicking on “Variables” at the plug-in menu
  • Choose between global variables and local variables:
    • Global variables: The variable value is always identical in all connections in which it is used.
    • Local variables: The variable is declared individually in each connection. Each value assignment that has been made is only valid within the respective connection.
  • Select “Add new variable” or double-click an existing entry.
  • Make the necessary settings in the dialog:
NameName of the variable, appears in the configuration. The variable name must be unique.
StorageIf enabled, the last value of the variable is reloaded after restarting the OPC Router. If disabled, the set initial value is loaded. Every variable change is stored in the database, local variables are excluded from this.
ValidityActivate if you want to use a local variable. Local variables are only available in one connection. Other connections or the integrated OPC UA Server cannot access the value of local variables.
TypeSelect the appropriate data type. The data type is important to know the type beyond doubt, e.g. to distinguish a 1 as a number from a 1 as a byte. The data type Double is also selectable. Typeless is also possible, the variable can then be filled arbitrarily.
ValueInitial value of the variable. In connection configuration, you can read out this value and of course change it. You can also enter the value DB-NULL to output NULL values ​​in the transfer object.

4. Confirm with “OK”.

The variable is now available for configuring a connection.