Use an If statement with the "Check continuously" box marked which turns it into a while statement basically.
Something like this
movej(variable_waypoint_2)
while not digital_in_1:
movej(variable_waypoint_2)
end
stopj()
This would move to waypoint_1 and then monitor the input during the move to waypoint_2, if at any point the digital input turned on the move would be terminated. We use this a lot with our programs for instance placing one part onto another, only move until a certain force threshold is reached and then stop. Allows us to accommodate variation in parts or pick position for instance without causing the robot to fault.
Hi pros,
we are working on a program where we would have two waypoints that are variable waypoints. We would move the robot to the first one. Then the robot would move to the second point but we would like to make the robot stop during that motion to the second point based on a Digital input signal.
How would you program that? Do you think using a thread that is checked continuously makes sense?