Stopj not working in force_mode while servoing

Software version: 5.6
Robot generation: e-Series

Steps to reproduce:
Run a script program on the controller, that enters force mode and performs servoing in a thread.

thread servo_thread():
    while (True):
        servoj(servo_target, t=servo_time, lookahead_time=servo_lookahead_time, gain=servo_gain)
    end
end

Try to stop the robot using stopj(2).

Expected behavior:
The robot would stop when using stopj.
Actual behavior:
The robot does not stop, it hangs on the stopj command. However it stops correctly with the stopl command.

This behavior is not documented in the script manual. It seems that something regarding which stop function to use has changed from 5.5 to 5.6.

Hi @anpl,

I currently does not have that old software running. From version 5.10 the robot is reporting a run time error “Another thread is already controlling the robot” in both the stopj and stopl cases. However, if you kill the servo thread before stopping, everything goes fine.

Ebbe