Universal Robots+

How to know if the robot is finish movement

Hi All,

I have developed the URCap and asked robot to move by send to local as below code
and I would like to do the event after the robot finished the movement.
Could you please let me know how to know it.

Hi @bbambbears

It depends on what exactly you mean by “do the event”. If you would like to execute some more URScript after having sent a move command of some variety, then just send some more script in the same method, after the motion script. If you are looking to execute some java based event, then the work around is a little more complex, since java can send the script, but cannot receive information back from script.

You could monitor the program state of the robot through the RTDE or dashboard server, as sending script through the secondary client will cause the robot to enter a program running state. You can then start a java thread to poll your server of choice and wait until the program stops running, and then execute your code.

There might well be better work arounds than this, but I hope this is useful in getting you started. You will be able to find more information about implementing an RTDE or dashboard client by searching on the forum.