Running a script at the beginning of a sequence

Is there any provision for running a script at the beginning of a sequence?

I know about running a script at the end of a sequence (works well, thanks), and about scripts run before or after indivudual events, but I can’t find anywhere to run one when a sequence starts. It would make automating power-on functions possible.

I guess that’s a “no” then. Bummer.

Would running a script that finishes by starting SGP help?

In general, we are anti-script (with respect to SGPro). A need for them can often mean that SGPro is not supporting something that can make sessions easier (and people will not complain if there is a work-around). That said, we do understand that some rigs have peculiarities and can benefit from custom commands (that we have no intent on supporting).

So… you are correct. We have not added any provision to run a script prior to equipment connecting (I know this won’t help you, but if people have needed this in the past it has not been to facilitate connection and, as a result, they have been able to place the script prior to the first event).

We are not necessarily opposed to it, but it is work to add it (the code is pretty easy… then the UI, then testing frameworks, then testing, then docs).

What kind of power system are you using? Just curious…

This seems like a good idea (at least you wouldn’t have to wait on us to get what you need).

That’s a workaround I had considered, but it would only work if there was a way to auto-load and auto-start a sequence when SGP starts.

It’s a home-built system that combines dome control and power control. My ASCOM driver is working well, but the VB.Net ASCOM kit does not allow the driver to be shared by multiple applications. If I use SGP for running the dome, then I can’t use the power functions at all. My own app will handle all the dome and power functions (including dome azimuth sync), but it doesn’t know when to open the dome for SGP. A startup script would have allowed SGP to tell my app when to open the dome.

I tried using a hub to allow two apps to connect at once, but both the POTH hub and the Generic Hub cause errors in SGP, and neither one supports the ExecuteCommand ASCOM function necessary for control of the power hardware. I have downloaded another hub from Optec to see if that will do the job, but have not had an opportunity to test it yet.

ExecuteCommand function? What’s that? CommandString or Action? Have you hooked the power control into your scope driver?

There is a Switch interface defined to handle switches. One use is for power control. Don’t know if that will help but it may give a way to separate scope and power control.

D’oh, sorry. I meant CommandString. (It’s been a while since I was in the innards of the software.)

Logically, probably it would have made more sense to have a separate Switch driver for the power relays. But, since the dome relays and the power relays share a single piece of interface hardware, it is difficult to get two drivers to share the same hardware.

ASCOM provides the Local Server template to allow this, and also to allow multiple connections to a single driver. It makes the development a bit more complex but it can be done.