Hello.
I am writing a recovery program in RobotStudio for a robot that loads a tray carrying a cardboard part into a milling cell. Cardboard occasionally gets stuck in the gripper where the cell holds the tray. I need the robot to retract from the milling cell while holding the tray if a piece of cardboard blocks the gripper from mating inside the cell.
To do this, I used a WaitUntil command. The robot should wait 30s; if the robot cannot reach the mating position after 30s, timeout is set to TRUE, and the program proceeds as shown.
When I tested my program, the PP was stuck at the MoveL command and would not proceed even after 30s.
Looking at the teach pendant, I saw both a servo lag error and a joint collision error.
My first question: Does the WaitUntil syntax look right?
!Release Position
MoveL Rel_pos,SlowSpeed,fine,Flange_Cell_R1\WObj:=WobJ29491L;
WaitUntil\InPos,TRUE\MaxTime:=30\TimeFlag:=timeout;
IF timeout THEN
!If R1 NOT at schunk mating pos, will retract from M1, go Home, then release to M1 again. If this fails, the robot will fault.
!Retracts from M1 Schunk.
WaitUntil di_160_ShunkRobotSTOpenR1=0 AND di_161_ShunkRobotSTCloseR1=1;
Open_Shunk_Cell1_R1;
MoveL RelTool(Rel_pos,0,0,-50),SlowSpeed,fine,Flange_Cell_R1\WObj:=WobJ29491L;
And my second question: Is there a way I can bypass the joint collision error in my program for this circumstance?