Data types

The IEC 61131-3 data types are mapped to OPC UA data types in accordance with the PLCopen mapping specification. The following table shows the specified mapping.

PLC

OPC UA

BOOL

Boolean

SINT

SByte

INT

Int16

DINT

Int32

LINT

Int64

USINT

Byte

UINT

UInt16

UDINT

UInt32

ULINT

UInt64

REAL

Float

LREAL

Double

TIME

Int64

LTIME

Int64

Data types 1:

TIME/LTIME

For the TIME and LTIME data types, there are special features to observe with regard to mapping between PLC and OPC UA data types, see the following section.

TIME and LTIME

In the PLCopen mapping of IEC 61131-3, both TIME and LTIME are mapped to the Int64 data type. The data areas of the IEC61131-3 data types UDINT and ULINT, on the other hand, correspond to UInt32 and UInt64.

Data type

Lower limit

Upper limit

Mapping in time

TIME (UDINT)

0

4294967295

49d17h2m47s295ms

LTIME (ULINT)

0

18446744073709551615

213503d23h34m33s709ms551us615ns

Int64

-9223372036854775808

9223372036854775807

-

The behavior of the server when handling these two data types is explained in the following list:

TIME

LTIME