Supported elementary data types
The following table shows all supported data types throughout the standards.
Note:
| PLCnext Engineer | OPC UA® | C++ | RSC | C# | MATLAB® / Simulink® |
|||
| IEC 61131‑3 | FDCML | Server / Client | PubSub | |||||
| 1 bit | BOOL | Bit, BOOL, Boolean |
Boolean | Boolean | boolean | Bool | bool | Boolean |
| 8 bit | SINT | SINT, Signed8 |
SByte | SByte | int8 | Int8 | sbyte | int8 |
| USINT | USINT, Unsigned8 |
Byte | Byte | uint8 | Uint8 | byte | uint8 | |
| BYTE | BYTE, Bitstring8, BitStringX, Octetstring1, CharASCII, CharISO8859‒1 |
|||||||
| 16 bit | INT | INT, Signed16 |
Int16 | Int16 | int16 | Int16 | short | int16 |
| UINT | UINT, Unsigned16 |
UInt16 | UInt16 | uint16 | Uint16 | ushort | uint16 | |
| WORD | WORD, Bitstring16, Octetstring2 |
|||||||
| 32 bit | DINT | DINT, Signed32 |
Int32 | Int32 | int32 | Int32 | int | int32 |
| TIME | TIME | Duration (from 2020.3) |
– | |||||
| UDINT | UDINT, Unsigned32 |
UInt32 | UInt32 | uint32 | Uint32 | uint | uint32 | |
| DWORD | DWORD, Bitstring32, Octetstring4 |
|||||||
| REAL | REAL, Float32 |
Float | Float | float32 | Real32 | float | single | |
| 64 bit | LINT | LINT, Signed64 |
Int64 | Int64 | int64 | Int64 | long | – |
| LTIME | LTIME | Duration [4] (from 2020.3) |
– | |||||
| LTIME_OF_DAY | LTIME_OF_DAY | DateTime (from 2020.3) |
– | |||||
| – | LTOD | DateTime [1] [3] (from 2020.3) |
– | |||||
| LDATE | LDATE | DateTime [1] [2] (from 2020.3) |
– | |||||
| LDATE_AND_TIME | LDATE_AND_TIME | DateTime (from 2020.3) |
– | |||||
| – | LDT | DateTime [1] (from 2020.3) |
– | |||||
| ULINT | ULINT, Unsigned64 |
UInt64 | UInt64 | uint64 | Uint64 | ulong | – | |
| LWORD |
LWORD, |
|||||||
| LREAL | LREAL, Float64 |
Double | Double | float64 | Real64 | double | double | |
| n*8 | STRING | – | String (max. 511 bytes)[7] |
– | StaticString<n> | String, Utf8String (up to firmware 2024.6) |
IecStringEX, IecString80 |
– |
| n*16 | WSTRING [6] (from PLCnext Engineer 2021.3) |
– | – | StaticWString<n> [5] (from firmware and PLCnext CLI 2021.6) |
– | IecWString, IecWString80 (from firmware 2021.6) |
– | |
Regarding DateTime variables with OPC UA® Server/Client:
- Due to the lower time resolution of the OPC UA® data type
DateTimeof 100 ns compared to the resolution of the IEC 61131‑3 data typesLDATE,LTODandLDTof 1 ns, the values that can be displayed are in the range from1677-09-21T00:12:43.1452243Zto2262-04-11T23:47:16.8547757Z.
Rounding errors of up to 99 ns occur during reading.
When writing OPC UADateTimevalues ≤1677-09-21T00:12:43.1452242Zor ≥2262-04-11T23:47:16.8547758Z, it is saturated to the corresponding values.
To indicate underflow or overflow of the value range when reading OPC UA®DateTimevalues ≥1677-09-21T00:12:43.1452242Zor ≤2262-04-11T23:47:16.8547758Z, these values are mapped to1601-01-01T00:00:00.0000000Zor to9999-01-01T23:59:59.0000000Z, respectively, - When writing, the
timepart of OPC UA®DateTimeis also converted according toLDT. To avoid that, thetimepart must be set to00:00:00.0000000.
When reading, thetimepart is also converted to OPC UA®DateTimeaccording toLDT. It may therefore deviate from00:00:00.0000000. - When writing, the
datepart of OPC UA®DateTimeis also converted according toLDT. To avoid that thedatepart must be set to1970-01-01.
When reading, thedatepart is also converted to OPC UA®DateTimeaccording toLDT. It may therefore deviate from1970-01-01. - Due to the conversion of the basic IEC 61131 data type
int64to OPC UA® data typeDouble, and the lower time resolution of the OPC UA® data typeDurationof 1 ms (compared to IEC 61131‑3 data typeLTIMEof 1 ns), the values that can be displayed are in the range from -9223372036854.775 ms to 9223372036854.775 ms. During reading, rounding errors up to 2047 ns occur increasingly towards the edges of the value range.
RegardingStringvariables: - As data types for ports, PLCnext CLI supports
StaticWStringfrom PLCnext CLI version 2021.6 on. WSTRINGis supported from PLCnext Engineer software version 2021.3; not to be confused withStaticWString<n>which is supported from firmware version 2021.6 on.-
Known issue
Known for firmware 2020.3 or newer on all supported PLCnext Control devices:
Access to long
STRINGvariables outside the application is limited to 511 bytes. This concerns reading and writing via the RSC servicesIDataAccessServiceandISubscriptionService. These services are used by OPC UA®, PLCnext Engineer HMI and the online functions of PLCnext Engineer, among others.The same applies for
WStringvariables (available from firmware 2021.6). Please note thatWStringvariables are converted toUTF8when accessed via RSC services.
• Published/reviewed: 2025-10-15 ☂ Revision 085 •