I’m trying to figure out a way to check for the end of the night and then perform the shutdown actions. Ideally I’d use a “DO IF current time >= astronomical night end time” however I don’t think this option is available.
The closest thing looks to be DO IF TIME BETWEEN however that would require the time be adjusted periodically.
I see there is Repeat Block Until Astronomical Night End but I’m not sure how I would use this option as the imaging loop in my script is made up of a number of blocks.
Has anyone already worked out a way to do this?
Alternately, would it be feasible to add an Element in the Decision-Operating Conditions to allow this approach?
I’ve had a look at that Perpetual example however I don’t think it performs a check for timing once the sequence commences - it has Wait Safe at the beginning of the sequence as far as I can tell - unless I misunderstand how the wait safe element works?
What’s your action before the shutdown? If it’s a imaging sequence, then natually “repeat until astronomical night” would work? You can specify which block (or a master block) to repeat by placing the repeating option in the corrsponding level.
The action before the shutdown will either be a sequence (there are 5 in the script) or a wait for target to reach elevation. I might need to do some re-arranging to use the existing options such as putting all the sequences under one main block rather than have 5 sequence blocks hanging off the main tree.
Thanks for the suggestions. I’ve done a bit of DragScript grouping and re-arranging and now think I have a solution. Will need to wait a while to test as it is going to be wet and cloudy here for a while.
Put all your sequence blocks in an outer block and do that block until. I have a block called SEQUENCES and in that block have SEQUENCE 1, SEQUENCE 2 etc. The SEQUENCES block is the the one that gets repeated until a set time or dawn or whatever.
I had an opportunity to test my all night dragscript last night. I have made the changes described above to use “Repeat Block Until Astronomical Night End” and put this at the end of a block “Sequences” that contained the five sequence blocks.
I can see in the log from last night that it refers to the “Repeat Until…” line in the drag script at various times during the night - there is reference to instruction 369 and it identifies the Astronomical Night End time limit as 3:51 am.
Last night it entered the final sequence block at 3:40 am and commenced imaging. It didn’t experience any issues that would cause it to stop until it finally reached the HA limit I’d set in the sequence at 4:41 am. This meant it continued imaging almost an hour past the Astronomical Night End time limit so my current logic is not achieving the outcome I was hoping.
I’ve been looking at some example DragScripts and wondered if I can use the Dragscript Sequence Option “Immediately Start and Finish With Astronomical Night” instead of “Start and End from Sequence” but still define Altitude and Hour Angle constraints within the Sequence Constraints tab?
Yeah that’s what I use. And outside the Sequence settings I don’t specify limits for the repeating; I let sequence constraints to determine that. You change the altitude and HA constraint in below.
And I also don’t set anything within the Sequence Constraint tab within Sequence settings, but only change things here in the DragScript.
I had a chance to try the Immediately Start and Finish With Astronomical Night option last night. I left the constraints in the sequence configuration Constraints Tab and it still seems to pick these up. That is the outcome I was hoping for as I want to specify the constraints individually for each target due to my variable local horizon (tree line). If I specified those limits in the DragScript I’d have to update them every time I updated the targets. With my current approach I just need to update the path to the target.