How can I address a Siemens S7 DATE_AND_TIME OPC Tag

Hi,

the user manual gives information of addressing to S7 items like DInt, Word, Byte… by the OPC-Path “[device_name]address”.

We can address the DataTypes given in the user manuel, but we want to address a S7 DATE_AND_TIME DataType.
Which Synthax do we need to use to address a S7 DATE_AND_TIME DataType in one of our DataBlocks?

At the moment we tried “[device_name]DBn,B12.6” because the DATA_AND_TIME DataType has 6 Bytes, but this did not work.

Thanks.

It looks like we have a long-standing feature request to add DT and DOT datatypes to the driver… :frowning:

See the work-around in this thread for now: inductiveautomation.com/forum/v … =72&t=8899

S7 Date_And_Time type has 8 bytes. Each byte represents year, month, day, hours, minutes, seconds, and milliseconds (two bytes) in BCD format. More details are here.

The solution is described in this thread.