Problem with autofocus image retrieval fail and not returning
Posted: Fri Aug 11, 2023 3:02 pm
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.
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.