Reset_revolution_counter() unexpected behavior

Hi,

I am having trouble using this function as a secondary program. First of all, is it possible to use it like this?
I want to be able to reset the wrist3 revolution counter without stoping the main program.

However, when I execute the following script:

sec resetRevolutionCounter():
  reset_revolution_counter()
end

The wrist3 joint gives a full rotation at high speed but the counter is not reset.

If a execute simply:

reset_revolution_counter()

The robot does not move and the counter is reset, however, the main primary program is stopped.

When during the program are you calling the function? Since it relates to joint positions of the robot, I suspect that i will have no effect in the case the robot is moving. If it can’t be called as a secondary program, you might be able to call it from within a thread, which would need to wait for some variable or function for, I suspect, the robot to stop moving.

Thank you for the reply,
Yes, the problem was the location of the function in the program. The full rotation was due to the program trying to go to the old configuration once the revolution counter was reset. For anyone interested see discussion here.