abb robotstudio waitdi instruction

  • Hello,


    I want to program a code that depending on 2 digital inputs it can follow 2 different paths like:


    waitdi in1,1;
    path1;


    waitdi in2,1;
    path2;


    the problem i'm facing is that only one input will be set to 1 so i dont know how to program and "or" instruction using waitdi, to wait until one of the 2 inputs is set and then follow the corresponging path.


    Thanks. any advice will be appreciated.

  • fuzco is correct, that would work. Here's a slight variation on his solution;


    WHILE DInput(Input1,1) OR DInput(Input2,1) DO;
    If DInput(Input1,1) THEN
    path1;
    ElseIf DInput(Input2,1) THEN
    path2;
    ENDIF
    ENDWHILE

  • thank you both! it worked well for me.


    Now, tryint to simulate i get a repetitive error


    50024: Corner path failure

    Description
    Task: T_ROB1
    Corner path executed as stop point due to some of the following reasons:
    - Time delay.
    - Closely programmed points.
    - System requires high CPU-load.
    Program Ref. /U6_E4/main/MoveJ/23
    Actions
    - Reduce the number of instructions between consecutive move instructions.
    - Reduce speed, use wider spaced points, use /CONC option.
    - Increase ipol_prefetch_time.


    I tried to use \CONC and to change accuracy from fine to z10..z20 bu it still does not work.


    I don't know what to do. Any idea?


    Thanks!

  • mhmmm Please, try to work a little bit alone.... The robot use to calculate the next position to move "smooth" between point, ok?
    But what happen when the robot is moving, but the next position is not fixed know, but is choose by an input?
    The robot must wait to move the program pointer until the next move is know, or wait until the input arrive.
    In this case, can the robot approssimate the movement, if it must stop and wait for an input?

  • Sorry if my question is too obvious for you but i'm just getting started.
    In any case, i'm not the kind of persont that want somebody to work for me. I tried already to fix this error with RS tips but i couldn't and I'm just asking for some recommendation that maybe i missed up.
    what do you recommend to do if the robot must wait for the input anyway to follow the pointer??


    thanks in advance.

  • Not too obvious, I was pulling your leg, anyway the problem is the robot must know where it should go, when this signal arrive? If the signals arrive before the robot start the approssimatig movement you can avoid this. If you move between the two points without the wait for, have you the same error?


    Inviato dal mio GT-N7100 utilizzando Tapatalk

    Edited once, last by fuzco ().

  • Basically, you can ignore corner path failure. It doesn't really affect anything, except that the robot motion planner is no longer able to look ahead and plan the path. If it bothers you, you have the option to stop reporting Corner Path Failures. Don't remember where it is, if you're interested I can dig it up.

  • okay, i understand what you say...the problem is that the robot is stopped when corner path failure appears and it happens so frequently, it is really annoying!


    fuzco: my program must wait for the signal and then act consequently movint to one path or another
    SharplesR: please to describe how to ignore cornerpath, this will prevent robot spontaneous stop too?


    any advice, will be appreciated!


    I copy my code below to have and idea.



    MODULE U6_E4
    CONST robtarget P_Origen:=[[805.288764846,0,682.980952293],[0.190809881,0,0.981627011,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
    CONST robtarget P_Home:=[[430.355284842,-587.145146604,0],[0.086824084,0.492403877,0.852868531,-0.150383739],[-1,1,-2,1],[9E9,9E9,9E9,9E9,9E9,9E9]];
    CONST robtarget P_Inicio:=[[495.152519668,315.85585849,0],[-0.000000003,-0.34202014,0.939692622,0.000000005],[0,-2,1,1],[9E9,9E9,9E9,9E9,9E9,9E9]];
    CONST robtarget P_Case1:=[[737.784862769,-37.331431212,0],[-0.000000005,0.000000002,1,0.000000005],[-1,0,-1,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
    CONST robtarget P_Case2:=[[906.49041091,-38.502019526,25.497083013],[-0.000000005,0.000000002,1,0.000000005],[-1,0,-5,0],[9E9,9E9,9E9,9E9,9E9,9E9]];

    ! Rutina trayectoria Case1
    PROC Case1()
    MoveL\Conc,P_Case1,v1000,z10,MyTool\WObj:=Workobject_1;
    ENDPROC


    ! Rutina trayectoria Case2
    PROC Case2()
    MoveL P_Case2,v1000,z10,MyTool\WObj:=Workobject_1;


    ENDPROC

    !Rutina principal
    PROC main()

    IF (doutput(DO_Home)<>1) THEN
    MoveJ\Conc,P_Home,v1000,z10,MyTool\WObj:=Workobject_1;
    Set DO_Home;
    ENDIF

    !Esperar a que se active entrada Inicio
    WaitDI DI_Inicio,1;
    MoveL\Conc,P_Inicio,v1000,z10,MyTool\WObj:=Workobject_1;
    Reset DO_Home;
    Reset DO_FinCiclo;

    WaitUntil ((DI_Case1 = 1 ) OR (DI_Case2 = 1 ));

    !Si la trayectoria a realizer es Case1, realizarla, sino Case2
    IF (dinput (Di_Case1)=1) AND (dinput(Di_Case2)=0) THEN
    Case1;
    ELSEIF (dinput (Di_Case1)=0) AND (dinput(Di_Case2)=1) THEN
    Case2;
    ENDIF


    !Espera 3 segundos
    WaitTime 3;
    !Mover a home y setear FinCiclo y home
    MoveL P_Home,v1000,z10,MyTool\WObj:=Workobject_1;
    Set DO_Home ;
    Set DO_FinCiclo;



    ENDPROC


    ENDMODULE

  • Ok, can you check when appear this notification? When the robot enter inside the if then else or after the final movement?


    Inviato dal mio GT-N7100 utilizzando Tapatalk

  • dear all,


    no way!
    i tried adding point between path
    also with confl/off even if i need to do it with movel no movej
    i tried also singarea...


    any other advice please??


    thanks!

  • Changing z10 to fine will probably get rid of the corner path failure, but sounds like there are more issues.

    Edited once, last by Iowan ().

Advertising from our partners