# Synchronize additional Axis / blend radius etc

**URL:** <https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961>\
**Category:** Robot Communication\
**Created:** [July 12, 2017, 1:32pm UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961 "2017-07-12T13:32:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon11300709](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@anon11300709](https://forum.universal-robots.com/u/anon11300709)\
**Post date:** [July 12, 2017, 1:32pm UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/1 "2017-07-12T13:32:20Z")

</div>

Hello, i allready read the artikles about an UR System on a slider and how to drive the axis. In my case i want to synchronize a dispencer which is driven by a stepper. I use G-code to generate scipt files with move linear (movel) commands.

Since i only know the feedrate, that correspond with the move length for each line, i wonder how to synchronize the Speed of the stepper while the tcp never really stops (hence there is the blend radius).

Under test conditions i stopped the tcp after every movel and triggered the stepper with a new trapeziod profile. But it looks and sounds horrible 😝.

My first idea was to use the 125 Hz RTDE port to send tcp speed and acceleration, to calculate the movement between the Points. But therefore i also need to know about the next movement. I also don’t know the speed in between the blend movements.

Is there anyone who knows how to synchronize tcp and stepper?

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [July 13, 2017, 9:47am UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/2 "2017-07-13T09:47:12Z")

</div>

For one thing, you could consider to use MoveP motions, which are characterized by a constant speed profile.

You could also use get\_actual\_tcp\_speed() to measure the actual speed of the TCP in a thread, and then convert that to an analog output live controlling the stepper. E.g. 0-10 V or 4-20 mA.

---

<div class="post-metadata">

**Author:** ![anon11300709](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@anon11300709](https://forum.universal-robots.com/u/anon11300709)\
**Post date:** [July 13, 2017, 10:42am UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/3 "2017-07-13T10:42:23Z")

</div>

Thank you very much for your suggestion! Are there any specifications for how fast i can get new values over the " get\_actual\_tcp\_speed()" call in a thread?

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [July 13, 2017, 10:49am UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/4 "2017-07-13T10:49:21Z")

</div>

125 Hz, using:

```auto
Thread: 
   speed = get_actual_tcp_speed()
   # calculations into analog value
   Set AOx = analog value
   sync()

```

The `sync()` command uses the remaining time in one frame of 8 ms.

---

<div class="post-metadata">

**Author:** ![sofia.miranda](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sofia.miranda](https://forum.universal-robots.com/u/sofia.miranda)\
**Post date:** [December 21, 2018, 10:11pm UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/5 "2018-12-21T22:11:44Z")

</div>

I’m trying to do the same application. How did it worked for you @anon11300709 ? Which brand of stepper did you used? Any tip that you can share with me would be really helpful. 🙂

---

<div class="post-metadata">

**Author:** ![anon11300709](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@anon11300709](https://forum.universal-robots.com/u/anon11300709)\
**Post date:** [December 21, 2018, 11:30pm UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/6 "2018-12-21T23:30:15Z")

</div>

Hi sofia,  
as jbm mentioned i used a separate thread to determine the velocity each time the thread is called (125Hz).  
in the same thread i opened up an tcp socket and pushed out the velocity values (later on some other values) to a separate  
stepper controller that was able to receive the tcp packets at the same speed (in my case linux with real time kernel, but every other  
RTOS on arm like cpu should work). I validated the transmitting of the values with wireshark to be shure.

i hope that helps, kind regards  
seb

---

<div class="post-metadata">

**Author:** ![anon39891954](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39891954](https://forum.universal-robots.com/u/anon39891954)\
**Post date:** [November 20, 2019, 11:27am UTC](https://forum.universal-robots.com/t/synchronize-additional-axis-blend-radius-etc/961/7 "2019-11-20T11:27:37Z")

</div>

I’m also working on similar projects and need synchronization of two systems.  
When you open a 2nd thread, the URscript manual said the two threads will be executed alternatively.

When one thread is put to sleep/hold, will the motor also be stopped or it will continue to move? (1 of 2 threads controlling the robot v.s. 1 thread controlling the robot, will they take the same amount of time to finish a trajectory?)
