Mapping of OPC UA Types to IEC Types
Mapping of base data types
OPC UA | IEC | Description |
---|---|---|
Basic types | ||
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| Simple strings are converted to IEC strings. The length of the IEC string can be changed afterwards and can be chosen without restriction. |
|
| Locatable strings are mapped to an IEC string. |
Special types:
| Mapping to the corresponding type from the OPC UA specification: Example: | These are data types from the OPC UA specification which require special handling in the PLC application. Only read access is supported. |
Inheritance | Inheritance is allowed for all OPC UA types. For example, new types can also be derived from | Note: In the case of derivations of base types, the base type is used as the basis for the mapping. As a result, the derived OPC UA type is no longer available in IEC. ![]() |
| See description | If more than one specific object type is allowed for a variable in an information model and it is up to the user of the model to select the specific type, then simply |
| See description | In addition to a data type, a variable in OPC UA can also reference a Because a variable can only ever have exactly one type in IEC, a structure is generated which:
For an OPC UA Client, this generated structure is invisible. As expected, it only sees the correct data type at the variable and the metadata as child elements. ![]() |
Mapping of object types
Tip
All declarations are declared altogether as local variables between VAR
and END_VAR
. The user can change the declarations as needed in VAR_INPUT
and VAR_OUTPUT
.
OPC UA | IEC | Description |
---|---|---|
OPC UA object types | Function blocks | |
Interfaces and add-ins | Function Block The members of the interface are members of the function block. | Example: ![]() |
Inheritance | Instead of generating multiple function blocks with "Extends", a flat hierarchy is generated. | Example: ![]() |
Folder | A separate type for each instance of a folder in an OPC UA object type The user may add the instances on his own by editing the declaration of the IEC POUs. However, function blocks have to be used which originate from an OPC UA companion. All instances of function blocks below the folder are exported. Semantic checks based on NodeSet2.xml are not possible. | Initially, a folder is set as an object type in OPC UA. However, it is not enough to generate a ![]() The user is responsible for adding appropriate elements to the folder. |
| See description (as for folder) | OPC UA defines an individual data type for folders: the |
Mapping of structured data types
OPC UA | IEC |
---|---|
Structure | DUT |
| Not currently supported |
Optional member | Not currently supported |
Inheritance | Implementation as for the object types |
Mapping of OPC UA reference types
OPC UA | Meaning in OPC UA | Mapping in IEC |
---|---|---|
| Normally only the derivations of this type are relevant. The exception is when folders are mapped directly to IEC (see Mapping of OPC UA Types to IEC Types). | |
| ||
|
| |
| Variables and objects are mapped in IEC as variables. Therefore, each The user has to apply the modeling rules in the information model editor before the IEC POUs are generated. Optional members can be selected or deselected and concrete members can be generated for placeholders. | |
| In OPC UA, properties have the character of additional meta-information for process data. They can be of static nature, for example engineering units. But they can also change when the server is running. | In IEC, this reference is handled exactly like |
For more information, see: Using OPC UA Information Models