RobotStudio event

ERROR inside an ERROR handler

Options
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<br>
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 :)




Comments

  • lemster68
    Options
    Starting around RW 6 and up ABB introduced CollisionErrorHandling, look it up in your system parameter manual.  (If you have new enough RW)
    Lee Justice
  • lromeral
    Options
    lemster68 said:
    Starting around RW 6 and up ABB introduced CollisionErrorHandling, look it up in your system parameter manual.  (If you have new enough RW)
    Hi! Thank you for your reply!

    Yes, there is a parameter in Configuration/Controller/General RAPID/CollisionErrorHandling where you can choose YES/NO if you want to control a collision instead of getting a Colision Error on the flexpendant. I put this parameter to YES because otherwise if a collision occurs, i will not execute the ERROR handler on the routine.

    But my problem is if i have an error inside the error routine, there is no handler to manage that.
  • lemster68
    Options
    So it does not successfully perform the collision retraction?
    Lee Justice
  • lemster68
    Options
    The other thing that I see is that you are moving up 5mm in z, then restoring the path, so it is going to the exact same position, potentially making the very same collision while still in the error handler.  One thought that comes to mind is to possibly RAISE the error and then make a clever way to RETRY.
    Lee Justice