# TPC update between 2 waypoints

**URL:** <https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785>\
**Category:** General Application Help: How do I?\
**Created:** [August 26, 2024, 9:20am UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785 "2024-08-26T09:20:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo.cebolla](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pablo.cebolla](https://forum.universal-robots.com/u/pablo.cebolla)\
**Post date:** [August 26, 2024, 9:20am UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/1 "2024-08-26T09:20:30Z")

</div>

Hi,

I’m trying to change the TCP offset live in between 2 waypoints. The idea is to steer the z axis as it detects some lateral forces.

I made a script that reads the forces and sets the TCP\_offset related to it, but it is taken into consideration once it gets to a waypoint, not in between.

Any ideas?

Regards,  
Pablo.

---

<div class="post-metadata">

**Author:** ![nrivas1](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nrivas1](https://forum.universal-robots.com/u/nrivas1)\
**Post date:** [August 26, 2024, 3:58pm UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/2 "2024-08-26T15:58:21Z")

</div>

Is your tool moving based on these forces? If not, I would look at using path\_offsetting instead of changing the TCP Offset values. You should look at creating a thread that changes the path\_offsetting value based on the lateral forces while move between the two points.

---

<div class="post-metadata">

**Author:** ![pablo.cebolla](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pablo.cebolla](https://forum.universal-robots.com/u/pablo.cebolla)\
**Post date:** [August 27, 2024, 6:41am UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/3 "2024-08-27T06:41:42Z")

</div>

Thanks for the reply.

It just does not work like industrial robots offset… this is much more complex. I tried, but the robot does not seem to be affected by it.

Every time I need to set an alpha filter really low 8like 0,00001) which I do not know exactly what it does. and then the path is not modified…

I wrote: path\_offset\_set([0,0,var\_2,0,0,0],3) (I also tested 1 and 2 intead of 3) and then I increse var\_2 by 0,5 everycycle… the path is the same

---

<div class="post-metadata">

**Author:** ![nrivas1](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nrivas1](https://forum.universal-robots.com/u/nrivas1)\
**Post date:** [August 27, 2024, 11:56am UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/4 "2024-08-27T11:56:58Z")

</div>

Having a really low alpha filter will decrease the final offset value by a large amount. Their suggestion in the URScript manual for welding is 0.1. I would look at increasing the alpha filter and then playing with different offset values to find the maximum you can set without receiving acceleration errors. It will most likely be a lot smaller then 500mm as it sounds you are currently increasing each cycle.

---

<div class="post-metadata">

**Author:** ![pablo.cebolla](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pablo.cebolla](https://forum.universal-robots.com/u/pablo.cebolla)\
**Post date:** [August 27, 2024, 12:47pm UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/5 "2024-08-27T12:47:05Z")

</div>

That was a value I tried, but normally I just increased 0,05.

Still if I put a value of alpha or Var\_2 enough to fill the axis to change, it says acceleration is too high. Otherwise it does not do anything.

Do you have an example I may test?

---

<div class="post-metadata">

**Author:** ![nrivas1](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nrivas1](https://forum.universal-robots.com/u/nrivas1)\
**Post date:** [August 27, 2024, 2:45pm UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/6 "2024-08-27T14:45:00Z")

</div>

If you are getting the acceleration error, try to keep reducing the amount of offset you are applying, your Var\_2 value while you keep the 0.1 alpha value. This offset is being applied every 2ms if you are adding every cycle, so it will need to be a small value like 0.00025.

---

<div class="post-metadata">

**Author:** ![pablo.cebolla](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pablo.cebolla](https://forum.universal-robots.com/u/pablo.cebolla)\
**Post date:** [August 28, 2024, 5:59am UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/7 "2024-08-28T05:59:02Z")

</div>

Sorry nrivas 🙂 I think I may not understand the functionality behind path\_offset\_set…

I have a program that makes a moveL between point A and B in a loop. I added the path\_offset\_set in the thread\_1… Am I modifying the final point A or B?? What does the offset do?

In other robots, like Fanuc for example, an offset modifies the real point at which the robot goes.

---

<div class="post-metadata">

**Author:** ![pablo.cebolla](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pablo.cebolla](https://forum.universal-robots.com/u/pablo.cebolla)\
**Post date:** [August 28, 2024, 7:04am UTC](https://forum.universal-robots.com/t/tpc-update-between-2-waypoints/35785/8 "2024-08-28T07:04:47Z")

</div>

Nevermind, I understood it!! thanks a lot for your help  
🙂
