Getting the timestamp in the robot program?

Hello Everyone,

I have looked in the documentation and on this forum, but I haven’t found a definitive answer to a problem I’m tackling.
I would like to be able to track the robots cycle time and the operator cycle times, this is easily established with the new timer function in the e-series. However I would also like to track the time that the robot is paused for troubleshooting or when the program is stopped for whatever reason.

Apperently the modbus registers for the up time are not in use anymore and I only find topics that say use the RTDE to get this information, but it is unclear to me if I could access the RTDE using a script running in the robot program? Or if there is another way to get the current time of the robot?

Hopefully someone here can point me in the right direction or give an example of how to accomplish this.

Did you check primary and secondary interface?
The feature for getting timestamp is included primary and secondary interface other than RTDE.
But it seems to be very difficult to get it by using urscript or robot program.
If I do this thing, I use XML-RPC server(python daemon) that access to port 30001 or 30002 with socket.

If there is other way easier, I want to study.

Regards.

https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/remote-control-via-tcpip-16496/

I should note that the UR10e that I want to do this on has no network connection, so it should do this as a standalone function.

I find it weird that something like get_timestamp is not a script function to be honest.

My written thing is realized by standalone.
Because XMLRPC server is internal server within robot(127.0.0.1).

You may refer the following.

Regards.

https://forum.universal-robots.com/t/sample-getrobotdata-real-time-client-reader-urcap/1195

https://forum.universal-robots.com/t/sample-get-controller-time-in-urscript/1256

@fujikit, super the second example is exactly what I was looking for!

That Urcap adds functions to fetch the timestamp (individually adressable).

1 Like

To @jacar

I am glad to help your problem being solved.
Best regards.