# How to find out if the program is running or not

**URL:** <https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210>\
**Category:** Robot Communication\
**Created:** [May 1, 2019, 11:28am UTC](https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210 "2019-05-01T11:28:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gomathisankar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/gomathisankar/32/607_2.png) [@gomathisankar](https://forum.universal-robots.com/u/gomathisankar)\
**Post date:** [May 1, 2019, 11:28am UTC](https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210/1 "2019-05-01T11:28:18Z")

</div>

Hi,

cobot is in running state whether it is executing a program or not.

Is it possible to find out if the program is running or not?

Thanks,  
Sankar

---

<div class="post-metadata">

**Author:** ![inu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/inu/32/732_2.png) [@inu](https://forum.universal-robots.com/u/inu)\
**Post date:** [May 1, 2019, 2:29pm UTC](https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210/2 "2019-05-01T14:29:15Z")

</div>

There a a few ways to achieve this. Check out these threads:

> [@Detect program running in URCaps](https://forum.universal-robots.com/t/detect-program-running-in-urcaps/2134):
>
> I would like to detect if a program is running in URCaps to lock out user controls and properly update URCaps display status in my URCap. Any way to do this?

> [@RTDE - Read Robot State and Safety State](https://forum.universal-robots.com/t/rtde-read-robot-state-and-safety-state/1634/2):
>
> Update: A bit of an ugly solution but I created a couple of java classes and tied the external device execution while loop into discrete calls to the Dashboard server that loop in the execution program and it appears to work well. So question withdrawn, thanks for taking a look. Jerry

I’d recommend using the RTDE interface, but you are not limited to solely this method.

---

<div class="post-metadata">

**Author:** ![anon24511591](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@anon24511591](https://forum.universal-robots.com/u/anon24511591)\
**Post date:** [February 6, 2023, 4:29pm UTC](https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210/3 "2023-02-06T16:29:10Z")

</div>

I’m going to use the secondary client interface (I don’t need 500Hz updates) but I find it hard to believe that there is no api to check the robot status without using this kind of hack.  
Is it true that there is no api to do it?

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [February 6, 2023, 8:03pm UTC](https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210/4 "2023-02-06T20:03:10Z")

</div>

You could set an digital output/output boolean to “High When Not Running” in the installation tab and look at that, assuming you’re using some sort of external device like a PLC to look for it.

---

<div class="post-metadata">

**Author:** ![anon24511591](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@anon24511591](https://forum.universal-robots.com/u/anon24511591)\
**Post date:** [February 6, 2023, 11:35pm UTC](https://forum.universal-robots.com/t/how-to-find-out-if-the-program-is-running-or-not/4210/5 "2023-02-06T23:35:34Z")

</div>

No, I need it in an urcap (just like the first link).

Edit: re-reading the first link I see that I can use the dashboard server (which I’m already using for other things not provided by the api) 🤦‍♂️
