OPC UA built-in data types and their PLC counterparts
The 25 built-in types, how DateTime is encoded (100 ns ticks since 1601) and how IEC 61131-3 types map to OPC UA.
Built-in types (OPC 10000-6, table 1)
| Id | Type | Range / content |
|---|---|---|
| 1 | Boolean | true / false |
| 2 | SByte | −128 … 127 |
| 3 | Byte | 0 … 255 |
| 4 | Int16 | −32 768 … 32 767 |
| 5 | UInt16 | 0 … 65 535 |
| 6 | Int32 | −2 147 483 648 … 2 147 483 647 |
| 7 | UInt32 | 0 … 4 294 967 295 |
| 8 | Int64 | ±9.22·10¹⁸ |
| 9 | UInt64 | 0 … 1.84·10¹⁹ |
| 10 | Float | IEEE 754 single |
| 11 | Double | IEEE 754 double |
| 12 | String | Unicode text (UTF-8 on the wire) |
| 13 | DateTime | Instant in time, UTC |
| 14 | Guid | 16-byte identifier |
| 15 | ByteString | Sequence of bytes |
| 16 | XmlElement | XML fragment |
| 17 | NodeId | Node identifier |
| 18 | ExpandedNodeId | NodeId with namespace URI / server index |
| 19 | StatusCode | 32-bit status |
| 20 | QualifiedName | Namespace index + name (BrowseName) |
| 21 | LocalizedText | Locale + text (DisplayName) |
| 22 | ExtensionObject | Encoded structure (vendor/UDT types) |
| 23 | DataValue | Value + status + source/server timestamps |
| 24 | Variant | Any of the types above, scalar or array |
| 25 | DiagnosticInfo | Detailed error information |
The type ids are also the numeric NodeIds of the types in namespace 0: i=11 is Double.
DateTime encoding
A DateTime is a signed 64-bit count of 100-nanosecond intervals since 1601-01-01 00:00 UTC — the same epoch as Windows FILETIME. To convert to Unix time: unix_seconds = ticks / 10 000 000 − 11 644 473 600. Value 0 and Int64 max are special: they mean "earliest" and "latest" representable time and should be treated as invalid. Timestamps are UTC; local time is a display matter. Use the DateTime converter.
PLC types → OPC UA
| IEC 61131-3 | OPC UA |
|---|---|
| BOOL | Boolean |
| SINT / USINT / BYTE | SByte / Byte |
| INT / UINT / WORD | Int16 / UInt16 |
| DINT / UDINT / DWORD | Int32 / UInt32 |
| LINT / ULINT / LWORD | Int64 / UInt64 |
| REAL / LREAL | Float / Double |
| STRING / WSTRING | String |
| DATE_AND_TIME, DTL, LDT | DateTime (vendor-dependent) |
| STRUCT / UDT | ExtensionObject of a server-defined DataType |
Writes must use exactly the server's data type — writing an Int32 into an Int16 node returns BadTypeMismatch, even if the number fits.
Connections
Open in Knowledge Graph →Loading the map…
Sources
- OPC 10000-6 Part 6: Mappings (v1.05) — OPC Foundation
- OPC 10000-3 Part 3: Address Space Model (v1.05) — OPC Foundation
Updated 2026-10-02