# Programming running state

**URL:** <https://forum.universal-robots.com/t/programming-running-state/5799>\
**Category:** URCap Development\
**Created:** [December 11, 2019, 12:07am UTC](https://forum.universal-robots.com/t/programming-running-state/5799 "2019-12-11T00:07:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon34428461](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@anon34428461](https://forum.universal-robots.com/u/anon34428461)\
**Post date:** [December 11, 2019, 12:07am UTC](https://forum.universal-robots.com/t/programming-running-state/5799/1 "2019-12-11T00:07:15Z")

</div>

Hello,

How can I get program running and stop state into URCap?  
Someone please help me on this.

Thanks

---

<div class="post-metadata">

**Author:** ![m.nagel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.nagel/32/2326_2.png) [@m.nagel](https://forum.universal-robots.com/u/m.nagel)\
**Post date:** [December 11, 2019, 8:44am UTC](https://forum.universal-robots.com/t/programming-running-state/5799/2 "2019-12-11T08:44:17Z")

</div>

you can get the program state via Real-time Interface (30003)  
jbm provided an example (prgstate): [URCap Sample: getRobotData Real Time Client reader URCap](https://forum.universal-robots.com/t/sample-getrobotdata-real-time-client-reader-urcap/1195)

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

alternative via RTDE output: runtime\_state  
[https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/](https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/)

---

<div class="post-metadata">

**Author:** ![anon34428461](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@anon34428461](https://forum.universal-robots.com/u/anon34428461)\
**Post date:** [December 11, 2019, 3:52pm UTC](https://forum.universal-robots.com/t/programming-running-state/5799/3 "2019-12-11T15:52:48Z")

</div>

Thanks @m.nagel. Its working now. 🙂

Can you help me on this as well [How to add Parent Node when child insert](https://forum.universal-robots.com/t/how-to-add-parent-node-when-child-insert/5798)

really appreciate.

---

<div class="post-metadata">

**Author:** ![m.nagel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.nagel/32/2326_2.png) [@m.nagel](https://forum.universal-robots.com/u/m.nagel)\
**Post date:** [December 11, 2019, 7:22pm UTC](https://forum.universal-robots.com/t/programming-running-state/5799/4 "2019-12-11T19:22:57Z")

</div>

fine, you´re welcome.

edit: copy to corret thread …

_jbm did many good examples creating urcaps, I think there are some about ProgramNodes - did you check them?_

_I would try:_  
_a) first click “myNode”_  
_insert ParentNode and add child “myNode”_

\*b) second click “myNode” \*  
_check: parentNode is available in tree and/or parentNode is selected =\> insert second entry “myNode” or new parentNode with child: myNode_

_Currently I am not sure if functions like “is selected” and “request complete tree” are available but this would be my my first approach (API: com.ur.urcap.api.domain.program._)\*

_Maybe someone of the UR-Team could give us a short answer. possible: yes/no 🙂_

\*regards \*  
_mike_
