Universal Robots Forum

Accessing robot running state from URCap

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.

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.

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