Add a external button to real time adjust robot trajectory during moving. How do I do

Hi everyone,

I would like to real time adjusting the end position during a programmed motion.
As a example, while robot arm is moving from waypoint A to B, I could add 5mm on Y+ direction for waypoint B, which result in a changing of trajectory.
It seems like it is impossible to to adjust it with teach pendent while it is moving.
Can I apply some external button at digital input to real control it? Any better ways to implement it?

Thanks a lot!

Hi zongyao.chen

try to look into path_offset script function which allow you to live offset a path.
There is a advanced aplication of it in this arcticle, but your situation should be bit simpler.
https://www.universal-robots.com/articles/ur/programming/modify-robot-trajectory-by-overlaying-custom-motion/

and then you can simply use a analog input as your input to the path offset function.

2 Likes

Has your endpoint (B) a fixed (5mm) or variable offset? I understand it’s fixed and activated with a digital input.
If so you could just teach the two variable points (A and B) and program a simple IF function with permanent expression evaluation:

If Dinput=0 then move to A else move to B
or
If Dinput=1 then move to B else move to A (which gives the same ^^)

But don’t forget to check the box “check expression continuously” (or something like this, I have the French interface so I don’t know the exact terms in English).