Hi all community!!
I am having some problems trying to recover from a colision (no colision avoidance package).
I have a procedure from taking parts from a container and in some part of the procedure, is used to occur a colision. When this occurs, the 95% of them I can solve the problem moving the TCP some millimeters and retry the same movement. So, I created the following code (aprox):
VAR bool tryRecover;
VAR num numOfRetries;
VAR robtarget colPosition;
PROC extract()
tryRecover:=FALSE;
MoveL p10,v100,fine,tool0\WObj:=wobj0;
MoveL p20,v100,fine,tool0\WObj:=wobj0;
!! Starts the zone where a recovable collision may occur
tryRecover:= TRUE;
numOfRetries:=0;
MoveL p30,v100,fine,tool0\WObj:=wobj0;
MoveL p40,v100,fine,tool0\WObj:=wobj0;
MoveL p50,v100,fine,tool0\WObj:=wobj0;
tryRecover:= FALSE;
numOfRetries:=0;
!!End of recovable collision
ERROR
IF (ERRNO = ERR_COLL_STOP and tryRecover = TRUE and numOfRetries < 3) THEN
Incr numOfRetries;
StorePath;
!Get collision point
colPosition := CRobT(\Tool:=tool0\WObj:=wobj0);
!Move to avoid collision
MoveL offs(colPosition,0,0,5),v100,fine,tool0\WObj:=wobj0;
RestoPath;
StartMoveRetry;
ELSE
!Cannot be recovered from collision
StorePath;
ResetRetryCount;
numOfRetries:=0;
Stop;
RestoPath;
!User has to check position and restart the program manually
StartMoveRetry;
ENDIF
ENDPROC
The problem I have is that if I get an error ERR_COL_STOP in the MoveL inside the ERROR routine, the program stops and this errors shows up:
40208: Error event queue full
I suppose this happens because the ERROR handler tries to call itself and this causes the error but I don’t know how to solve it.
Did you deal with this before?
Thanks in advance!!!
PD. Sorry for the amount of “ERROR” words inside this post. I hope this don’t cause an ERROR in ABB servers ![]()