Structures

The OPC UA I/O Client supports read/write procedures with structured data types (StructuredTypes). You can also add StructuredTypes to the process image like any other variable. When adding a StructuredType to the process image, the type to be parsed is added to the TwinCAT type system so that, for example, it can simply be used by a PLC application.

Example: StructuredType on the server

Structures 1:

In this example the server contains a node of the structured data type "Person", which contains various member variables (Name, Height, Weight, Gender).

Example: StructuredTypes in the process image

Structures 2:

After you have added a node to the process image, the process image contains the node and also the structural information of the type, e.g. whether individual member variables of the node should be read or written.

StructuredTypes in the TwinCAT type system

The data type is added to the type system of TwinCAT. The "Value" tree items then have this data type.

Structures 3:

You can also view the data type in the TwinCAT type system under SYSTEM > Type System.

Structures 4:

To distinguish the data type from other data types you can add a prefix in the settings of the OPC UA Client.

Structures 5:

Mapping a StructuredType

Since every StructuredType is added to the TwinCAT type system, the mapping of the variables is simple. Create an input/output variable of this data type and subsequently a mapping.

Structures 6:
Structures 7:
Structures 8: