Clarification on Notify event usage

Discussion in 'Scripting and Programming' started by Richard Gray, Jun 30, 2015.

  1. Richard Gray

    Richard Gray Standard User

    Nov 29, 2014

    I am writing a script to take a series of guided images. At minimum I want to check to see whether the guider is still on the guide star before taking an image in the sequence. I understand (I think) that I must set the EventMask to 512 (ceGuiderExposureStarFaded) and then call CCD_CameraNotify with a syntax like:

    Dim event = 0


    and then check to see if event = 9 (indicating the star has faded). Is that correct? I have two questions: 1) The documentation for CameraNotify emphasizes that "When the notify event is called, it is important to return control to MaximDL as quickly as possible". I am unclear what that means. Presumably one calls CCD_CameraNotify and then it immediately returns with a value for event. How otherwise does one return control to MaximDL? Or perhaps I am not understanding how this function is used. An example script using CameraNotify would be very helpful. 2) Is there anyway to use CCD_CameraNotify to tell me, mid exposure, if the guide star has faded?

    Thanks, Richard Gray
  2. Jimmy Savarese

    Jimmy Savarese Cyanogen Customer

    Jun 4, 2018
    Richard, I have the same question. Except I think you have to create a function or subroutine called CCD_CameraNotify(). You define Event as the parameter.

    Sub CCD_CameraNotify(Event)
    if Event = 9 then wscript.echo "Star Faded"
    End Sub

    I think it works something like that, but not sure. In order for this sub to be called if the event occurs, you first have to set up the mask to limit or allow particular events to trigger the sub.

    I think that is how this works but found your question while looking for the same answer you are. I need clarification that this is the right approach.

    When they discuss returning control quickly, I think they mean to keep your subroutine to a minimum because the other functions of Maxim, your autoguiding etc, are on hold until your sub completes whatever it's doing. Probably only need to check which event occurred and pass that information back to your main script. Keep it short.

    Anyway, I'm working at the moment, but when I get off tonight, I'm going to test this concept and if I have any success, I'll try and remember to let you know.

Share This Page