Intermittent focus fail: "Error in auto focus! Focuser failed to move to the auto focus position"

Running version v2.4.0.2629. I have been seeing this intermittently, perhaps in v2.4 versions only but I’m not completely sure.

Sometimes my AF will fail saying the focuser did not move to the requested position, but the logs seem to indicate that the focuser did move (of course I could be misinterpreting the log.)

For example:

[1/9/2015 7:59:37 PM] [DEBUG] [Focuser Backlash Thread] Focuser backlash thread has started…
[1/9/2015 7:59:37 PM] [DEBUG] [Camera Thread] MoveFocuserAbsBlocking: Focuser position 9155 matches requested position 9155
[1/9/2015 7:59:37 PM] [DEBUG] [Camera Thread] Focuser successfully set to focus position (9155)
[1/9/2015 7:59:37 PM] [DEBUG] [Camera Thread] Error in auto focus! Focuser failed to move to the auto focus position (9155). Focuser reports it is at 9093.
[1/9/2015 7:59:38 PM] [DEBUG] [Focuser Backlash Thread] Backlash thread has detected that movement to modified position (9170) is complete…
[1/9/2015 7:59:38 PM] [DEBUG] [Focuser Backlash Thread] Moving focuser to original requested position (9155)…
[1/9/2015 7:59:38 PM] [DEBUG] [Focuser Backlash Thread] Focuser backlash compensation needed. Steps: 15 Direction:IN
[1/9/2015 7:59:38 PM] [DEBUG] [Focuser Backlash Thread] Focuser moving to 9155
[1/9/2015 7:59:38 PM] [DEBUG] [Focuser Backlash Thread] Focuser move call complete
[1/9/2015 7:59:39 PM] [DEBUG] [Focuser Backlash Thread] Focuser backlash completed. Focuser is at original request position (9155)…

There are several other of examples of the failure in the full log: http://adgsoftware.com/misc/sg_logfile_20150109194835.zip

It seems like in all cases the reported bad position corresponds to the position where the focuser was at the end of the prior move. In the example above we see
“Focuser reports it is at 9093.”, but if you search backwards for 9093 you find

[1/9/2015 7:59:18 PM] [DEBUG] [Camera Thread] Focuser position matches requested position (9093), continuing…

This appears to be a consistent pattern with the failures.

Andy

I have seen this failure occasionally as well with various versions. Most recently using v2.3.15.2568.
The same indications as in Andy’s log. i.e. it reports the correct position but then says it has failed as below.
I reported this problem in July Reporting "Focuser failed to move to the auto focus position" - in Error - Sequence Generator - Main Sequence Software and have probably had only 2 or 3 failures since then.

I have been looking at my focuser driver code to see if I have something stupid going on and can’t spot anything. Mine is a home made Arduino based focuser with my own driver, So I guess no commonality with Andy’s .setup.

I think both are related to Backlash.
In my case the final focus was to be 2668, SGP added backlash to get 2818; called for a move to 2818 and as it went past 2668 on the way to 2818 SGP spotted the position being returned as 2668 from a getposition call and immediately logged an error even though the focuser was reporting isMoving as true. The focuser continued to 2818 and the SGP issued a move to 2668.

My expectation is that the focuser should report the current position when asked even though its moving. I suspect SGP is ignoring the IsMoving at this point.

[08/01/2015 19:33:52] [DEBUG] [Camera Thread] New focus position is at 2668 (@0.00C). Moving focuser…
[08/01/2015 19:33:52] [DEBUG] [Camera Thread] Focuser moving to 2668
[08/01/2015 19:33:52] [DEBUG] [Camera Thread] Focuser backlash active, modified move to 2818
[08/01/2015 19:33:52] [DEBUG] [Camera Thread] Focuser move call complete
[08/01/2015 19:33:54] [DEBUG] [Camera Thread] MoveFocuserAbsBlocking: Focuser position 2668 matches requested position 2668
[08/01/2015 19:33:54] [DEBUG] [Camera Thread] Focuser successfully set to focus position (2668)
[08/01/2015 19:33:54] [DEBUG] [Camera Thread] Error in auto focus! Focuser failed to move to the auto focus position (2668). Focuser reports it is at 2554.

This is true. Backlash is completely busted in 2.4 Beta. I would recommend turning it off right now.

Ok, thanks for looking into it.
Andy

My problem has always been with 2.3, not 2.4.so I believe it still needs to be investigated.
Without backlash I don´t think I can get good autofocus resultsc

Laurie

Some focuser ASCOM drivers have built-in backlash compensation settings. My Optec/Starlight Instruments Focus Boss II has backlash compensation setting in their ASCOM driver so I disabled backlash compensation in SGP and enable it in ASCOM driver.

Peter

This has been fixed and will be out in the next 2.4 beta. We will not be releasing this as part of the 2.3 maintenance line.

Ken,
Thanks, that’s fine. I have now moved onto the current beta anyway. Its very intermittent presumably because the focuser has to report the exact value on its way past so I can live with it until its fixed.
I do have the option of adding backlash into my driver but I’d prefer to use the SGP capability.

Laurie