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

**URL:** <https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373>\
**Category:** Java\
**Created:** [August 5, 2020, 3:34pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373 "2020-08-05T15:34:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernd.heinzmann](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bernd.heinzmann](https://forum.universal-robots.com/u/bernd.heinzmann)\
**Post date:** [August 5, 2020, 3:34pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/1 "2020-08-05T15:34:52Z")

</div>

With RTDE ([RTDE runtime\_state enumeration - #2 by fujikit](https://forum.universal-robots.com/t/rtde-runtime-state-enumeration/6634/2)) 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 ?

---

<div class="post-metadata">

**Author:** ![anon6991142](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon6991142](https://forum.universal-robots.com/u/anon6991142)\
**Post date:** [August 5, 2020, 3:57pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/2 "2020-08-05T15:57:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![roman.reiner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/roman.reiner/32/1294_2.png) [@roman.reiner](https://forum.universal-robots.com/u/roman.reiner)\
**Post date:** [August 6, 2020, 1:43pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/3 "2020-08-06T13:43:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bernd.heinzmann](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bernd.heinzmann](https://forum.universal-robots.com/u/bernd.heinzmann)\
**Post date:** [August 25, 2020, 10:15am UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/4 "2020-08-25T10:15:01Z")

</div>

> [@bernd.heinzmann](#):
>
> Freedrive

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

---

<div class="post-metadata">

**Author:** ![moliveira](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@moliveira](https://forum.universal-robots.com/u/moliveira)\
**Post date:** [October 5, 2020, 1:41pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/5 "2020-10-05T13:41:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![baptiste.veron](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/baptiste.veron/32/1030_2.png) [@baptiste.veron](https://forum.universal-robots.com/u/baptiste.veron)\
**Post date:** [November 19, 2020, 8:32am UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/6 "2020-11-19T08:32:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![moliveira](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@moliveira](https://forum.universal-robots.com/u/moliveira)\
**Post date:** [November 19, 2020, 1:28pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/7 "2020-11-19T13:28:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![baptiste.veron](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/baptiste.veron/32/1030_2.png) [@baptiste.veron](https://forum.universal-robots.com/u/baptiste.veron)\
**Post date:** [November 19, 2020, 1:50pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/8 "2020-11-19T13:50:12Z")

</div>

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/](https://www.universal-robots.com/articles/ur/remote-control-via-tcpip/)

---

<div class="post-metadata">

**Author:** ![tulio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tulio/32/1690_2.png) [@tulio](https://forum.universal-robots.com/u/tulio)\
**Post date:** [February 17, 2021, 11:20pm UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/9 "2021-02-17T23:20:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fujikit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/fujikit/32/6042_2.png) [@fujikit](https://forum.universal-robots.com/u/fujikit)\
**Post date:** [February 18, 2021, 8:29am UTC](https://forum.universal-robots.com/t/get-robot-states-normal-e-stop-idle-freedrive/8373/10 "2021-02-18T08:29:21Z")

</div>

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.

> [@Limits of RTDE Clients](https://forum.universal-robots.com/t/limits-of-rtde-clients/5970/7):
>
> Thank you for replying. The firmware was updated to SW3.12 and I verified on URSim and Real Robot(UR3). The result is below: on URSim(SW3.12): limit is 3 on Real Robot(SW3.12) without Ethernet/IP : limit is 6 on Real Robot(SW3.12) with Ethernet/IP : limit is 5 Host Computer:192.168.2.101 Real Robot:192.168.2.11 The below image is with Ethernet/IP and it is indicated that limit is 5.
