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.
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
! 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