RobotStudio event

Offsetting TCP of a tool

Hello all,<br><br>I'm hoping I can get some help with a project I'm working on.  What I need to do is offset the TCP of a tool.  I've looked through some old threads and can't find an answer.  I have a tool, but the working direction of the tool is not in line with axis six.  It is off at roughly 45 degrees.  I need to move the tcp along the Z axis (working direction) of the tool, but because it is at an angle to axis 6 of the robot, I can't simply change the Z value in the tooldata.  A move in the Z direction of the tool would end up being a slight change in X, Y, and Z of the tool.  How can I figure out what the new values would be?  I need to know how to calculate this mathematically.  Ultimately I will be building a function/routine to do this calculation on the fly so if there is already a function built that does this arithmetic that would be ideal.<br><br>The application that I'm working on is a non-robot version of the MeasureWearL command for measuring the tip wear on weld guns.  What I need to be able to do is after I determine how much of the tip has been ground off during dress, say 2mm, I need to be able to update the TCP of the weld gun by the same 2mm in the Z (working direction) of the gun.<br><br>Any help and or ideas are appreciated.<br><br>Thanks.<br>

Comments

  • Micky
    Micky ✭✭✭
    edited January 2015
    Hi,<br><br>for the calculation of the tool you can use the function "PoseMult".<br><br>You have to use the pose from the orginal tool (tFrame) and you define the a new pose which contains the translation and the rotation (quaternion).<br><br>See following example to move the TCP in Z-direction:<br><br> <br><br>   !pose for the calculation<br> VAR pose pseFrame:=0,0,0],[1,0,0,0;<br><br>    !Translation in Z-Direction<br>    VAR nDZ:=20;<br><br>    !Get the data of the old tool<br>    tNewTool:=tMyTool<br><br>    !assign translation for z-direction to a pose<br>    pseFrame.trans.z:=nDz;<br><br>    !Calculate translated tool<br>    tNewTool.tframe:=PoseMult(tMyTool.tframe, pseFrame);<br><br> <br>BR<br><br>Micky<br>
  • That did it.  Thank you.<br>