Universal Robots Forum

Synchronize additional Axis / blend radius etc

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 :stuck_out_tongue_closed_eyes:.

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?

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.

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?

125 Hz, using:

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.

1 Like

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

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

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?)