# Change tool orientation on path

**URL:** <https://forum.universal-robots.com/t/change-tool-orientation-on-path/21304>\
**Category:** Technical Questions\
**Created:** [May 13, 2022, 3:24pm UTC](https://forum.universal-robots.com/t/change-tool-orientation-on-path/21304 "2022-05-13T15:24:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon84921795](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@anon84921795](https://forum.universal-robots.com/u/anon84921795)\
**Post date:** [May 13, 2022, 3:24pm UTC](https://forum.universal-robots.com/t/change-tool-orientation-on-path/21304/1 "2022-05-13T15:24:50Z")

</div>

Hello

I have developed a urcap inside which my robot is able to follow s square wave trajectory given some input points as in the below picture.

![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/9/9ff6c10dffb0c0363b13ed6e294af63171820a4a.png)

I want to get the same tool inclination in both the long segments of my square wave pattern.

I can get the tool inclination thanks to a waypoint that identifies the starting point of my glue dispensing path.

Suppose to have a glue dispenser end-effector: i want to pull the glue in the ascending part of my square wave and i want to pull the glue even in the descending part of the square wave,

I need to find a way to automatically modify the setup of the glue dispender so that i can pull the glue on both side on the square wave pattern. (up to now i find myself pulling the glue on one side and pushing the glue on the other).

does someone have any hints about this?

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [May 13, 2022, 3:59pm UTC](https://forum.universal-robots.com/t/change-tool-orientation-on-path/21304/2 "2022-05-13T15:59:54Z")

</div>

Are you using path\_offset() commands to produce the square wave motion? I would think you’d be able to simply substitute the rx, ry, and rz values of your waypoints to match whatever tool angle you were using on the rising edge.

---

<div class="post-metadata">

**Author:** ![anon84921795](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@anon84921795](https://forum.universal-robots.com/u/anon84921795)\
**Post date:** [May 24, 2022, 1:13pm UTC](https://forum.universal-robots.com/t/change-tool-orientation-on-path/21304/3 "2022-05-24T13:13:20Z")

</div>

hello!

Unfortunately i am not using path\_offset() in order to produce the square wave: the operator stores a line of point, I intake them and make some math on them in order to produce a square wave. The correct orientation could be the one of the first point.

In some cases i cannot even stop the glue dispensing while changing this orientation. Do you have any hints?
