# Change orientation of tcp in Rapid - imperfect

**URL:** <https://tech-community.robotics.abb.com/t/change-orientation-of-tcp-in-rapid-imperfect/3166>\
**Category:** Robot Controller\
**Created:** [November 6, 2009, 5:09pm UTC](https://tech-community.robotics.abb.com/t/change-orientation-of-tcp-in-rapid-imperfect/3166 "2009-11-06T17:09:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laro88](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/laro88/32/2653_2.png) [@Laro88](https://tech-community.robotics.abb.com/u/Laro88)\
**Post date:** [November 6, 2009, 5:09pm UTC](https://tech-community.robotics.abb.com/t/change-orientation-of-tcp-in-rapid-imperfect/3166/1 "2009-11-06T17:09:33Z")

</div>

I have a tricky issue that I hope an expert can help me with.

I need to reorientate the tool and then start a new motion. I peform the reorientation using a moveL which works, however the robot makes a small move ( like a jerk )

What is the best way to reorient a tool while maintaining the physical position of the tool?

Current rotation code:

robtargetTemp := CRobT (Tool:=tRapProgram WObj:=wobjRapProgram); !Inline alignment, AngleWithXAxis:80,27  
robtargetTemp.rot := [0.764514164391624,0,0,-0.644606928635255]; !Generated quaternion from angle  
**MoveL robtargetTemp,v1000,fine,tRapProgramWObj:=wobjRapProgram; !Done with inline alignment (reorienting here )**

Regards

---

<div class="post-metadata">

**Author:** ![KeyHolder](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@KeyHolder](https://tech-community.robotics.abb.com/u/KeyHolder)\
**Post date:** [November 10, 2009, 11:26am UTC](https://tech-community.robotics.abb.com/t/change-orientation-of-tcp-in-rapid-imperfect/3166/2 "2009-11-10T11:26:20Z")

</div>

IF your TCP is OK then, I should try this,

calculate your position (CRobT(…)  
Movel RelTool(robtargetTemp,0,0,0Rz:=90), …

😐
