We found that on the second press of a homing button the program completely skips over the IF checklocations and goes straight to the else. Since the else sends the robot to Homepos, this is causing unwanted collisions. Full routine is attached.
Program for robot 1 goes as follows:
PROC R1_Recover()
SyncSpeedOverride;
WaitDO doR2_HomePos,1;
TPErase;
TPWrite “R1 Recovery”;
!***************
! HOME RECOVERY
!***************
IF CheckLocation(900,pHome,tGripper)=TRUE THEN
TPWrite “Recovery to Home Position”;
HomePos;
!*****************************
! PICK PALLET POUNCE RECOVERY
!*****************************
ELSEIF CheckLocation(400,pPick_Pounce,tGripper\Loc2:=pPick_Pounce10)=TRUE THEN
TPWrite “Recovery From Pick Pounce”;
MoveJ pPick_Pounce,v_approach,z_approach,tGripper;
HomePos;
ELSEIF CheckLocation(1000,pR1_SyncApp,tGripper) THEN
TPWrite “Recovery From Sync Approach”;
HomePos;
ELSE
TPWrite “Program is Outside of Predefined Recovery Parameters:”;
TPWrite “Manually Jog Robot to a Known Position or to Home.”;
!Stop;
HomePos;
ENDIF
ENDPROC