Variable values from applications are accessed via the complete alias of process variables. This identifier contains the channel name, the alias of the process variable and, if applicable, the resolution of field and/or structure elements.
Variable adapters decouple this connection by introducing an additional alias. Variable adapters also contain a configurable switchover. Several process variable definitions defined in the communication channels can be assigned to each alias at development time. A configuration entry is used to define which variables are actually addressed via the alias during the initialisation phase of the project.
Variable adapters are used to solve the following problems:
Until now, both problems could lead to the same visualisation having to be maintained for different control systems using several projects in parallel.
The example shows how to create an application if, as an alternative to an S7 connection (via a VisiWin driver), an Allen-Bradley controller (via an OPC server) is to be connected to the application. The connection via the driver is additionally optimised by structures.


The connection of a control element ( VariableName property) to the Temperature value of an S7 controller then has the name Ch1.DB3<.Temperature>.

The connection of a control element to the Temperature value of the Allen-Bradley controller then has the variable name Ch1.Temperature. The property values of VariableName to be used in the application are therefore not compatible for the two controls. The ItemID also has a different content. The attempt to change the alias of the Allen-Bradley process variable to DB3<.Temperature> is acknowledged by an error at the latest when the project is started. The runtime system fails to resolve the structure (indicated by angle brackets). The project engineer is therefore faced with the problem of duplicating the project and updating all future changes in two projects.
Carry out the following steps to define the variable adapter with the necessary channel information in the project:
The adapter created in this way defines a switchover of variables from two different controllers. The properties also offer the option of deactivating one or more channels for each switching state. The communication channels selected here are then no longer addressed by the runtime system if the corresponding configuration has been selected.
Carry out the following steps to insert the required variables into the adapter and define an assignment of the variables from the different channels:
Finally, it must be clarified how the adapter is configured in order to switch between the Standard and AB states.
Carry out the following steps to configure the active switching state:
The runtime system handles the information configured here in the following steps: