Exposure script results in camera disconnect at end

Discussion in 'Scripting and Programming' started by Richard Gray, Feb 3, 2015.

  1. Richard Gray

    Richard Gray Standard User

    Joined:
    Nov 29, 2014
    Messages:
    8
    Hi,
    I am running an Apogee Alta camera on Maxim DL, and I am trying to take exposures with it via a simple script. The script is written in autoit, and the relevant function is as follows:

    Func Camera($Image,$Star)
    Dim $Cam
    $Cam = ObjCreate("MaxIm.CCDCamera")
    $Cam.LinkEnabled = True

    If $Cam.LinkEnabled = False Then
    MsgBox(0,"","Camera not ready")
    Exit
    EndIf

    $Cam.Expose(5, 1)

    Do
    Until $Cam.ImageReady

    $Cam.SetFITSKey("Object",$Star)

    $Cam.SaveImage($Image)
    $Cam = ""
    EndFunc

    This function successfully takes the exposure and saves it, but at the end, the camera is disconnected from Maxim DL. That is to say, to take manual exposures it is necessary to press the "connect" button. This script works perfectly with an SBIG camera (that camera remains connected), but has that problem with the Apogee Alta camera. If I remove the $Cam = "" statement, I have the same results. Any suggestions?

    Richard
     
  2. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    704
    Location:
    Ottawa
    That likely has to do with the scope of your $Cam variable. Check out the documentation on MaxIm.CCDCamera.DisableAutoShutdown.
     

Share This Page