Quantcast
Channel: Main Sequence Software - Latest posts
Viewing all articles
Browse latest Browse all 52505

Scripting SGP

$
0
0

Buzz, I too have thought about doing some scripting to control SGP externally. My goal is to have a script that, given all the appropriate inputs, can automatically run an entire night's imaging from start to finish on a remote observatory.

Specific things that for me would be important are:
(1) Power up and connect to all equipment at the appropriate time, then power down and disconnect when done.
(2) Load 1 or more copies of SGP and open the assigned sequences.
(3) Open the dome at optimum time after sunset if conditions safe, close the dome when conditions unsafe, with just doing a Pause on any running sequences when either cloudy or unsafe. When safe conditions return, Resume each sequence. Close dome when all sequences are finished. I prefer the dome control to be done independently of SGP so that I have complete control of the dome.
(4) Start all sequences.
(5) Continuously monitor all sequences to make sure they are all running correctly. If a sequence fails, take appropriate corrective action. This could apply to a single process, such as restarting PHD2, or could be as extensive as a complete shutdown, followed by a complete restart of the system.

Implementing (5) would clearly be the biggest challenge, but should be doable. I have had occasional issues that this would solve. These include general dome control and hardware failures such as with my SBIG camera or filter wheel or PHD2. Solving these problems usually requires powering down then powering up and reconnecting the device and software, perhaps needing a restart of SGP, all of which can be done with a script engine.

There are many scripting engines to choose from. The two I have seriously looked at are PERL and particularly AutoIT Scripting.
https://www.autoitscript.com/site/autoit/

AutoIT appeals to me a lot. It supports the following essential elements for us:
---Simulate keystrokes and mouse movements
---Manipulate windows and processes
---Interact with all standard windows controls
This allows us to do anything we want with SGP without requiring anything of the SQP API.

Obviously this approach is far more challenging (and fragile) than a complete API based approach, but I don't think we have a choice. Just a choice in which scripting engine to use. We would want to use API calls where available.
Six other topics on this forum mentioned using AutoIT to do various things with SGP.

I would be happy to collaborate with you on this project and any others that might want to lend a hand.


Viewing all articles
Browse latest Browse all 52505

Trending Articles