Map Application Variables to an OPC UA Variable Directly
An already created variable in the OPC UA model is linked to an application variable. The data types of the application variable and the OPC UA variable must be compatible.
- To do this, drag and drop the variable from the symbol configuration into the “Mapping” area next to the respective OPC UA variable.
- The application variable is displayed in the “Mapping” area next to the information model variable.

The data types must match for the mapping. The check for matching of the data types is done according to Overview and mapping of OPC UA and CODESYS data types.
Note
Note about mapping enumeration types (ENUM) and structure definitions (STRUCTS)!
Variables in the symbol configuration that are of the “ENUM” or “STRUCT” data type cannot be mapped directly to a variable in the OPC UA information model. Variables of these data types can, however, be dragged and dropped into the “Mapping” area next to an object of the information model (see Create OPC UA Variables Automatically). The OPC UA Mapping Editor then creates a new variable in the OPC UA information model. Furthermore (if the “ENUM” or “STRUCT” data type is used for the first time), a corresponding OPC UA data type is created and assigned to the new variable.