Stop a Movement Instruction Half-Way Through

  • Hey there,


    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)

  • Use a Skip.
    Set a skip condition at the start of your program.

    SKIP CONDITION DI[1] = ON


    L P[1] 300 mm/s FINE SKIP CONDITION JMP LBL[1]


    LB[1]:


    When the condition is triggered, the robot stops the movement and jumps to the selected label.

  • Right, that's a better way!

    But it should look as follows:

    L P[1] 300 mm/s FINE SKIP, LBL[1]

  • Right, that's a better way!

    But it should look as follows:

    L P[1] 300 mm/s FINE SKIP, LBL[1]

    Was writing from memory and almost 100% sure I messed up the syntax somewhere. Thanks for the correction.

    I normally use this type of programming for "crash sensors" on a palletising gripper, to abort a motion if something unexpected comes up, without mulching the payload.

  • Depends of the software - in R-30iB Plus (SW: V9.10P/16), there's no option like this. I've just checked!

    It's not installed by default, but (at least in the USA) it's supposed to be available as a free option on robots that new (my lab robot is running 8.3 and has it).


    However, AIUI, you have to call Fanuc and get the PAC code to activate it with.

Advertising from our partners