Adjust focuser position per filter: sometimes gets it wrong at start up

Using Win8.1 with v2.3.13.2473 , home built focuser and controller.

It appears that the auto adjust focus position per filter sometimes send the focuser to the wrong position after a start up. This appears to be because SGPro calculates the difference between the current filter and the new one but the focus has been left from an earlier session using a different filter.
e.g. Lum -> 6000, Red-> 6040, Blue-> 6047
A session finishes using filter Blue (6047). The next session on the next day starts up with the filter at default (in my case Lum) but the focuser is still at 6047 When SGPro asks to focus for Red it uses the difference between Lum and Red. even though it has read the required position correctly
Giving this in the log
[DEBUG] [Filter Wheel Thread] Adjust focuser pos per filter: Moving focsuer to focus position (6040)…
[DEBUG] [Filter Wheel Thread] Focuser moving to 6087
[DEBUG] [Filter Wheel Thread] Focuser backlash active, modified move to 6237
[DEBUG] [Filter Wheel Thread] Focuser move call complete
[DEBUG] [Main Thread] Focuser running backlash compensation…
[DEBUG] [Main Thread] Focuser backlash compensation needed. Steps: 150 Direction:IN
[DEBUG] [Main Thread] Focuser moving to 6087
[DEBUG] [Main Thread] Focuser move call complete

In this case the error is small but if the Lum setting is way off because of some changes in the train then the error is too large for an autofocus to work


Can you post your entire log on dropbox or someplace? Unfortunately there’s not enough context here to figure out what exactly was done.


Actually there might be enough context.

It seems like the filter gets set to Lum outside of SGP (maybe by the filter wheel getting powered on?) If this is the case there’s no way for SGP to know that the position it gets from the focuser is not for the filter it’s set at. Essentially changing the filter outside of SGP will break the relationship of the focus position and filter.

If your filter wheel homes on connect or power up then I would just have SGP set the lum filter at the end of the sequence which will also have the effect of correcting the focus position. That way when you start up SGP again everything should be ok.


Jared, I do understand what you are saying, though since my filter wheel is a standard commercial device - Atik - then I expect this will affect other people.
I often run sequences with only RGB or only NB filters & this would happen frequently.
I can circumvent this as you say or by performing a focus for Lum when I start up.
Is there an action somewhere that can perform that automatically when I startup? I guess a script won’t do it because the filter wheel connection is already assigned through Ascom to SGPro.



The SGP focus routine is based on you having a valid focus. I’m running a FW8-8300 and it does the same thing. I have a stepper setup like you, and I know that my LRGB filters all are in ‘OK’ focus around 7400 ticks. For my narrowband filters, it’s 7500 ticks. So, each night when I set up, I make sure I’ve adjusted my focuser for the Luminance setting of 7400. This is because my plate solving is all based on my luminance. Before it starts the sequence, it rotates to the appropriate filter, does it’s adjustment based on what I know (adjusts it 100 out if it’s a narrowband filter), and runs a focus routine.

I know it’s a little more ‘manual’ than Focusmax, but it works.