When to "enable events" in dragscript

Hi,
My partner and I run a scope in a remote observatory hosting facility. We have been using dragscript for a year without problems. However, we wait for the roof to be open before we start drag script manually. The roof control has a one line protocol to indicate if it is open or closed. We have this configured in the safety monitor. Open is safe, closed is unsafe. The scope does not interfere with the roof and can be in any position when the roof closes due to bad weather.
Our drag script runs through the normal wait safe conditions but we do not want to start cooling the camera until the roof is open as the observatory gets rather hot in summer and the camera will not cool down sufficiently until the roof is open. However, we want to start the script at any point or run it perpetually, which we have not done yet. We would like the script to run but wait for the roof to be open before cooling the camera.
So, my question is, when would you “enable events” in the script. I have found that if the equipment is “not connected” and you enable events prior to connection dragscript returns an error and dragscript exits. So it seems that in order to use “enable events” the setup has to be connected. However, we do not want to begin cooling the camera until the roof is open which could be anytime depending upon the weather. We have no control over the roof. Right now I have put “enable events” in the connect setup block after a successful setup connection and just prior to the camera cooldown block with a short delay.
My thought is that once the setup is connected successfully, then it’s time to determine if the roof is open or closed, safe or unsafe. If roof is closed then I would assume dragscript would go into the emergency suspend mode until the safety monitor shows safe (roof open) at which time the dragscript would continue to the camera cool down block. Alternatively the script will just go the end of night operations at end of astronomical night if the roof never opens.

Ive attached a copy of our dragscript in .vos and pdf. Feel free to suggest where you would put “connect safety monitor” or “enable events” or any other changes you would make.Scheduler_DR350_-5C.chg.vos (222.2 KB)
Scheduler_DR350_-5C.pdf (30.8 KB)

I think the answer is using the Perpetual official dragscript or look it inside and find inspiration
https://wiki.starkeeper.it/index.php/DragScript_Examples#Perpetual_Script_H24.2F7Days

Hi Leo,
Yes I have looked at the perpetual script and it has enable event after cooling. I guess my thought of putting enable events prior to cooling is the way to go after connect setup for our setup.

I do have a question of where to put “run dragscript” for perpetual use. It seems in the example of the perpetual script it’s called at the end in the block “RESTART SCRIPT EMEXIT” Is that correct?

if you read the dragscript perpetual carefully and attentively you will see that without wait safe you cannot move forward and that once you have obtained the ok for the wait safe the events are disabled until the roof opens and that the start-up and cooling operations are considered non-interruptible and the mount is parked. at the end the roof is opened and then the events are enabled. Furthermore the final cooling operations are in async mode and do not wait… all this makes the startup operations very fast.

Finally the wait safe also waits for the safe monitor so I do not see any problems in using the logic of the perpetual as many others do in your hosting conditions : in your case what is different is that the roof is opened so you must startup as fast as possible (use async cooling for pre cooling and final cooling) and after enable the events.

So I do something similar to what you are trying to do, I open the roof 30 min before Dusk to cool everything down but I don’t enable events at the start - I wait until later (since my roof will close anyway independent of Voyager I am not worried about events being enabled until later in the script). This helps avoid my settings in the Weather tab from suspending the script.

So first I connect equipment, then engage my cooling fan on the telescope, close the flat device cover, stop tracking and park the telescope just in case it isn’t already, then wait dusk 30 min before and open the shutter when dark enough (I wait till it is dark enough to avoid going into suspend mode and shutting the shutter automatically - I don’t disable that since I want to make sure if the scope doesn’t park before it gets light, I want it to through the safety), then unpark and cool the camera.

Then I enable events - I wait until Nautical Night 40 min before and start focus and guiding. Then go into Robo Target.

At the end I park the scope and do my session end Flats. My script is simple and I repeat some things purposely - by no means am I good at it - but I will attached it for your reference. You can at least see what I am doing for sure. Best of luck.

Butler_StartToShutdown_Script.pdf (121.3 KB)

Generally:

  • do not open the roof with events disabled
  • if you want to avoid light events you can disable the lights events in weather system using the dragscript

Great feedback - I am personally not concerned about disabling the events since my equipment works independently from Voyager, but absolutely in most cases having the events enabled is the right approach. I will need to check out the ability to disable and reenable the light event. Thanks