CamMaxim.StartSequence?

Discussion in 'Scripting and Programming' started by Fred Herrmann, Oct 28, 2014.

  1. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    CCDCamera.StartSequence ( [ SequenceName ] )

    Initiate a previously configured sequence of exposures.

    Where is the number of exposures in the sequence defined? Maybe something like CamMaxim.SequenceNumber = X ?

    Thanks,

    Fred
     
  2. Tim

    Tim Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    1,712
    Sequence (Autosave) parameters are located in the *.seq file itself. Create the sequence in MaxIm DL using the "Sequence" or "Autosave" windows and save it as a *.seq file. CCDCamera.StartSequence ( [ SequenceName ] ) simply starts that previously saved file.

    http://www.cyanogen.com/help/maximdl/StartSequence.htm

    Attached is a sample *.seq file, you can open it with a text editor to view the contents.
     

    Attached Files:

  3. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Misunderstood the start sequence command. Not what I was looking for.

    I'll simply loop around the MaxCam.expose until I get the number I want.

    One other weird problem I'm having with the STX/SGFW/AO is that MaximDL will randomly disconnect from the STX. I'm still working with 5.24. It will sit there connected and after a couple of minutes disconnect and give the "ding dong" sound. Sometimes it will disconnect in the middle of a repeated looped series of exposures after two or three looped series. I've gotten around the problem by forcing a disconnect after a single or looped series of exposures.

    Have you seen this problem before? I don't see this problem with CCDSoft or SkyX Addon so I'm confident that the hardware is intact.
     
  4. Tim

    Tim Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    1,712
    I have not heard of this disconnect behavior before. Is there anything logged in the log files in MaxIm?

    If you simply click the "Connect" button, does it reconnect, or do you need to power cycle the hardware?
     
  5. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    No the camera isn't locked up. You can simply hit expose on the script or reconnect manually via Maxim and start taking images. Another really weird thing I'm seeing is that if you don't set a delay between things such as image sub frame settings and even binX and binY settings the .expose command simply ignores the new setting and uses the last setting.. Putting in a 1ooo millisecond delay fixes the problem. Never seen anything like this. Something really unusual is happening when Maxim sets the properties before actually taking the exposure.
     
  6. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Adam,

    I stripped it down to the basics of .binX, .binY and .expose and it worked without any delays. When I do use additional features such as subframes the script doesn't work without the delays. I've got it working right now with the delays so I'll call it fixed for now and move on. I'll also give v6 a try. Thanks.. Fred
     
  7. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    776
    Location:
    Ottawa
    Fred,

    Ok. If you manage to come up with a simple script that reproduces the problem, we'd be happy to look at it.

    Cheers,
    -Adam
     
  8. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    I think the problem is that I'm not using the event mask to tell me when the filter wheel has stopped before taking an exposure. ie. Taking an exposure while the fw is not ready causes a disconnect. Need to revisit tomorrow.
     
  9. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Opened up Maxim 5.24 and connected manually to the STX. After several minutes Maxim disconnected from the STX for no reason. Here's the log:

    01:54:33*2 ____________ 2014-10-29 ____________
    01:54:33*1 MaxIm DL Version 5.24 started on FRED-PC
    01:54:42>6 Help, Help Topics
    02:02:59$3 Connected to camera 1 "SBIG w/ AO" (CCDPlugAO7.dll)
    02:02:59$3 Connected to guide chip of "SBIG w/ AO" (CCDPlugAO7.dll)
    02:02:59$3 Connected to filter wheel 1 "SBIG Universal" (CCDPlugSBIG.dll)
    02:15:00$3 Disconnected from filter wheel 1 "SBIG Universal"
    02:15:00$3 Disconnected from guide chip of "SBIG w/ AO"
    02:15:00$3 Disconnected from camera 1 "SBIG w/ AO"

    After the disconnect I reconnected manually and took a 1 sec sub.. Here's the follow on log:

    02:17:39$3 Connected to camera 1 "SBIG w/ AO" (CCDPlugAO7.dll)
    02:17:39$3 Connected to guide chip of "SBIG w/ AO" (CCDPlugAO7.dll)
    02:17:39$3 Connected to filter wheel 1 "SBIG Universal" (CCDPlugSBIG.dll)
    02:17:54*4 Started 1.000s 1119x845 exposure, binned 3x3, ROI (0, 0)
    02:17:55*4 Completed 1.000s 1119x845 exposure, binned 3x3, ROI (0, 0)
     
  10. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Just installed and tried v6 demo. Same thing happens. Here's the log file:

    02:39:53*2 ____________ 2014-10-29 ____________
    02:39:53*1 MaxIm DL Version 6.07 started on FRED-PC
    02:39:54$3 Connected to camera 1 "SBIG w/ AO" (CCDPlugAO7.dll)
    02:39:55$3 Connected to guide chip of "SBIG w/ AO" (CCDPlugAO7.dll)
    02:39:55*4 Started 1.000s 1119x845 exposure, binned 3x3, ROI (0, 0)
    02:39:56*4 Completed 1.000s 1119x845 exposure, binned 3x3, ROI (0, 0)
    02:40:04*4 Started 1.000s 1119x845 exposure, binned 3x3, ROI (0, 0)
    02:40:05*4 Completed 1.000s 1119x845 exposure, binned 3x3, ROI (0, 0)
    02:40:10$3 Disconnected from guide chip of "SBIG w/ AO"
    02:40:10$3 Disconnected from camera 1 "SBIG w/ AO"
    02:40:10*1 MaxIm DL Version 6.07 exited

    Here's the short VB COM/Script running within VS2012:

    Dim objMaximCam As New MaxIm.CCDCamera

    objMaximCam.LinkEnabled = True

    Dim xBin As Short
    Dim yBin As Short
    Dim Light As Short

    ' '**************** SET IMAGE BIN *************************************************
    If strImageBin = "1x1" Then
    xBin = 1
    yBin = 1
    End If

    If strImageBin = "2x2" Then
    xBin = 2
    yBin = 2
    End If

    If strImageBin = "3x3" Then
    xBin = 3
    yBin = 3
    End If

    objMaximCam.BinX = xBin
    objMaximCam.BinY = yBin

    ' '****************** SET IMAGE TYPE **************************************************

    If strImageType = "Dark" Then
    Light = 0
    End If

    If strImageType = "Light" Then
    Light = 1
    End If

    If strImageType = "Bias" Then
    Light = 1
    End If

    If strImageType = "Flat" Then
    Light = 1
    End If

    '***********Set Zero Exposure Length for Bias Frames ************************************************************************

    If strImageType = "Bias" Then
    dblImageExposureTime = 0
    End If

    '********Zero Based Filter Index **********************************************************

    shortFilterSlotNumber = shortFilterSlotNumber - 1

    '************** SINGLE IMAGE ***************************
    objMaximCam.Expose(dblImageExposureTime, Light, shortFilterSlotNumber)


    Note that the v5 disconnect above happened from a manual run of Maxim v5.24. The v6 disconnect above happened from the pasted script running in VB VS2012. I took two images and Maxim v6 disconnected after the second image.
     
  11. Adam Robichaud

    Adam Robichaud Staff Member

    Joined:
    Sep 29, 2014
    Messages:
    776
    Location:
    Ottawa
    Hi Fred,

    Can you send me an SBIG Driver log that captures a disconnect? If it's happening in versions 5 and 6 of MaxIm DL, then I'd like to know what's going on under the hood.

    Cheers,
    -Adam
     
  12. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Adam,

    I have both the Maxim v6 log and the sbig driver log. A disconnect happened here:

    15:56:27$3 Disconnected from guide chip of "SBIG w/ AO"
    15:56:28$3 Disconnected from camera 1 "SBIG w/ AO"

    The reconnect happened here when I hit another series of exposures from CCDBot:
    15:56:29$3 Connected to camera 1 "SBIG w/ AO" (CCDPlugAO7.dll)
    15:56:29$3 Connected to guide chip of "SBIG w/ AO" (CCDPlugAO7.dll)

    Also see the corrosponding SBIG driver log.

    I'd also like a little help writing a VB event handler for objMaximCam.EventMask = 8192. The event handler needs to handle the event by waiting for the event and then continuing on with the exposure. ie. The fw stops and the exposure begins.
     

    Attached Files:

  13. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    PS: The above disconnects had nothing to do with a fw change. I simply hit the take series exposure button a few times using the clear filter.
     
  14. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,965
    I'm afraid we can't provide free support for writing third-party programs, scripts, etc. There are all kinds of technical articles online that explain how to work with events.

    If you find a bug in the scripting interface then of course we would provide support for that.
     
  15. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Doug,

    So much for quid pro quo... I'm spending my time helping "You" figure out why "Your" SBIG cameras auto disconnect with "Your" v6 Maxim software. I've wasted at least 8 hours trying to figure out why your software auto disconnects. 8 hours I could have spent reading up and searching the web for a decent event handler example. BTW from what I know now a simple VB event handler example cant be more than 10 lines of vb code and take more than two minutes for you to crank out assuming you can't simply cut and paste an example which btw would be a nice addition to your help files.

    Business Philosophy: If Maxim v6 works with my 3rd party software I will support it and we will both benefit. As it stands right now I'm only going to support CCDSoft, SkyX add ons and my own native SBIG interface. This "we can't provide" attitude is the same attitude that the Santa Barbara boys had for many years and as you know lead to the eventual "disposal" of SBIG by AVI-Tech. Example: We don't give a rat's butt if it works with Maxim, CCDSoft, SoftX as long as it works with CCDOPS! Does this sound familiar to you?

    Side note question: Do I even need an event handler for the filter wheel? CCDSoft and Add-on's both wait for the fw to stop before starting the exposure. It isn't documented in your help file so I can't tell.

    Fred
     
  16. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,965
    We don't have an example just lying around.

    As I said, we're happy to help with technical problems with our software, but we can't help someone write or debug their software. And we're not here to teach people how to program. COM Automation is an industry-standard interface. I'm sure you can find an appropriate example on one of the popular programming web sites out there.

    Also you don't need to use events. AFAIK almost no one uses that feature. Most programs simply poll once a second or whatever.
     
  17. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    Don't want to argue, but... Who's helping who debug what?

    Your software (MaximDL v5 an v6) automatically, independently and randomly disconnects from "Your" SBIG camera and your helping me debug my software? Seriously?
     
  18. Fred Herrmann

    Fred Herrmann Cyanogen Customer

    Joined:
    Oct 11, 2014
    Messages:
    30
    What do I poll? I don't see a filter wheel property anywhere. The only thing I see related to the fw is the event I previously posted. Is there a MaxCAM.FilterWheelIdle property or anything remotely similar? Right now with the Auto-disconnects I can't tell if I need to check the status of the fw before the exposure.

    Do I need to check for an idle filter wheel before I use the MaxCAM.Expose? If so what other than the fw event do I use?
     
  19. Tim

    Tim Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    1,712
    The properties in MaxIm DL only set filter wheel position...it does not poll for details of the hardware.

    If you want to poll an ascom filter wheel, you need to refer to the ASCOM Developers page. If you want to poll the SBIG filter wheels, you need the SBIG SDK, which we will get to you.
     
  20. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,965
    I should add that some filter wheels don't report status back at all... you just have to wait the prescribed amount of time for them to finish turning. MaxIm DL plug-in drivers do this if needed.

    MaxIm DL will automatically wait for the filter wheel if it is still turning, or hasn't turned yet, when you go to start an exposure. You do not need to poll for that. Just start the exposure and then poll for the exposure finishing.
     

Share This Page