# Tool TCP Offset

**URL:** <https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644>\
**Category:** RobotStudio\
**Created:** [January 25, 2012, 3:10pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644 "2012-01-25T15:10:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mechman](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/mechman/32/4359_2.png) [@mechman](https://tech-community.robotics.abb.com/u/mechman)\
**Post date:** [January 25, 2012, 3:10pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/1 "2012-01-25T15:10:24Z")

</div>

I am looking for a way to offset the TCP according to the tool coordinates, similar to changing the object frame for a work object.

I have found a way to offset it according to the J6 coordinates, but since the tool is rotated, this will not work.

Anyone have an idea if this is possible?

---

<div class="post-metadata">

**Author:** ![Henrik\_Berlin](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/henrik_berlin/32/1011_2.png) [@Henrik\_Berlin](https://tech-community.robotics.abb.com/u/Henrik_Berlin)\
**Post date:** [January 25, 2012, 3:56pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/2 "2012-01-25T15:56:32Z")

</div>

Hi mecman,

Have you tried the RelTool command?

| Functions |   
 |   
 |
| --- | --- | --- |
| RelTool - Make a displacement relative to the tool | ← | → |

| - |
| --- |

| Usage |   
  
RelTool (Relative Tool) is used to add a displacement and/or a rotation, expressed in the active tool coordinate system, to a robot position.  
  
 |
| --- | --- |
| Basic examples |   
  
Basic examples of the function RelTool are illustrated below.  
  
  
Example 1  
  
  
MoveL RelTool (p1, 0, 0, 100), v100, fine, tool1;  
  
  
  
The robot is moved to a position that is 100 mm from p1 in the z direction of the tool.  
  
  
  
Example 2  
  
  
MoveL RelTool (p1, 0, 0, 0 Rz:= 25), v100, fine, tool1;  
  
  
  
The tool is rotated 25A? around its z-axis.  
  
  
 |

---

<div class="post-metadata">

**Author:** ![mechman](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/mechman/32/4359_2.png) [@mechman](https://tech-community.robotics.abb.com/u/mechman)\
**Post date:** [January 25, 2012, 4:00pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/3 "2012-01-25T16:00:44Z")

</div>

I have, but I don’t think it’s what I am looking for. I would like to offset the TCP for a couple of moves where soft float is used. It would be cleaner to offset it once, go through the moves and clear the offset.

---

<div class="post-metadata">

**Author:** ![Henrik\_Berlin](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/henrik_berlin/32/1011_2.png) [@Henrik\_Berlin](https://tech-community.robotics.abb.com/u/Henrik_Berlin)\
**Post date:** [January 25, 2012, 4:31pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/4 "2012-01-25T16:31:24Z")

</div>

I would have done like this.

1. Define a new tool and let it have values of the original tool

tool\_offset:=tool1;

1. Offset the desired value

tool\_offset.tframe.trans.x:= tool1.tframe.trans.x+100;

1. Use it in your instruction

---

<div class="post-metadata">

**Author:** ![mechman](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/mechman/32/4359_2.png) [@mechman](https://tech-community.robotics.abb.com/u/mechman)\
**Post date:** [January 25, 2012, 5:02pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/5 "2012-01-25T17:02:33Z")

</div>

I may be incorrect, but it looks like that is transforming the TCP along the J6 coordinates. I want to move it along the tool’s coordinates which are not the same as J6.

---

<div class="post-metadata">

**Author:** ![j\_proulx](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@j\_proulx](https://tech-community.robotics.abb.com/u/j_proulx)\
**Post date:** [January 25, 2012, 11:31pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/6 "2012-01-25T23:31:56Z")

</div>

How did you create your TCP? Did you add the rotation of the tool into the TCP tooldata? If you created the tooldata with the correct orientation then you can use the RelTool function to offset from a point relative to the tool coordinate system.

[webwiz/222/3HAC16581-1\_revL\_Tooldata.zip](http://forums.robotstudio.com/webwiz/222/3HAC16581-1_revL_Tooldata.zip)

---

<div class="post-metadata">

**Author:** ![Daniel\_Gustafsson](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Daniel\_Gustafsson](https://tech-community.robotics.abb.com/u/Daniel_Gustafsson)\
**Post date:** [February 20, 2013, 7:46am UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/7 "2013-02-20T07:46:37Z")

</div>

I have the same problem. I need an instruction to offset the tool coordinates in the toolframe direction and not the tool0 directions. Does anyone know how to do that??

mechman is right, the following instruction offsets the tool in the tool0 direction:  
tool\_offset.tframe.trans.x:= tool1.tframe.trans.x+100;

My tool has a 45degree angle from the flange. I guess I could do some math to calculate it myself but there has to be an easier way.??? 😉

---

<div class="post-metadata">

**Author:** ![osku](https://avatars.discourse-cdn.com/v4/letter/o/dfb087/32.png) [@osku](https://tech-community.robotics.abb.com/u/osku)\
**Post date:** [February 20, 2013, 8:12am UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/8 "2013-02-20T08:12:09Z")

</div>

Hi

I think it’s quite easy to calculate with multiplying the pose datas. You can use your old TCP and some offset pose and multiply them and the result will be the new TCP. For example like this:

CONST pose peOffset:=[[0,0,200],[1,0,0,0]];

tool\_offset.tframe:=PoseMult(tool1.tframe, peOffset);

This way tool\_offset will be a copy from the tool1, but there will be offset of 200mm in z-direction.

-Osku

---

<div class="post-metadata">

**Author:** ![LiamGwallace](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@LiamGwallace](https://tech-community.robotics.abb.com/u/LiamGwallace)\
**Post date:** [March 11, 2013, 6:35pm UTC](https://tech-community.robotics.abb.com/t/tool-tcp-offset/4644/9 "2013-03-11T18:35:21Z")

</div>

Hey,

I made this function to account for our tools having a variety of standoffs. I know it is the same as your response Osku, but could be handy. Its a shame it doesnt work in a MoveL  
e.g.  
MoveL p10, v100, z5, myToolOffs(myTool1,0,0,reg1);

FUNC tooldata myToolOffs(  
tooldata RefTool,  
num xOffs,  
num yOffs,  
num zOffs)  
VAR pose tStandoff:=[[0,0,0],[1,0,0,0]];  
!To call use  
!tNewTool:=myToolOffs(tOldTool,0,0,10);  
!  
!creates a new pose with the new standoff  
tStandoff.trans.x:=xOffs;  
tStandoff.trans.y:=yOffs;  
tStandoff.trans.z:=zOffs;  
!Adds the new standoff to the tool  
RefTool.tframe:=PoseMult(RefTool.tframe,tStandoff);  
RETURN RefTool;  
ENDFUNC
