Consecutive MoveL commands make robot go mad

Hi Forum,

I send the following script to create a MoveL action and at the same time stream converted positions to Double Output Regsiters.

“def moving_and_streaming():
thread send_position():
while(True):
local position = pose_trans(pose_inv(p[0.4885084332082746,0.22652484714191604,0.3729249328877672,0.7542408940800382,-0.7560928630197719,-1.439516258072408]),get_actual_tcp_pose())
write_output_float_register(0, position[0])
write_output_float_register(1, position[1])
write_output_float_register(2, position[2])
write_output_float_register(3, position[3])
write_output_float_register(4, position[4])
write_output_float_register(5, position[5])
sync()
end
end
run send_position()
movel(pose_add(get_target_waypoint(),pose_sub(pose_trans(p[0.4885084332082746,0.22652484714191604,0.3729249328877672,0.7542408940800382,-0.7560928630197719,-1.439516258072408],p[0.010000000,0.000000000,0.000000000,0,0,0]),p[0.4885084332082746,0.22652484714191604,0.3729249328877672,0.7542408940800382,-0.7560928630197719,-1.439516258072408])), a=1, v=0.030)
end”

Both parts of this command (Streaming and Moving) work fine. the issue is that once the Robot stops moving, I have to wait minimum 200 ms before sending the next MoveL command. Otherwise the robot will go into a maniac state until it hits a wall.

For those who have more scripting experience, Can you spot any issues in here ? Do I cause some race conditions or something ? Because I need the robot to perform consecutive MoveL commands almost without delay.

Thanks,
Ali

hey @ali.mohammadijou_1

" sending the next MoveL command" suggests you are sending this to the robot from an external source, dashboard?
if so, the robot does not wait for the movel to end before executing the next command. it immediately runs the command it receives.

try adding an is_steady() check before sending the next movel.

Hey Francis,

I use Primary Interface to send commands.

IsSteady() will return TRUE when robot has been sitting still for 500 ms. which is already much higher than the standard 200 ms which i have to wait now.

What I notice is that if I make a program on the Pendant and create a few consecutive MoveL commands with max speed, The robot has absolutely no problem executing those moves without any delays.