Is there a way to remotely change IO while the robot is running?

hi.
I’m trying to change the robot’s control box IO in a C# program.
This should be possible even while the robot is running.

I tried using the urscript execution function of the client interface.
ex) set_digital_out(1,True)

This changed the IO, but the robot stopped.

Are there any other functions that can change IO while the robot is running?

You can set the URScript command to run as Secondary instead of primary, which will prevent the program execution from stopping. I haven’t worked in C#, I’ve only done CAP development via Java, but there is an API provided by UR for accessing the digital/configurable outputs from there.