Dome Shutdown Script

I have a dome that is controlled by MaxDomeII software. I am looking for a script that will home the dome and close the shutter when the sequence finishes. I am not comfortable writing scrips and would appreciate any information where I may obtain one. Any help would be greatly appreciated.


have you checked out the dome commands in SGP’s control panel?
If not, I could suggest something in Visual Basic

Thank you for responding to my posting. Yes I have reviewed the SGP’s observatory options, however, I would appreciate reviewing the Visual Basic script you mentioned.

Thanks for any assistance you can provide.



I will give it some thought over the weekend.

Can you give me some ideas of what you expect to happen, especially considering safety considerations - can you get collisions? I have a ROR, so I am unfamiliar with rotating domes to a large extent.

I have a Scopedome which closes and homes after a sequence is completed, by SGP. This has never failed. The settings ar e there.

arie may have answered the question already. The issue is not the scripting per see but the logic you want to happen. For example, the following is a script to open my ROR and home the mount. The structures are there and other commands can be quickly looked up on the ASCOM website. The key is to know what you want to happen and when, for every circumstance.

’ Script to home mount if roof has opened

’ Create telescope object
Set scope = CreateObject(“ASCOM.SoftwareBisque.Telescope”)

’ Create Dome object
Set dome = CreateObject(“ASCOM.DeviceHub.Dome”)

’ Connect to the objects
If Not scope.connected Then
scope.connected = True
End If

If Not dome.connected Then
dome.connected = True
End If

'only if both connected proceed
If scope.connected And dome.connected Then
If dome.shutterstatus = 0 Then 'shutter is open
End If
End If
scope.connected = False
dome.connected = False

Thanks for the example dome control script. This is exactly what I needed. It will require a little modification to do exactly what I want, but, it is a good starting part. Thanks again.

The trick is to know your various ASCOM device IDs and consider the logic of what should happen and the failure modes… for instance, my roof will not move unless the mount is parked and of the failure modes collision vs. wet, I choose wet.