(recent) problem with Scheduler - Align conflicts with Auto-focus?

Hello,
All of a sudden I started having this problem.
Had this several sessions in a row.
Upgraded to all latest a couple of weeks ago.

I am running the server on Mele Stellarmate X and client on Windows. Wired connection.
Using Scheduler on a single target.

My auto-focus routine is set to run every 30 min.
My re-align routine is set to run when target is off by more than 20".
When re-align coincides with auto-focus the sequence fails.
Align tries to align but hangs saying “taking an exposure”.
If I stop the alignment procedure - it stops and then continues with success.
Then auto-focus starts but it starts at some position which is far away from where it was before.

I am not an expert but I inspected the log and it looks like Align and Focus are fighting with each other trying to work at the same time.

Truncated log is included.
Things start to happen at 1:08:05.

Thanks in advance!
log_22-53-45 - Copy.zip (47.1 KB)

When exactly did you stop the procedure? Aligment finished at 01:09:08 and focusing started subsequently.

As far as I understood, re-alignment stopped capturing and subsequently the autofocus run. So everything should have worked fine.

I stopped Align procedure several minutes after it started.
Because it stalled.
Probably around 01:09:08.
Once I stopped the Align, auto-focus kicked in but it started at a position far away from where it was before and it was bound to fail.
So, I stopped the Scheduler, re-focused and restarted the Scheduler.

In fact, I just had exactly the same situation 10 min ago!

I would like to propose:
– Uncouple re-align settings from Scheduler
– Put re-align to Capture | Limits
– When re-align and re-focus coincide in time - do re-focus first.

Currently, re-align and re-focus try to work at the same time.

Thanks!

1 Like

Just had it again!
So, when re-align and re-focus coincide in time they fight each other trying to work at the same time.

Never happened in the previous version.

We have to check if shifting to Capture is possible. Currently, re-alignment uses the Scheduler-infrastructure for re-aligning, restarting guiding and finally continuing with capture. All this is not present in Capture…

Hi Maxthebuilder,

I think we’ve found the issue. Unfortunately, it doesn’t present on the Sims so can’t be 100% sure. Anyway, we’re testing it at the moment. Will let you know when its merged.

1 Like

John/Wolfgang,
Thank you for your hard work!

Tonight, the coincidence happened again. To my surprise, all went well - the Align aligned and then Focus focused.
It didn’t go well last 10 or so occurrences.
The only change I made was - enabled “Scan for Start Position” in Focus options.

Thanks!
Max

I also have problem with align. It doesn’t start after meridian flip. https://www.indilib.org/forum/ekos/14875-issues-after-meridian-flip-no-align-and-guide-drift.html
Worst thing is when I start test exposures to test it it works.

Attaching another log from last night.

log_20-22-04.txt (360 KB)

Hi Max,
I just merged the fix.

Nou,
I think the issue you’re reporting is something different.

John/Others,
Upgraded to KStars 3.7.3.
It’s still doing this.
Not sure why this happens to me so often… I mean, the coincidence.
Bad luck.

So, if auto-align is to happen right after auto-focus or right after auto-focus plus the very next frame, the auto-align fails.
It just doesn’t do anything and waiting for something as if the camera wasn’t available or busy.
Once I stop/start the scheduler, everything continues smoothly.

Hi Max,

Do you have a log for this?

The fix I put in about a month ago fixed a couple of issues with Focus but sounds like you’re now getting an issue with Align hanging. If you can post a log we can look into it.

As to why you’re getting this issue more than others maybe you’re doing frame re-alignment more than others or running focus and frame realignment together more frequently. Obviously this shouldn’t be a problem and it should work but might explain why others haven’t reported it.

Hi Max,

Do you have a log for this?

The fix I put in about a month ago fixed a couple of issues with Focus but sounds like you’re now getting an issue with Align hanging. If you can post a log we can look into it.

As to why you’re getting this issue more than others maybe you’re doing frame re-alignment more than others or running focus and frame realignment together more frequently. Obviously this shouldn’t be a problem and it should work but might explain why others haven’t reported it.

John - thanks!
The log is attached to the first post in this thread.

Hi Max,

It would be very helpful to get a log of the problem in 3.7.3 with the changes. I could reproduce an issue with Focus from the original log you sent (which should now be fixed). I never saw Align hanging as you describe on the sims so I guess the next step would be to get another log of the current software and take another look.

Ah… sorry!
Attacing the full log from last night.
Happened four times.

After auto focus at:

  1. 21:05:08 plus 360s exposure auto align should start at 21:11:54
  2. 23:13:46 no 360s exposure
  3. 23:50:46 plus 360s exposure auto align should start at 23:56:55 (manual stop 23:59:18)
  4. 00:24:04

Here’s what happens:

  • It should auto align but no activity in Align module
  • Capture module claims that it’s taking a picture but nothing is captured

Something like this,
Thanks much!

Max
log_20-17-13.zip (65.1 KB)

Thanks for the log Max. I can see that Align and Capture are both trying to take a frame at the same time . I can’t see the system hanging from the logs (but maybe that’s because you intervened manually to get things going). I need to discuss with one of the other developers who knows more about this part of the system,

OK, John.
With KStars 3.7.3 the pattern is actually different.
And the problem is mostly fixed.

In 3.7.2 this would happen, if the scheduled (in Capture/Limits) auto-focus would coincide with Target Drift limit (in KStars Settings/Ekos/Scheduler).

Now it’s actually OK/fixed and not connected to auto-focus at all. But…
When the Target Drift limit is reached, Ekos starts the next light frame exposure and the Align module is waiting for it to finish.
After the light frame exposure is finished, the Align Module proceeds.

This should be the other way around - first Align and then start the next capture.

Thank you so much!

Hi Max,

That ties to what I saw in the log.

So everythig works now, but as you say the align sometimes gets delayed behind an exposure so maybe that sub has to be thrown away if its not properly aligned.

Generally Capture waits for Align so I don’t know why its not working like in this particular case. One of the other devs was going to take a look.

Yes, that’s the thing - the Capture proceeds without Align to run first.
Tonight I had an instance, when the target drift was out of the limit and Ekos proceeded with capture without aligning first.
Next frame was even worse in terms of the drift - Ekos still proceeded with the next capture without aligning (which was put on wait).