Universal Robots Forum

Detect program running in URCaps

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?

Were you able to solve this issue. I would like the same information for my URCaps project.


Yes! I ended up having my URCap read the secondary socket at port 30002 and decoding all the Robot Mode Data. As my original need was only to detect if the robot was running or not this seemed overkill.

However, I have now have learned quite a lot and created a nice interface for reading/writing robot data and commands in a URCap. Can read or control just about anything on the robot at this point. I may make this available at a later time as a developer tool. It was definitely a PITA to figure this out from scratch.

Decoding the data in this spreadsheet was a challenge. NOTE: Keep reading data from the secondary until you get the RobotModeData! There is a lot more undocumented stuff read on this port you have to skip past.

This example helped a lot for senidng data to the secondary port: Can urcap send and execute ur script within the program node?

In hindsight…Skip all that and just use the dashboard server! Not sure how I missed that in the beginning. :frowning:


Send “running” and you should receive a single line response back “Program running: True” OR “Program running: False”


Thanks for letting me vent.

1 Like

Thanks rculhane! That is a great help. I like the idea of using the dashboard. I can control the request and response timing, as well as not using the cpu cycles to parse through a bunch of information that is not needed.

Thanks again for answering my request!

Just so you know, I haven’t tried dashboard server from within a URCap Java code. I believe the Dashboard server is meant normally for external control from a PC or the like. I assume it’s possible but correct me if I’m wrong.

good luck!