Scripts cancelling each other

Hi!

What we are doing: we are using UR scripting language and the primary interface to remote control the robot. This means that we are sending commands to the UR like movej, movel and set_configurable_digital_out, set_standard_digital_out.

We basically have a very simple dashboard where the user can concatenate several of this commands.

We send this commands individually, since the user can run different commands conditionally. I say this because we cannot simply put all the commands into a function and send them all at once (which would solve the problem).

The problem: if you send several commands they cancel each other, not effectively running them (and not buffering them). For the move commands is not a big problem because we can read from the primary interface the isProgramRunning flag and send the next script command after it’s done. But this is not possible for setting digital i/o. The result being that set digital i/o commands are typically cancelled and do not run since we cannot wait for them.

And this makes our useful dashboard “unusable”.

Possible solutions, what is possible?

  • Is it possible to kind of buffer script commands in the UR controller so they don’t cancel each other?
  • Is it possible to read when a script command is effectively executed, other than the motion commands as I mentioned earlier?
  • I know a potential solution is adding time delays to the commands so they just wait enough to make sure they are done. But I’d say this is a very bad practice that will impact the velocity at which one can run several commands, and also time depends on the pc and the controller so it’s not a universal solution for all our customers… This is the last resort. But is it possible to solve it without this??

Thanks!!