Running separate guiders in Maxim CCD

by Jeff Medkeff

Some observers will want to run a guider, for example an ST-4 or an ST-6, along with an physically different imaging camera, perhaps from a different maker, such as an AP-7 or AP-8. One of the more frequently encountered problems with this kind of arrangement is that when downloading from the imaging camera, the guider times out, generates an error, and brings the scripted run to a halt.

This can be addressed in two ways. The first is to trap the error in the script and set up a routine to recover gracefully from the condition. The other is to avoid the problem in the first place. For my money, the latter is preferable.

I've done this by simply stopping the guider just before the imager begins downloading, and then (if desired) starting the guider up again once the download is complete. Below is some sample VBScript code that demonstrates this technique. Its written out in syntax coloring that is equivalent to the Visual Basic IDE default, or PrimalScript's default, etc.

Note that in Maxim 3, the problem can be avoided by simply starting the download explicitly - e.g., take image, when image ready stop guider, start download.

In the code below, "Interval" is the exposure time for the imaging camera in seconds; "cam" is the Maxim.Camera object. "Util" is supplied by ACP, but its function should be obvious enough to translate to other systems. All of these things need to be defined elsewhere in the script.

' First thing we do is start the guiding.
' We assume that you've done that already.

' We calculate the time when the image
' should be finished exposing by using
' VBA's handy "DateAdd" - in the next
' line, we are telling the script to
' add the number of "s"econds in Interval
' to the time right "Now." The result is
' an ActiveX date in the variable
' FinishTime which we will use to
' calculate how much time is left in
' the exposure later.

FinishTime = DateAdd("s", Interval, Now)

' "Countdown" simply provides a counter
' of how many seconds are left before
' the image is finished exposing. We
' get this by taking the difference
' in "s"econds between "Now" and
' the previously calculated Finishtime.

countdown = DateDiff("s", Now, FinishTime)

' Ok, as long as we have more than one
' second left to go, we just do this
' loop over and over.

Do While countdown > 1

Loop

' The loop above is exited when there is
' less than a second to go before the image
' is finished being exposed. The guiding
' cycle should take much longer than that,
' so we simply interrupt it.

cam.GuiderStop

' now we wait for the image from
' the main camera

Do While Not cam.ImageReady

Loop

' carry on with rest of the script ....
' if you want, you can run code here
' to pick up the guide star again, it
' won't have gone anywhere....


Robotic Observatory home page.