12.2.7.1 Duration DataType used for TimeSpanT
12.2.7.1.1 Overview

The IODD data type TimeSpanT is mapped to the OPC UA DataType Duration.

The IODD data type TimeSpanT consists of 8 bytes representing fractions of a second (seconds). See IODD Specification for more details.

The OPC UA DataType Duration consists of a Double variable representing the number of milliseconds. Fractions can be used to represent fractions of milliseconds. See OPC 10000-3 for more details.

The following rules for conversion apply. Implementers shall ensure that the time span value mappings are done as exactly as possible.

12.2.7.1.2 Conversion from IO-Link TimeSpanT to OPC UA Duration

As the range of the OPC UA Duration values is bigger than the IO-Link TimeSpanT value, the following conversion formula can be applied without restrictions:

12.2.7.1.3 Conversion from OPC UA Duration to IO-Link TimeSpanT

If the OPC UA Duration value is bigger than the maximum IO-Link TimeSpanT value () converted to milliseconds (), the IO-Link TimeSpanT value has to be the maximum value for 64-bit unsigned integer 0xFFFFFFFFFFFFFFFF.

If the OPC UA Duration value fits into this range, the following conversion formula shall be applied: