[SOLVED]How the Skip Condition works?

  • Hi!
    So I think I missed something in the manual, because I don't understand whats happening or why :uglyhammer2:
    R-J3 v5.11
    The situation is, I want the robot to skip a position if there was an error before.We hardwired a DI to the UO fault output.So when there is a fault DI12 turns on, what triggers a macro like this:


    Wait DI[12]=ON
    R[1]=1


    Than In the main program I set it up like this:


    Skip condition R[1]=1
    L P[1] 200mm/s Fine Skip LBL [999]
    L P[2] 200mm/s Fine Skip LBL [999]


    .
    .
    .
    .
    LBL [999]
    R1=0
    Go home or whatever...


    But no matter what I do it's always skips to label 999 even if Register 1 =0...even tryed to test it with an input like


    Skip condition RI[1]=ON
    etc...etc
    But skips again, even if RI1 never turns on!
    What I'm missing guys?

    Edited once, last by moln4r ().

  • L P[1] 100mm/sec FINE
    SKIP CONDITION DI[1] = ON
    L P[2] 100mm/sec FINE Skip, LBL 1
    L [P3] 100mm/sec FINE
    LBL [1]
    L P[4] 100mm/sec FINE



    Here is an example of the correct way it is done.
    Maybe this will help.


    If the skip condition IS satisfied the motion is terminated and the next program instruction is executed.


    Your program, if R[1] becomes ON while moving to P[2] it will then go to P[3].


    You have all scenarios going to LBL 999.



    Try:


    Skip condition R[1]=1
    L P[1] 200mm/s Fine Skip LBL [888]
    JMP LBL [999]
    LBL [888]
    L P[2] 200mm/s Fine Skip LBL [777]
    JPM LBL [999]
    LBL [777]
    .
    .
    .
    .
    LBL [999]
    R1=0
    Go home or whatever...

    Edited once, last by stare284 ().


  • This way it works!Thank you so much!


    So...
    The robot moves to the point, than jumps to the desired label if the condition NOT met, but NOT moves to the point and skips the LINE IF the condition met.wow :toothy9:

    Edited once, last by moln4r ().

  • I have a question how can I skip condition without rigesting search point I want to say that I just want to request the robot to go down and if he or the sensors are active then he makes the skip condition

    thanks

  • You can't, the robot will have to have a target to move to.

    But if you want to go down from a random position, just LPOS your startposition to a positionregister, change that and go down to that position.


    Like this :


    J P[20] 100% FINE

    PR[1] = LPOS

    PR[1,3] = PR[1,3] - 500

    SKIP CONDITION DI[1] = ON

    L PR[1] 200mm/sec FINE SKIP,LBL1


    There is something else, the skip instruction does not work the way you describe.


    When the robot moves to PR[1] it will only skip when it reaches that position !

    So when the sensor DI[1] goes ON it will execute the next line of the program.

Advertising from our partners