On your IRB6400, If you have a 'clear' ceiling.
TempPos:=CRobT();
TempHgt:=CPos();
IF TempHgt.z<750 THEN
TempPos:=Offs(TempPos,0,0,750);
MoveJ TempPos,Slow,z100,Gripper;
ENDIF
MoveJ Home_Pos,Slow,z200,Gripper;
(750 being the tallest object you need to dodge)
You can get fancy with this too, you can track your x and y positions and give special move commands.
I've also on Fanuc's KAREL called up the actual position, compared joint 1,2 and 3 to all positions joints values for 1,2 and 3, give a score based on how close the joint is and the highest scoring position wins and the robot moves to this and then follows typical paths to home. I don't have that code with me though and its less predictable than the above code.
This " TempPos:=Offs(TempPos,0,0,750);" code will cause the robot the robot to go up an additionial 750 mm from where it is currently located.
I suggest
!Data
Const num nSafeHomeHeight:=750;
PERS robtarget pCurrentPos:=[[-765.706,75.8629,1100],[0.827152,-0.000301007,-0.561776,-0.0151286],[0,-1,0,4],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
!
! Get Home
!
pCurrentPos:=CRobT(\Tool:=tCurrentTool\WObj:=wobj0);
!
IF pCurrentPos.trans.z>=nSafeHomeHeight THEN
!
! Robot is above nSafeHomeHeight Position going Home
!
TPErase;
TPWrite " ";
TPWrite " Robot above "\Num:=nSafeHomeHeight;
TPWrite " Returning to Home position";
!
WaitTime 1;
!
MovetoHome;
!
ELSE
!
pCurrentPos.trans.z:=nSafeHomeHeight;
MoveL pCurrentPos,v200,fine,toolGrip;
!
ENDIF
There are a million ways to do this, depending on what options you have.
Jeremy