@c_joerg
Not sure if you have experienced this, but I have confirmed you need a sleep after calling the move to register the upper and lower dofs.
Here is a snippet of my test code:
upper_pos = get_focus_distace_upper()
lower_pos = get_focus_distace_lower()
print(upper_pos,lower_pos)
call_event_proc("EFLensCom.FocusSearchNear")
sleep(sleep_time*100)
upper_pos = get_focus_distace_upper()
lower_pos = get_focus_distace_lower()
print(upper_pos,lower_pos)
call_event_proc("EFLensCom.MoveFocus",steps,speed)
sleep(sleep_time*100)
upper_pos = get_focus_distace_upper()
lower_pos = get_focus_distace_lower()
print(upper_pos,lower_pos)
If sleep_time is 0 then upper and lower don't change.
If sleep_time is 1, ie 100ms, then they do change but not as expected, ie distance change hasn't completed.
if sleep_time is 2, ie 200ms, or more then all looks good.
I guess the issue is that call_event_proc("EFLensCom.*") is not waiting for completion.
A sleep does work, but not very intelligent. I'll think about other ways, ie a if test.