How to convert timestamp in Robot Mode Data from the realtime interface


when i read the 8 bytes in as long
i get these values below when trying to convert them from epoch time to realtime

22168000 = 09/14/1970 @ 1:46pm (UTC) starttime
27696000 = 11/17/1970 @ 1:20pm (UTC) endtime

the times are months apart which should be only seconds, when i took the timestamps.

so the question is how do i use the values?

The timestamp value sent over the Client interface is similar to the timestamp in RTDE.
It is the time elapsed since the controller (software process) was started, not the “world time”.
Hence, you cannot convert this to day/month/year etc.

1 Like

Explains alot, I guess its microseconds 22168000/1000000 = 22.16 sec ?

While the RTDE (30004) and real time client (30003) return the timestamp in nice, easy to understand fractional seconds since power up, the timestamp values from the secondary client (30002) are in number of time slices (8ms) when connected to a physical robot. When connected to a simulated robot the timestamp value is in number of microseconds (1us) since power up.

So with your example:

Physical robot:
22168000*8ms = 49h:15m:44.00s
27696000*8ms = 61h:32m:48.00s

Simulated robot:
22168000*1us = 00h:00m:22.16s
27696000*1us = 00h:00m:27.69s

Sounds like you were doing this on a simulated robot…

1 Like

Where is this documented?