Interrupt setting

  • hi,
    I wrote an interrupt routine when error occur this interrupt execute.
    for example when collision occur but in this time robot will continue the last position
    and after that it will go to interrupt routine while we expect at first time interrupt routine execute.
    Is there any setting for interrupt? :help:
    I use IRC5 with IRB 1410


    Many thanks

  • PROC Path_10()


    ConfL\off;
    CONNECT err_interrupt WITH trap_err;
    IError COMMON_ERR, TYPE_ALL, err_interrupt;
    MoveJ Target_10, v1000, fine, tool0\WObj:=wobj0;
    PathRecStart safe_id;
    MoveL Target_20, v1000, fine, tool0\WObj:=wobj0;
    MoveL Target_30,v1000, fine, tool0\WObj:=wobj0;!! for example during this line we have a collision.after start*
    MoveL Target_40, v1000, fine, tool0\WObj:=wobj0; !*robot will continue Target_30 and after that**
    MoveL Target_50, v1000, fine, tool0\WObj:=wobj0; !**interrupt routine will execute while we expect at first
    MoveL Target_60, v1000, fine, tool0\WObj:=wobj0; !time interrupt routine execute
    IDelete err_interrupt;
    ENDPROC

    TRAP trap_err
    TPReadFK choice,"Go to safe?",stEmpty,stEmpty,stEmpty,stEmpty,"Yes";
    IF choice=5 THEN
    IF PathRecValidBwd(\ID:=safe_id) THEN
    StorePath;
    PathRecMoveBwd \ID:=safe_id \ToolOffs:=[0, 0 , 10];
    !Fix problem
    PathRecMoveFwd;
    RestoPath;
    StartMove;
    ENDIF
    ENDIF
    ENDTRAP

  • Have you tried using your logic inside an error handler in the routine rather than an interupt?
    Inside the error handler or interupt try using storepath as the first instruction so the TPReadFK doesn't prevent the path being stored.

    BR<br />prnuk2003

Advertising from our partners