I ran this sequence last night and had a problem with the autofocus failing and not returning from the autofocus call:
STOP AT LOCALTIME "4:45 AM"
LOOP 10 TIMES
LOOP 50 TIMES
LOOP 2 TIMES
IGNORE ERRORS FROM ONERROR RUN ""
CAPTURE 1 FRAMES REQUIREGUIDING True
END IGNORE ERRORS
END LOOP
IGNORE ERRORS FROM ONERROR RUN ""
GUIDING DITHER NOW
END IGNORE ERRORS
IGNORE ERRORS FROM ONERROR RUN ""
GUIDING START
END IGNORE ERRORS
END LOOP
LOAD PROFILE "ASI2600Focus (ZWO ASI2600MC Pro)"
LIVE MODE
BEGIN GUIDING PAUSE
IGNORE ERRORS FROM ONERROR RUN ""
AUTOFOCUS OFFSET -160 TO 200 STEP COUNT 18 BACKLASH 90
END IGNORE ERRORS
END GUIDING PAUSE
LOAD PROFILE "ASI2600Gain0-30s (ZWO ASI2600MC Pro)"
STILL MODE
IGNORE ERRORS FROM ONERROR RUN ""
GUIDING START
END IGNORE ERRORS
END LOOP
END STOP AT
I take two images, then dither, and then make sure that guiding is prodded by issuing a start guiding if necessary. This worked fine for the first loop of 50. At the end of the first 50 loop I fall thru to a focus routine then back again for another loop of 50.
The hourly focus routine failed to retrieve an image from the camera and continued to fail to retrieve an image for the next 3 hours until the outer loop time limit was up at 4:45AM.
01:05:48.761139 #1 Sequencer : Starting : Pause guiding if active and restart when this block finishes in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:48.841918 #1 Sequencer : Info : 'Stopping guiding temporarily' while running step Pause guiding if active and restart when this block finishes in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:48.922702 #1 Sequencer : Starting : Ignore any errors when running these steps in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:48.986531 #1 Sequencer : Starting : Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Info 01:05:49.011465 #57 Event received from PHD2 : GuidingStopped in void SharpCap.Base.Guiding.Phd2Api.ProcessNotification(EventBase typedEvent)
Info 01:05:49.043379 #57 Event received from PHD2 : LoopingExposuresStopped in void SharpCap.Base.Guiding.Phd2Api.ProcessNotification(EventBase typedEvent)
Info 01:05:49.043379 #57 Guiding GuideState changed to Stopped in void SharpCap.Base.Guiding.GuidingBase.set_State(GuideState value)
Info 01:05:49.043379 #57 Live stacking paused : PHD2 is no longer guiding. in void SharpCap.FrameTransforms.LiveStacking.StackingParameters.Pause(PauseType type, string reason)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.044377 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.045374 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.045374 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:49.045374 #57 Sequencer : Info : 'Guiding lost' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Info 01:05:49.045374 #70 Event received from PHD2 : LockPositionLost in void SharpCap.Base.Guiding.Phd2Api.ProcessNotification(EventBase typedEvent)
Info 01:05:49.051360 #1 Selecting transform Multi-Star FWHM Measurement in void SharpCap.Models.Transforms.set_SelectedTransform(ITransform value)
Info 01:05:49.069312 #1 Loading SharpCap.FrameTransforms.Focus.WPFFocusScoreControl, MinHeight is 220, ActualHeight is 230.666666666667 in void SharpCap.New.DockingArea.SetToolContent(Control value)
Debug 01:05:49.118179 #1 Notification (Status=Warning): PHD2 is no longer guiding, status is Stopped, Stacking Paused. in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Debug 01:05:50.121912 #1 Sequencer : Info : 'Focus scan between 16209 and 16569 in 18 steps of 22' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:50.171778 #1 Sequencer : Info : 'Moving focuser to end position : 16569' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:51.985957 #1 Sequencer : Info : 'Moving focuser to start position : 16187 via an overshoot of 90' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 01:05:55.596110 #1 Sequencer : Info : 'Starting scan between 16209 and 16569 in 18 steps' while running step Autofocus from offset -160 to 200 with 18 steps allowing for backlash up to 90 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Info 01:05:55.649999 #1 Starting scan from 16187 in Positive, 3 steps of 22 with 3 samples at each step in async Task SharpCap.FrameTransforms.Focus.FocusScoreModelBase.Scan(FocusTravelDirection direction, CancellationToken cancellationToken, bool gotoBestPosIfEnabled)
Debug 01:05:55.653955 #1 Notification (Status=Warning): Focuser scan in progress - step 1 of 18. Moving to position 16209 in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Debug 01:05:56.139745 #1 Notification (Status=Warning): Focuser scan in progress - step 1 of 18. Waiting for 3 focus score samples. in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Warning 01:06:00.156355 #7 Fetching still frame from ZWO camera failed with ExpWorking, exposure is 3000, timeout is 13300 in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
Debug 01:06:00.761749 #7 Finished ZWO Exposure of 3000ms, gotFrame = False in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
Debug 01:06:00.764741 #7 Starting ZWO Exposure of 3000ms in bool SharpCap.Cameras.ASI.ASICameraProxy.StartExposure()
Warning 01:06:14.064770 #7 Fetching still frame from ZWO camera failed with ExpWorking, exposure is 3000, timeout is 13300 in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
Debug 01:06:14.686261 #7 Finished ZWO Exposure of 3000ms, gotFrame = False in bool SharpCap.Cameras.ASI.ASICameraProxy.GetFrameData(int timeout, BufferFrame frame, CancellationToken cancellationToken)
Info 01:06:14.687260 #7 Dropped frames : 2 of type ZWOTimeout in void SharpCap.Base.DroppedFrameLogger.Count(DroppedFrameType type, int count)
Debug 01:06:14.689251 #7 Starting ZWO Exposure of 3000ms in bool SharpCap.Cameras.ASI.ASICameraProxy.StartExposure()
The routine continued to fetch frame and fail for the next 3 hiurs. Is there some way to preclude the autofocus routine from getting stuck like this? I had it inside an error trap but it never made it out of the autofocus.
Thanks for the help.
Problem with autofocus image retrieval fail and not returning
- admin
- Site Admin
- Posts: 17555
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Problem with autofocus image retrieval fail and not returning
Hi,
there is a time limit block in the sequencer, 'Stop running these steps after <X> minutes', which would abort the focus attempt and move on with the sequence, but I don't think that would help much here...
What appears to have happened is that the camera has glitched so that it is no longer returning frames to the PC. Right now, the behaviour of the ZWO code in this dropped frames situation is to keep trying, which is probably not going to succeed. It's not clear what the right behaviour here would be... I don't know if a recovery would be something that could be done in software (close/reopen camera via SDK) or requires a hardware reset (unplug/replug).
If you happen to catch it in this situation in future, do let me know what is required to make the camera start behaving again - ie
* Does changing the mode (RAW16 to RAW8) or similar fix things?
* Does closing the camera in SharpCap then re-opening fix it?
* Closing and restarting SharpCap?
* Unplug/replug ?
If it's either of the first two then I might be able to design some sort of auto-recovery.
Another way to look at it would be to consider that the most likely cause of the glitch in the first place is USB connection troubles - you mentioned in another post long download times, which is pointing at USB2. If you can, try USB3 and try shortening cable runs if possible and making sure that cables are well secured so mount movement doesn't cause issues.
cheers,
Robin
there is a time limit block in the sequencer, 'Stop running these steps after <X> minutes', which would abort the focus attempt and move on with the sequence, but I don't think that would help much here...
What appears to have happened is that the camera has glitched so that it is no longer returning frames to the PC. Right now, the behaviour of the ZWO code in this dropped frames situation is to keep trying, which is probably not going to succeed. It's not clear what the right behaviour here would be... I don't know if a recovery would be something that could be done in software (close/reopen camera via SDK) or requires a hardware reset (unplug/replug).
If you happen to catch it in this situation in future, do let me know what is required to make the camera start behaving again - ie
* Does changing the mode (RAW16 to RAW8) or similar fix things?
* Does closing the camera in SharpCap then re-opening fix it?
* Closing and restarting SharpCap?
* Unplug/replug ?
If it's either of the first two then I might be able to design some sort of auto-recovery.
Another way to look at it would be to consider that the most likely cause of the glitch in the first place is USB connection troubles - you mentioned in another post long download times, which is pointing at USB2. If you can, try USB3 and try shortening cable runs if possible and making sure that cables are well secured so mount movement doesn't cause issues.
cheers,
Robin
Re: Problem with autofocus image retrieval fail and not returning
Hi Robin thanks for the reply.
I use USB3 cables on this all the time so that should be ok. I am going to add an additional usb cable and isolate the main camera usb traffic from the rest of the usb traffic(2 - usb2 focusers and another usb2 guide camera).
I am still wondering if the time frames involved with data transfer are exacerbating the problems here.
I normally can go with a 2 to 3 second exposure time for focus and that is what I have used in my runs but I am going to change it to 5 seconds to see if that will not help with the issue. That in addition to removing the other traffic should fix it if that is the problem. Even though I pause guiding for focus I believe the guide camera is still pumping away at 1 or 2 seconds a frame and so there is continual "other" traffic on the current USB3 line.
Thanks for your help I will provide an update after I get a chance to test it. Summer time where I live is the time to enhance your dark library. It may take a month or more for me to get it done.
I use USB3 cables on this all the time so that should be ok. I am going to add an additional usb cable and isolate the main camera usb traffic from the rest of the usb traffic(2 - usb2 focusers and another usb2 guide camera).
I am still wondering if the time frames involved with data transfer are exacerbating the problems here.
I normally can go with a 2 to 3 second exposure time for focus and that is what I have used in my runs but I am going to change it to 5 seconds to see if that will not help with the issue. That in addition to removing the other traffic should fix it if that is the problem. Even though I pause guiding for focus I believe the guide camera is still pumping away at 1 or 2 seconds a frame and so there is continual "other" traffic on the current USB3 line.
Thanks for your help I will provide an update after I get a chance to test it. Summer time where I live is the time to enhance your dark library. It may take a month or more for me to get it done.