End of sequence scripting

Currently SGP allows a script to be executed at sequence end. However, that script is run BEFORE the ASCOM equipment is disconnected. It would be nice if there was a check box that said to run the script AFTER all the other end of sequence tasks are performed so that the script could do tasks like turn off power to equipment and perform other observatory management tasks. There are a lot of observatory devices that don’t have ASCOM interfaces but do have command line interfaces that are suitable for scripting.

Charlie

Yes, that would indeed be a useful purpose for these scripts. Alternatively this can in time perhaps be accomplished with the new switch functionality that is being developed in SGP4.

I have resolved these issues with two PowerShell scripts. One launched at the start of session where I enter the time when all equipment needs to be powered off. This is usually some time after SGP is scheduled to end the sequence and has had time to warm the camera and disconnect from all equipment.

The first script will then use Windows Task Scheduler to schedule execution of the second script at the desired time. The second script will then communicate with my switch (Pegasus Astro UPBv2) to power off all equipment.

I would also like to see an option of also running script after equipment disconnect, it was already discussed in the past (like here End of sequence scripts - #7 by Ken).

My solution is to run a custom commandline program, called by the script, that makes a 5 min pause before turning everyhing off, so that the camera has time to warm up and disconnect in SGP. I think you can do the same with a script, using the sleep command discussed in the thread above. But I think you need to setup two scripts, one that calls your shutdown script with the pause and the actual shot down script, as SGP executes the script synchronously and wont continue before the script gives back control. I haven’t tested this though.

Mikael