Mapping of primitive IEC types
The following tables show how IEC types are represented as OPC UA types according to the PLCopen Companion Specification.
|
IEC Data type |
OPC UA Data type |
PLCopen Companion Specification Data type |
Comment |
|---|---|---|---|
|
BOOL |
Boolean |
– |
|
|
SINT |
SByte |
– |
|
|
USINT |
Byte |
– |
|
|
INT |
Int16 |
– |
|
|
UINT |
UInt16 |
– |
|
|
DINT |
Int32 |
– |
|
|
UDINT |
UInt32 |
– |
|
|
LINT |
Int64 |
– |
|
|
ULINT |
UInt64 |
– |
|
|
BYTE |
Byte |
BYTE |
|
|
WORD |
UInt16 |
WORD |
|
|
DWORD |
UInt32 |
DWORD |
|
|
LWORD |
UInt64 |
LWORD |
|
|
REAL |
Float |
– |
|
|
LREAL |
Double |
– |
|
|
STRING |
String |
STRING |
|
|
CHAR |
Byte |
CHAR |
|
|
WSTRING |
String |
– |
|
|
WCHAR |
UInt16 |
WCHAR |
|
|
DATE_AND_TIME |
DateTime |
DT |
|
|
DATE |
DateTime |
DATE |
|
|
TIME_OF_DAY |
UInt32 |
TOD |
|
|
TIME |
Int64 |
TIME |
|
|
LDATE |
Int64 |
LDATE |
Not supported |
|
LTIME |
Int64 |
LTIME |
|
|
LTOD |
Int64 |
LTOD |
Not supported |
|
LDT |
Int64 |
LDT |
Not supported |
To give the user a clearer representation of the data types, new OPC UA data types have been added to the PLC Open specification. These are each derived from the original OPC UA data type and only serve for a better overview.