Results 1 to 2 of 2

Hybrid View

  1. #1

    Default ACP Weather Script for LESVEDOMENET driver with implementation of power off telescope

    Hello,

    Script to shutdown power to the telescope upon Weather alert when using LesveDomeNet driver as a Dome Driver:
    Hopefully this will save someone else the time of finding the solution himself. Good luck with it:


    Complete script of ACP Weather.vbs

    '
    ' Standard ACP Weather Safety script. Please see ACP Help, Customizing ACP,
    ' Adding to ACP's Logic, Weather Safety Script. If you have a real dome Or
    ' if the scope can clear your roll-off roof under all conditions, then
    ' you can adjust this so that the dome/roof closes right away.
    '
    ' NOTE: This assumes tht you have the ACP Dome Control option "Close and
    ' park/home [dome] AFTER scope is parked by script" ON/Set.
    '
    ' NOTE: To have your safe roof or real dome close right away, turn OFF the
    ' above option and uncomment the indicated line for opening the dome
    '
    Sub Main()
    Dim FMX

    Console.PrintLine "Weather Safety Script"

    On Error Resume Next ' Best efforts...
    '
    ' FOR SAFE DOME/ROOF - See the two NOTEs above, then
    ' Uncomment next 4 lines after turning option in ACP OFF
    '
    ' If Dome.ScopeClearsClosedDome Then
    ' Console.PrintLine "Closing roof/shutter."
    ' Dome.CloseShutter ' Harmless if no dome/roof
    ' End If

    If Prefs.AutoFocus.Enabled Then
    If Prefs.AutoFocus.UsePWI Then
    Console.PrintLine "Halting PWI AutoFocus (if needed)"
    Set PWAF = CreateObject("PlaneWave.AutoFocus")
    PWAF.StopAutofocus
    Else
    Console.PrintLine "Checking on FocusMax"
    Set FMX = CreateObject("FocusMax.FocusControl")
    If FMX.FocusAsyncStatus = -1 Then ' If FMx is actually doing something, stop it
    Console.PrintLine "Halting FocusMax operation"
    FMX.Halt
    End If
    Set FMX = Nothing
    End If
    Util.WaitForMilliseconds 1000
    End If

    If Telescope.Connected Then
    Console.PrintLine "Parking scope"
    Telescope.Park ' Default setting in ACP, this parks and closes the dome/roof in that order
    if Telescope.Connected Then
    Console.PrintLine "Disconnecting Scope"
    Telescope.Connected = false
    End If


    driverID = "ASCOM.LesveDomeNet.Switch"
    set o = CreateObject(driverID)
    o.Connected = true

    o.SetSwitch 1, false
    o.Connected = false
    Console.PrintLine("Power is now off")

    End If

    Console.PrintLine "Script complete"
    End Sub

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    29,376

    Default

    thank you!!!
    -- Bob

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. All-Sky Camera Implementation and Tiddler
    By Robert Capon in forum Add-Ons, Enhancements, and Helper Components
    Replies: 3
    Last Post: Jul 7, 2020, 00:53
  2. Using TheSky with ASCOM telescope driver
    By Tom Krajci in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 0
    Last Post: Jan 27, 2011, 19:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •