Data types
Basic data types according to IEC61131
For the reading and writing of data, the data type of the OPC UA Node must be assigned to the TwinCAT data type (mapping). The assignment of basic data types is described in the standardized information model "PLCopen OPC UA Information Model for IEC 61131-3" and is listed below. You can apply this mapping both to the PLCopen function blocks and to the TwinCAT OPC UA I/O Client.
PLC data type | OPC UA data type |
|---|---|
BOOL | Boolean |
SINT | SByte |
USINT | Byte |
INT | Int16 |
DINT | Int32 |
STRING | String |
BYTE | USint |
REAL | Float |
LREAL | Double |
UINT | UInt16 |
UDINT | UInt32 |
LINT | Int64 |
ULINT | UInt64 |
DT | DateTime |
TIME | Int64 |
LTIME | Int64 |