We’re trying to add a 7th axis turntable and sync with the robot simultaneously.
Given that we only have a stepper motor and no feedback system, we’re relying on the syncing on threading inside the robot controller (after testing threading from PC, the communication to UR takes longer than to the turntable).
So what we have developed is like this:
We pre-computed a series of pose both for the robot and the turntable, and send to the two machines separately. The turntable will be put into a “waiting” state.
The scripts sent to the robot contains the joint pose plus an “on/off” signal, so that we can open two threads on the robot controller: one for controlling the motors of the robot, one for telling the turntable to rotate.
Now the question comes: based on the urscript manual, threads are executed based on a 125Hz / 0.008s time frame, and if one doesn’t finish, it will be put into the queue so that the next thread will take the next 0.008 time frame.
However, since the urscript command
moveJ/moveL is high level, there must be some mechanism inside the driver to interpret it into a higher frequency (for instance, 10kHz in the PID control) signal to control the current sent to the motor, with a fixed time interval.
What is the mechanism behind it?
Or what will the robot do if the thread controlling it is set to sleep while the other thread is sending signal to the turntable?
(In other words, will the robot take 2x time for executing the same trajectory if using one of the two threads, compared with the case that only one thread is opened to control the robot only?)
A more short question:
When the controller is switched between two threads (
A for controlling the robot,
B for sending digital signal), when
A is in a sleep state, will the robot motor also be set to sleep or it will continue to execute the command send by
(Similar to the question if using multiple threads but always only one to control the motor, will the time increase for executing the same Trajectory?)
Is this related to the actually commands we’re using (move, servo, speed, etc.)?