RobotStudio event

TCP Extension function?

Hi does anyone have a TCP extension function, I.E. TCP adjustable along its Z axis.

I would like to use something similar to the ArcWare instruction BETcpExtend

Kind regards


Comments

  • lemster68
    lemster68 ✭✭✭
    edited January 2019
    MyTool.tframe.trans.z:=MyTool.tframe.trans.z + x;  Always a good idea to make an assignment from the real tool to a variable tool so you don't lose your original tool data. MyTool := tToolWhatever;
    Lee Justice
  • Hi, Thanks for your reply

    The code above, MyTool.tframe.trans.z:=MyTool.tframe.trans.z + x; seems to adjust relative to the wrist coordinate system axis directions.

    This will be great when the tool points in the same direction as the wrist but what if the tool is rotated differently to the wrist like a spray gun etc. So what I need is an method of extending the TCP along the TCP's current Z direction.

    Kind regards with thanks.

  • You are welcome.  I suppose then that your .rot component is 1,0,0,0.  You should redefine your your tool so the z is in line with spray gun, weld torch, whatever it is.
    Lee Justice
  • Hi, My tool is indeed rotated in-line with the process, I.E. TCP&Z defined.

    The code MyTool.tframe.trans.z:=MyTool.tframe.trans.z + x; extends Mytool relative to the wrist coordinate system,s Z axis.

    What I would like to do is find a way to extend MyTool TCP along it own Z axis and not the wrist's axis.

    Kind regards

  • I made a booboo.  MyTool.tframe.trans.z:=MyTool.tframe.trans.z + x;, where x is the variable value, not x of the toolframe.
    Lee Justice
  • I will have to find a way to calculate the TCP .trans.z and .trans.x value in order to extend the TCP along its own Z direction.

    Kind regards

    Simon


  • DenisFR
    DenisFR ✭✭✭
    Hello,
    You can use PoseMult:

    t_Ext.tframe:=PoseMult(t_ToolCtrl.tframe,pose_Ext);


  • Thanks I will take a look... I now have a solution but think I went the long way round, I.E. numerous lines of code.