I have a function where I do a searchL operation just to see if a certain part is missing or not. If the searchL fails I just want to return FALSE else return TRUE. But the problem I’m having is that the program never enters my error handler at all. The code is as follows:
MODULE program
PROC program()
PERS BOOL contact;
contact:=TRUE;
contact:=contact_func();
IF contact=TRUE THEN
weld something…
ELSE
dont weld, just continue to the end…
ENDIF
ENDPROC
FUNC BOOL contact_func()
VAR BOOL value;
value:=TRUE;
MoveJ
FRO_SearchL
RETURN value;
ERROR
IF ERRNO=ERR_WHLSEARCH THEN
value:=FALSE;
TRYNEXT;
ENDIF
ENDFUNC
ENDMODULE
When the searchL fails the robot just stops and gives me the error “80001 part is missing” but I want to continue from that state. Any ideas what I’m doing wrong?
