I want to be able to move the end-effector in a direction (for example z-axis in tool frame) while some variable = 1 and it to stop once variable = 0.
One solution would be to constantly increment an offset to a point and move the robot there but then the movement won't be smooth, it will be constantly accelerating and decelerating.
So I thought about implementing a point further away, in the direction I want to move, and put the robot moving to that point and stop it when DI changes to 0. Problem is, I don't know how to interrupt the movement.
Basically, I'd want something like this:
*Robot is at (0,0,0)*
Variable "move_x" goes to 1, Robot start moving to (max_x,0,0) //max_x = maximum value in x-axis the robot can reach
When Variable "move_x" goes back to 0, the robot immediately stops where it is (and will then move to a pre-defined target or in another direction depending on another DI)