Get Robot States Normal/E-Stop/Idle/Freedrive/

With RTDE (RTDE runtime_state enumeration - #2 by fujikit) you can read robot states
Stopping : 0, Stopped : 1, Playing : 2, Pausing : 3, Paused : 4, Resuming : 5

But how is it possible to read in robot states “Normal/E-Stop/Idle/Freedrive” with Java Swing ?

Dashboard.

“robotmode” answears:
NO_CONTROLLER
DISCONNECTED
CONFIRM_SAFETY
BOOTING
POWER_OFF
POWER_ON
IDLE
BACKDRIVE
RUNNING

and “safetymode” answears:
NORMAL
REDUCED
PROTECTIVE_STOP
RECOVERY
SAFEGUARD_STOP
SYSTEM_EMERGENCY_STOP
ROBOT_EMERGENCY_STOP
VIOLATION
FAULT

To touch on this, you can create a socket communication within the java side to communicate to the dashboard server to get the robot status…etc.

And how can I detect robot state “Freedrive”-Mode is running?

Port 30003
receive (1116)
unpack
make an int
shift by 2 (>>2)
if the value %2 is not 0:
freedrive

1 Like

As the RealTime Interface is deprecated, is there any other a way to access the freedrive state ?
I didn’t find how to get it through RTDE.

Where did you see that the RealTime Interface was getting deprecated?

The code I gave, should work on any of the ports, just check on the documentation for the shift and address.

Thanks.

About the RealTime Interface getting deprecated, on the index of the excel file Client_Interface_V3.13andV5.8.xlsx (see the following link, at the bottom of the page), you can read :
“The RealTime interface has been deprecated since version 3.5. It is recommended to use the RTDE Interface, instead”

https://www.universal-robots.com/articles/ur/remote-control-via-tcpip/

What if the RTDE is already using one receipe and I want to access other data. How to handle it?
By the way in the RealTime Interface there are somo different data that we can not access via RTDE.

Hi.

Some RTDE clients are created when I do waht you want to do.
It is possible to launch up to 6 RTDE clients.

Please see the below.