×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Linear 1 Pass gives wrong solution

  • Posts: 15
  • Thank you received: 0
I'm on a roll tonight!

Something else comes to mind in this sequence.

[2022-11-02T20:46:48.516 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:46:48.557 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10184#> "
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 10184 State: Busy
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:48.606 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:48.646 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:48.687 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:50.658 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:50.709 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.750 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: un-doing extension. Moving back in by 100"
[2022-11-02T20:46:50.750 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Focusing inward by 100 steps..."
[2022-11-02T20:46:50.752 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser reached requested position. "
[2022-11-02T20:46:50.791 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:50.921 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.961 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:0510084#> "
[2022-11-02T20:46:50.962 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser is moving to position 10084 "

So Ekos requested 10285. Then asked the focuser "where are you?" The focuser responds with 10184 but is still moving. Ekos waits until it stops moving but never asks the focuser "where are you?" again. What if Ekos is using the last known ABS position it received rather than assuming the focuser is in fact at 10285 when it stops? It never asks again, then subtracts 100 from 10184 and issues a move absolute command to 10084 which the focuser does. You see the focuser never reports it's position after the 10184 response. It may in fact be at 10285 when it stops but Ekos may not be making this assumption.

This may explain why sometimes it seems to work. Maybe if the move is small, or if I increase the speed of the stepper motor it will work more reliably?

Just a theory. Ok, enough for tonight!

Thanks
Ken
1 year 4 months ago #88436

Please Log in or Create an account to join the conversation.

  • Posts: 54
  • Thank you received: 5
In reply to John #88354
Concerning the focuser motion, believe me, up to now I built three of those things and tested them extensively. I've never seen anything strange happen after a series of forward and backward motion, like the ones you suggest, by issuing direct "go to" commands.
Indeed other focus algorithm in Ekos do work, such us polynomial and linear. It's just the one pass linear which gives this weird results... it must be something really stupid but devilish.
Last edit: 1 year 4 months ago by Massimo.
1 year 4 months ago #88441

Please Log in or Create an account to join the conversation.

  • Posts: 593
  • Thank you received: 276
Hi Ken,

Sounds like you might be onto something. So if there is a problem somehow with the polling messages if would be worth "upping" the polling interval for the focuser on the indi tab so that the motion can complete within one polling period. So, if the 200 step motion takes say 1 second, set the polling to 2 or 3 secs.

Just check that the focus motion timeout on the Ekos tab is set way above this (default is 30 secs) otherwise you'll get timeouts which will cause problems.
1 year 4 months ago #88443

Please Log in or Create an account to join the conversation.

  • Posts: 593
  • Thank you received: 276
Thanks for replying Massimo.
1 year 4 months ago #88444

Please Log in or Create an account to join the conversation.

  • Posts: 207
  • Thank you received: 18
Hi John,

Just a follow-up to say that all seems to be working using my Sesto Senso 2. I have upgraded to 3.6.2, and tonight had some clear weather to test. I turned off 'AF backlash comp' in the autofocus panel, and added my backlash setting for the focuser in the INDI driver. The Linear 1 Pass now shows perfect curve-fits and the solutions correspond with the curve and the actual focuser position.
I really like this autofocus algorithm, so very happy that it now all works. Thank you for your persistence in finding a fix, John.

Willem Jan.
1 year 3 months ago #88899

Please Log in or Create an account to join the conversation.

  • Posts: 593
  • Thank you received: 276
Willem Jan,

That's great to hear! So definitely sounds like a clash of some kind on backlash was causing the issue.

FYI, I've made another change (not merged yet as I need to test it but should be in 3.6.3) that completely splits AF Backlash Compensation from driver/focuser backlash so the AF Backlash Comp checkbox will become an input field. So you can independently set whatever values you like for AF Backlash Compensation and focus driver/focuser Backlash. In your case set AF Backlash Compensation=0
The following user(s) said Thank You: W J Drijfhout
1 year 3 months ago #88903

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
I am currently traveling, but will try out as soon as I have a chance, probably early next week.
1 year 3 months ago #88907

Please Log in or Create an account to join the conversation.

  • Posts: 207
  • Thank you received: 18
John, would you by any chance have an idea what the following could mean? Whether I select either Linear 1 Pass or just regular Linear, the focuser does not move outward first, but immediately starts taking an image. Polynomial and Iterative work well. In the log it says that focus state changed from aborted to in progress....

Compared to a while ago when it worked well:


All KStars 3.6.2, different scope, but same Linux machine, focuser and camera.

Any setting that I've missed?

Hope you have some ideas what this could be.
1 year 2 months ago #89720
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 593
  • Thank you received: 276
Hi Willem Jan,

That sounds odd. Can you send the full log and I'll have a look into it. Are you on 3.6.2 stable or bleeding edge?
1 year 2 months ago #89726

Please Log in or Create an account to join the conversation.

  • Posts: 207
  • Thank you received: 18
Hi John,

It's a long log, had verbose logging on....
Here's a link: Log file

Thanks for looking into this and hopefully you can find something

WJ
1 year 2 months ago #89736

Please Log in or Create an account to join the conversation.

  • Posts: 593
  • Thank you received: 276
Hi Willem Jan,

I've had a look at the log. Unfortunately it doesn't contain verbose focus information so I can't see why the autofocus run on Linear 1 Pass aborted. If you can get a log with the focus messages (under Ekos and Drivers) ticked and verbose ticked hopefully we'll be able to figure it out.
1 year 2 months ago #89738

Please Log in or Create an account to join the conversation.

  • Posts: 207
  • Thank you received: 18
Hi John,

I just tried to create the verbose log like you asked. Not under the stars, but that does not have to be an issue, as it is about starting the outward move.
Interestingly now it worked as expected!
Perhaps it had something to do with the fact that I had verbose logging on yesterday, which gave more strange behaviours.
So looks like this may have been false alarm. Let's see what happens next time under the stars.

Thanks for looking into this.

BR, WJ
The following user(s) said Thank You: John
1 year 2 months ago #89743

Please Log in or Create an account to join the conversation.

Time to create page: 1.493 seconds