RobotStudio event

offset help


can someone please help, and let me start by saying im very new to robots and programming of them.

we have a machine which has lots of pick-up drop-off targets, now once very few hundred the robot grippers drops a part and the robot gets stuck in an hard place to recover from, (for the operators anyway)all that is needed is for the robot to drive vertically about 300mm then it is clear of the obstructions.  so i thought i would have a go at writing a small recovery program
--------------------------------------------------------------------------------------------------------------------

 PROC Recovery()

  !wrote by gareth thwaite to
aid recovery

 ! set slow speed for recovery

  CONST speeddata
GarethSpeed:=[500,500,500,500];

  !+++++++++++ var position for
recovery++++++++++++++

  VAR robtarget recovery1;

  CONST robtarget
pabovetray:=[[349.48,-934.95,854.23],[0.0237752,0.716986,0.695494,0.0406639],[-1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

  CONST robtarget
phalfhome:=[[391.49,-337.97,854.23],[0.023777,0.716985,0.695495,0.0406651],[-1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

    WaitTime 0.8;

   recovery1:=
crobt( ool:=tool0WObj:=wobj0);

   MoveL
reltool,(recovery1,0,0,-300),GarethSpeed,fine,tool0WObj:=wobj0; 

   MoveJ
pabovetray,garethspeed,fine,tool0;

   MoveJ
phalfhome,garethspeed,fine,tool0;

   MoveJ pHome, vCycle,
fine, tool0WObj:=wobj0;

   waittime 5;

   main;

  ENDPROC  

ENDMODULE

---------------------------------------------------------------------------------------------------------------

the porblem is i dont know the command to move it with an offset relative to the world/robot rather than the tool, 

can anyone help?


Gareth_Minting2012-10-05 15:26:37

Comments

  • Hello,
     

    Given that you have the recovery1 point, and it is already in the world/base frame of the robot, I would suggest that you skip the reltool and simply modify the Z value of the point itself,

     

      recovery1.trans.z := recovery1.trans.z + 300;

      MoveL recover1, GarethSpeed,fine,tool+Wobj:=wobj0;

     

    RelTool is for use when you want to extract a tool in the direction of the tool z (or x, y).

     

      Steve

     
  • thanks steve, i just did it anyother way

    move L offs(recovery1,0,0,300),garethspeed,fine,tool0;

    thanks for the reply,