Error handler during EGM

csmith
csmith USA
edited January 2020 in RAPID Programming
Hi,
I'm trying to recover from any motion errors while my robot is controlled through EGM.
My current Rapid code:

TEST egm_action      
    CASE EGM_POSE:            
        printInfoMessage 1, CONTEXT_EGM, "Starting pose mode";
        EGMRunPose egm_id,
            EGM_STOP_HOLD,
            \X \Y \Z \Rx \Ry \Rz
            \CondTime:=20
            \RampInTime:=0.1
            \PosCorrGain:=1;
    DEFAULT:
                
ENDTEST
            
    EGMReset egm_id;

ERROR
    IF ERRNO=ERR_ROBLIMIT THEN
        TPWrite "Joint out of range error";
        MoveAbsJ homepos,v100,fine,tool0;
    ENDIF



Whenever I run into an Error during EGM, my error handler won't execute.
How can I make this work so I can recover without manually jogging the robot back to a valid position?


Thank you

Comments

  • lemster68
    lemster68 United States ✭✭✭
    Check out the system input Interrupt.  If you have an error, your system output for error can tell the PLC that there is a problem.  Then the PLC can give you that system input. From what I understand, it will act on that without the program running.
    Lee Justice
Sign In or Register to comment.