Can Anyone help me through this recovery?
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
Files
Answers
-
Hi Jespinoza,
By second press, do you mean if the user presses the button while the homing routine is executing?
Without knowing the code in the CheckLocation function, it is likely something to do with the robot moving after the first press and then the CheckLocation having an issue because the robot is moving and only returning FALSE, which is causing it to skip to the last line.
One fix for this is to use StopMove, ClearPath & StartMove in the code and waiting for half a second for the robot to stop before checking location and issuing the new move command.
Hope this helps,
Harry0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings