# Access running state from URCap / Disable user input

**URL:** <https://forum.universal-robots.com/t/access-running-state-from-urcap-disable-user-input/5359>\
**Category:** URCap Development\
**Tags:** dashboard\
**Created:** [October 17, 2019, 5:51pm UTC](https://forum.universal-robots.com/t/access-running-state-from-urcap-disable-user-input/5359 "2019-10-17T17:51:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon81148154](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon81148154](https://forum.universal-robots.com/u/anon81148154)\
**Post date:** [October 17, 2019, 5:51pm UTC](https://forum.universal-robots.com/t/access-running-state-from-urcap-disable-user-input/5359/1 "2019-10-17T17:51:44Z")

</div>

Is there an APi to determine whether the Robot is executing a program or stopped ? I would like to disable user input fields in the URCap if the program is running.

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [October 18, 2019, 7:03am UTC](https://forum.universal-robots.com/t/access-running-state-from-urcap-disable-user-input/5359/2 "2019-10-18T07:03:05Z")

</div>

You can read the program runstate from a number of different interfaces;  
RTDE, Dashboard Server, Primary Clients etc. all expose a “program state” byte or similar.

**However** ,  
My recommendation is not to do this. While it is a neat service to the user, if the user wants to edit a field, they can do that.  
If this is really required, it should only be done while the view is opened (between openView and closeView).  
The program will automatically stop, if you edit the DataModel as a result of the user editing a field.

---

<div class="post-metadata">

**Author:** ![anon81148154](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon81148154](https://forum.universal-robots.com/u/anon81148154)\
**Post date:** [October 18, 2019, 11:49am UTC](https://forum.universal-robots.com/t/access-running-state-from-urcap-disable-user-input/5359/3 "2019-10-18T11:49:45Z")

</div>

Thanks for your clarifications on the implications of editing a node’s DataModel vis-à-vis the running state of a program.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/system/32/1_2.png) [@system](https://forum.universal-robots.com/u/system)\
**Post date:** [January 27, 2021, 2:35am UTC](https://forum.universal-robots.com/t/access-running-state-from-urcap-disable-user-input/5359/4 "2021-01-27T02:35:39Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
