if i want to control the speed of the UR5 by the value which i give to the analog input ? What is the best way to do it ?
I would you the get_analog_in(n) method but how i can control then the velocity?
Can this work?
Sounds reasonable, but consider adding a
sync() command to the Thread-loop. And you probably need to include the
get_analog_in() inside the Loop, otherwise you would keep sending the same value.
Hi jbm. Thank you for the fast response. Im curious, why i have to add the sync() command in the thread loop ? And another thing is. What is the value range i get with get_analog_in() is it a float between 0.0 and 1.0 ?
and why i’m sending socket_send_byte(10)?
sync()takes physical time, and hence relieves the thread from running away, consuming all processor resources.
Also, you probably do not need to adjust the speed slider at sub-millisecond precision, so adding some small delay could also work. I.e. 100 ms (
The return value of
get_analog_in() is explained in the URScript Manual.
The command needs a
line feed character to execute, why you are sending byte 10.
thank you for you answer