Hi, in my program I’m trying to check whether robot picked a product and did not lose it during movement. I am doing this by TriggCheckIO - the trigger trigIOGrpFull is then activated in TriggL movement and when the signal does not have the right value program pointer moves into a trap tR2VacLost. Inside of the trap, I clear the robot path, which might cause an error, hence the error handler. I raise the error in trap and have the error handler in the procedure, where the TriggL movement is. However, I still get the error “40229: Execution error; Description: Task T_ROB2: Unhandled error.”
I should probably mention, that the routine in which the TriggL instruction is is not the main routine and I’d rather do not have the error handler for this particular error in main. The controller for this robot is IRC5 6.15.
Here are parts of the code:
sCommon - a module in which I have a routine to initialize all traps and the trap tR2VacLost:
LOCAL PROC rInitTraps()
…
IDelete iCheckGrpFullIO;
CONNECT iCheckGrpFullIO WITH tR2VacLost;
TriggCheckIO trigIOGrpFull,80,GI_R2P_VacSensHigh,EQ,GInput(GI_REC_VacSecActive),iCheckGrpFullIO;
…
ENDPROC
TRAP tR2VacLost
StopMove;
!BookErrNo ERR_DROP_LOAD;
bFailToPickProd:=TRUE;
nR2PProdFailedIteration:=nR2PProdFailedIteration+1;
ClearPath;
StorePath;
RestoPath;
RAISE ERR_DROP_LOAD;
ERROR
RAISE;
ENDTRAP
sPick - a module in which I have a routine rPick:
TASK VAR errnum ERR_DROP_LOAD:=-1;
PROC rPick()
BookErrNo ERR_DROP_LOAD;
lblTryToPickR2:
TriggL pR2PPick, vR2PFast, trigIntGripperPickProd \t2:=trigR2ReleasePusherCIPON \T3:=trigReduceAccValuePostPick, z0, tR2PCalcGripper \WObj:=wobjCIPCnv;
…
TriggL Offs(pR2PPostPick1,0,0,-10), vMovement,trigIOGrpFull \T2:=trigR2ReleasePusherCIPOFF \T3:=trigIWatchILostVac,z50, tR2PCalcGripper \WObj:=wobjCIPCnv;
IF bFailToPickProd GOTO lblTryToPickR2;
ERROR (ERR_DROP_LOAD)
StartMove;
StorePath;
TRYNEXT;
ENDPROC
What should I do to get more or less the intended result without getting the Unhandled Error error?