PHD2 could not begin guiding, state is LostLock

Questions, tips, information and discussions about using the SharpCap Sequencer and Sequence Planner tools
Post Reply
giraud
Posts: 44
Joined: Tue May 23, 2023 10:02 pm

PHD2 could not begin guiding, state is LostLock

#1

Post by giraud »

Hello Robin,

I had a sequence stopp following the message "PHD2 could not begin guiding, state is LostLock".
I know that you have been working on making the process more robust to temporary loss of PHD2 guiding (due to cloud and trees) and think I might have a study case here.

Thanks again for your support.

Cheers,
Eric.
Attachments
Log_2024-02-19T23_55_48-12536.log
(567.48 KiB) Downloaded 31 times
User avatar
admin
Site Admin
Posts: 13348
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: PHD2 could not begin guiding, state is LostLock

#2

Post by admin »

Hi Eric,

thanks for sharing - looks like a logic issue in the interaction between the various guiding actions. At the end of the log, SharpCap tries to start guiding, but PHD complains that it already is guiding (maybe it is paused?). I will dig into it and work it all out.

cheers,

Robin
User avatar
admin
Site Admin
Posts: 13348
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: PHD2 could not begin guiding, state is LostLock

#3

Post by admin »

Ah,

turns out it was an issue with the way the 'LostLock' status is handled - SharpCap requests PHD2 select a star and start guiding, but if PHD2 is slow to respond to that, SharpCap could make the same requests again, at which point PHD2 complains that it can't start guiding because it already is and everything falls apart...

I will adjust the code so that once a star has been selected, SharpCap will flag the 'Looping' state straight away, which should then prevent a second attempt at selecting a star and starting guiding from hapening unless the first star gets lost...

cheers,

Robin
giraud
Posts: 44
Joined: Tue May 23, 2023 10:02 pm

Re: PHD2 could not begin guiding, state is LostLock

#4

Post by giraud »

Thanks Robin,

Cheers,
Eric
giraud
Posts: 44
Joined: Tue May 23, 2023 10:02 pm

Re: PHD2 could not begin guiding, state is LostLock

#5

Post by giraud »

Dear Robin,

Coming back to you regarding this topic. Did you have time to implement the correction you mentionned below?
As I resumed my observations yesterday night, I came accross a similar issue that put an end to my automated session almost immediately after a guiding lost message, at around 3.38am. See log attached.

Many thanks for your support.

Best,
Eric
Attachments
Log_2024-04-12T02_38_01-7124.log
(912.17 KiB) Downloaded 13 times
User avatar
admin
Site Admin
Posts: 13348
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: PHD2 could not begin guiding, state is LostLock

#6

Post by admin »

Hi Eric,

yes, I made that change in February, so it will be in the version that you were using.

In this case the error seems to be coming from PHD - 'Cannot initiate guide while guide is in progress'. I suspect that the issue is something along the lines of

* SharpCap checks PHD state - finds it is not guiding
* SharpCap asks PHD to guide

however, if between SharpCap changing the state and sending the guide command, PHD starts guiding again for some reason then maybe that would explain the error. I will have to dig into the log a bit more to see if there is more to be learnt.

cheers,

Robin
User avatar
admin
Site Admin
Posts: 13348
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: PHD2 could not begin guiding, state is LostLock

#7

Post by admin »

Hi,

OK, I think I have found some more things I need to fix relating to how SharpCap commands PHD2 when there are problems with the guiding

1) PHD2 considers 'Lost Lock' to be still guiding, just not actually able to at the moment. That's why it wasn't happy when SharpCap sent it a 'Begin Guiding' command when it had lost lock - I will fix that so SharpCap only sends a Find Star command in that case.

2) There were no retries at getting guiding running if the first try failed at the *start* of a capture still frames step (if the guiding dropped during a capture still frames then it would retry every 60 seconds to get it going again).

I will fix both of these for the next update - hopefully that will be sufficient.

cheers,

Robin
giraud
Posts: 44
Joined: Tue May 23, 2023 10:02 pm

Re: PHD2 could not begin guiding, state is LostLock

#8

Post by giraud »

Thanks again Robin.

Much appreciated.

Cheers,
Eric.
Post Reply