' Sample script demonstrating simple autoguider operation ' (c) 1999 Diffraction Limited ' This script is intended to demonstrate basic autoguider ' operation. It can be used with an SBIG ST-7/8/9 camera, ' or separate CCD imager and main camera. This script is ' a bit simple-minded and is intended only to demonstrate ' very basic operation. ' Tip -- for testing purposes, you can make a second copy ' of the camera simulator. Go to the MaxIm DL program ' directory and make a duplicate of the CCDPlugDummy.dll ' and call it CCDPlugDummy2.dll. You will now get two ' drivers called "Simulator" in MaxIm CCD; select the ' first one for the camera and the second one for the ' guider. Dim cam ' "The" Camera object Set cam = CreateObject("MaxIm.CCDCamera") cam.LinkEnabled = True if Not cam.LinkEnabled Then Console.PrintLine "Failed to start camera." Quit End If ' Take initial exposure cam.GuiderExpose 1 Do While cam.GuiderRunning Loop ' We'll assume the guider is already calibrated ' and the Declination setting is correct ' if no guide star in guider image, an error is generated. The following code traps the error (so the scope ' position can be adjusted) rather than crashing the script. On Error Resume Next ' Failure here should not be fatal do ' Search for guide star err.clear ' clear any error codes cam.GuiderTrack(GuiderExposure) ' if fails (no guide star) err.Number != 0 if(err.Number <> 0) then ' no guide star found. 'adjust scope position slightly end if loop while (err.Number <> 0 ) On Error Goto 0 ' Take a series of short exposures. A "real" ' script would probably save the images, and ' might do something more useful than a busy-wait ' loop while waiting for the exposure to complete cam.Expose 1, 1, 0 Do While Not cam.ImageReady Loop cam.Expose 1, 1, 0 Do While Not cam.ImageReady Loop cam.Expose 1, 1, 0 Do While Not cam.ImageReady Loop