# Rotation about an axis

**URL:** <https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647>\
**Category:** Robot Controller\
**Created:** [June 11, 2010, 10:50pm UTC](https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647 "2010-06-11T22:50:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martini](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@martini](https://tech-community.robotics.abb.com/u/martini)\
**Post date:** [June 11, 2010, 10:50pm UTC](https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647/1 "2010-06-11T22:50:34Z")

</div>

:grinning:

Hi,I am new to rapid programming.  
i am trying to make a simple rapid program where i can basically move from robtarget A (which has no orientation) to robtarget B (which has some orientation)  
After reaching B… i want to rotate about z axis…in the wrist coordinate system..  
So basically.. What i want is to rotate about an axis..at certain angle…(in this case the z axis…)  
Please note.. this rotation is not about the linear refrence frame..  
but along the orientated z axis..  
Please please any help with be appreciated..

---

<div class="post-metadata">

**Author:** ![martini](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@martini](https://tech-community.robotics.abb.com/u/martini)\
**Post date:** [June 11, 2010, 11:28pm UTC](https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647/2 "2010-06-11T23:28:11Z")

</div>

oh.i think i should clarify…  
i odnt have that orientated cooridnate system..yet..  
its just that robot has moved to an orientation (in wobj0 and tool0..hence all x,y,z have zero orientation)  
but at B.. the robot has an orientation because of the robtarget quaternions…  
and once robot reaches B.. i want to rotate in the axis.. which pass from J6 of robot..  
so the result will be the rotation of joint6 and nothin else…  
thanks.🙂

---

<div class="post-metadata">

**Author:** ![mattdavis](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mattdavis](https://tech-community.robotics.abb.com/u/mattdavis)\
**Post date:** [June 14, 2010, 2:51am UTC](https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647/3 "2010-06-14T02:51:49Z")

</div>

you can do this with a movabsj, this command takes joint values rather than x,y,z.

if you move to the position and then get the current joint position and add the required value to joint and then moveabsj to that position it will do this.

---

<div class="post-metadata">

**Author:** ![martini](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@martini](https://tech-community.robotics.abb.com/u/martini)\
**Post date:** [June 14, 2010, 4:47am UTC](https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647/4 "2010-06-14T04:47:25Z")

</div>

Hi.. thanks for replying..actually i have worked on this problem..  
but i am now stuck in different problem…Lets say i want to rotate about an axis..  
which is lets say at an some angle with the some axis.. lets say.. a vector which makes 30degrees with z axis… and then i want a rotation by thetha to take place…  
how do i do that..?

---

<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:** [June 15, 2010, 9:10pm UTC](https://tech-community.robotics.abb.com/t/rotation-about-an-axis/3647/5 "2010-06-15T21:10:37Z")

</div>

Hello, If you want to rotate around the tool coordinate frame you can use the **RelTool** function.

 

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.

BR / Jim
