Available data types throughout the standards

Bits C++ IEC 61131 FDCML MATLAB®/Simulink® OPC UA C#
1 boolean BOOL Bit/BOOL Boolean Boolean BOOL
8 int8 SINT SINT,
Signed8
int8 SByte SByte
uint8 USINT USINT,
Unsigned8
uint8 Byte Byte
BYTE BYTE,
Bitstring8,
Octetstring1
16 int16 INT INT,
Signed16
int16 Int16 Int16
uint16 UINT UINT,
Unsigned16
uint16 UInt16 UInt16
WORD WORD,
Bitstring16,
Octetstring2
32 int32 DINT DINT,
Signed32
int32 Int32 Int32
TIME TIME Duration [8]  (from 2020.3)
uint32 UDINT UDINT,
Unsigned32
uint32 UInt32 UInt32
DWORD DWORD,
Bitstring32,
Octetstring4
float32 REAL REAL,
Float32
single Float Single
64 int64 LINT LINT,
Signed64
‒  Int64 Int64
LTIME LTIME Duration [4] [8] (from 2020.3)
LTIME_OF_DAY LTIME_OF_DAY DateTime [8]  (from 2020.3)
LTOD LTOD DateTime [1] [3] [8] (from 2020.3)
LDATE LDATE DateTime [1] [2] [8] (from 2020.3)
LDATE_AND_TIME LDATE_AND_TIME DateTime [8] (from 2020.3)
LDT LDT DateTime [1] [8] (from 2020.3)
uint64 ULINT ULINT,
Unsigned64
UInt64 UInt64
LWORD

LWORD,
Bitstring64,
Octetstring8

float64 LREAL LREAL,
Float64
double Double Double
n*8 StaticString<n> STRING ‒  String (max. 511 bytes)[7] [8] IecStringEX, IecString80
n*16 StaticWString<n>  [5] 
(from 2021.6)
WSTRING [6]
(from 2021.6)
IecWString, IecWString80

  1. Due to the lower time resolution of the OPC UA data type DateTime of 100 ns compared to the resolution of the IEC 61131 data types LDATE, LTOD and LDT of 1 ns, the values that can be displayed are in the range from 1677-09-21T00:12:43.1452243Z to 2262-04-11T23:47:16.8547757Z.  Rounding errors of up to 99 ns occur during reading.
    When writing OPC UA DateTime values less than or equal to 1677-09-21T00:12:43.1452242Z or greater than or equal to 2262-04-11T23:47:16.8547758Z, it is saturated to the corresponding values.
    When reading OPC UA DateTime values equal to or greater than 1677-09-21T00:12:43.1452242Z or equal to 2262-04-11T23:47:16.8547758Z, these values are mapped to 1601-01-01T00:00:00.0000000Z or 9999-01-01T23:59:59.0000000Z, respectively, to indicate underflow or overflow of the value range.
  2. When writing, the time part of OPC UA DateTime is also converted according to LDT. To avoid this the time part must be set to 00:00:00.0000000.
    When reading, the time part is also converted to OPC UA DateTime according to LDT. It may therefore deviate from 00:00:00.0000000.
  3. When writing, the date part of OPC UA DateTime is also converted according to LDT. To avoid this the date part must be set to 1970-01-01.
    When reading, the date part is also converted to OPC UA DateTime according to LDT. It may therefore deviate from 1970-01-01.
  4. Due to the conversion of the basic IEC 61131 data type int64 to OPC UA Double and the lower time resolution of the OPC UA data type Duration of 1 ms, compared to IEC 61131 LTIME of 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 edge of the value range.
  5. PLCnext CLI will support StaticWString<n> as data types for ports from PLCnext CLI version 2021.6 .
  6. WSTRING is supported from PLCnext Engineer version 2021.3, StaticWString<n> from firmware version 2021.6.
  7. Access to long String variables (from firmware 2020.3) and WString variables (from firmware 2021.6) from outside the application is limited to 511 bytes. This is because the OPC UA server/client uses RSC services (see Known Issue). 
  8. The data types Duration, DateTime and String are not supported by the PLCnext Technology implementation of the OPC UA PubSub feature (they are only supported by the OPC UA Server).

 

 

 


•  Web browser recommendation: Chrome/Edge 88 or newer, Firefox ESR 90 or neweror Safari • 
• Published/reviewed: 2022-09-14 • Revision 046 •