Universal Robots Forum

Getting the status of stop button

Hi all,

I need to stop the execution of my application by sending a “stop” command when the stop button is being pressed. I have been trying to read the status of the GUI stop button with the help of the following function

set_runstate_configurable_digital_output_to_value(5, 3)

however, it does not execute the my command when the stop button is being pressed. May I know if there is any way for me to send in the command before the stop button halt my entire URcap program?

Thank you!

Once your program has been told to stop, there’s nothing else you can do from within the program. You will need to monitor whether the program is running or not from outside of the program and stop your external device another way.

I know you could do this by monitoring the program state from the dashboard server and taking action within a daemon, but it may also be possible/easier within the program node in Java.

Can someone else comment on this second approach?

We use RTE port 30003 to monitor the status of the program, it’s being streamed at 125hz so there is no polling required. You just need to be able to read the streaming data.

E.g. the “getRobotData” sample reads this data on the RTE interface @mbush describe.
However be cautious by placing the real-time capable components directly in Java, e.g. in an installation or program node as these processes are on the same thread as the remaining GUI.
Hence, they might impact GUI performance. An external daemon would be preferable.

Hi mbush,

Thank you for the great tip, definitely pointed me to the correct direction.

1 Like

Hi Jacob,

I would prefer my process to be from an external daemon too as I am using XML-RPC for my application. However, is it possible to run 2 different address for daemon? If so, how should I proceed?

Thanks.