Automatically recover from joint out of range?

Dear All
I have a question. In RS simulation, is there any way to
automatically handle and recover the err of joint out of range with either
Rapid or RS API. We need to run our simulation smoothly without any human
interference like manually jogging.

 I program a trap function to monitor joints angle and set
limits for them. If a joint is out of range, I use StopMove/quick function to
stop robot, then use MoveAbsJ to turn the problematic joint away from limit. But simulated robot still keep going when reach limit.

Can you help me with this problem.

 

Thanks

Zack

Comments

  • BrowsemBrowsem Denmark
    I had that exact problem, with a go home routine
    Here is what i did in pseudo code

    Point:=crobt(\tool:=tool0\wobj=wobj0);
    Point.trans.z:=Point.trans.z+TooHigh;
    TmpJoint;=CalcJoint(Point,tool0\wobj=wobj0);
    Movej Point,V1000,z100,ool0\wobj=wobj0;


    ERROR
    IF ERRNO=ERR_ROBLIMIT THEN
             !stop;
             Point.trans.z:=Point.trans.z-10;
             RETRY;
    ELSEIF ERRNO=ERR_OUTSIDE_REACH THEN
             !stop;
             Point.trans.z:=Point.trans.z-10;
             RETRY;
    endif

    So basically.
    I test if the robot can reach the point, by calculating the abs angles.
    If that fails, i catch the error, and try again, just a little lower.
    Of course is should limit how far down, and where this can be done and so on and so forth

  • msalminenmsalminen Finland ✭✭
    I use following function to check if robtarget is reachable

    FUNC bool IsReachable(robtarget pReach, PERS tooldata ToolReach, PERS wobjdata WobjReach)

    ! Check if specified robtarget can be reach with given tool and wobj.
    ! Output:
    !  Return TRUE if given robtarget is reachable with given tool and wobj
    !  otherwise return FALSE
    !
    ! Parameters:
    !  pReach     - robtarget to be checked, if robot can reach this robtarget
    !  ToolReach  - tooldata to be used for possible movement
    !  WobjReach  - wobjdata to be used for possible movement

    VAR bool bReachable;
    VAR jointtarget jntReach;
    bReachable := TRUE;
    jntReach := CalcJointT(pReach, ToolReach\Wobj:=WobjReach);
    RETURN bReachable;
    ERROR
    IF ERRNO = ERR_ROBLIMIT THEN
    bReachable := FALSE;
    TRYNEXT;
    ENDIF
    ENDFUNC
Sign In or Register to comment.