Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Location
    Strongsville, OH
    Posts
    1,548

    Default Park Rotator via UserActions

    Hi All,

    With my setup, I want my rotator to be parked in a specific position when stored after a run. I thought using "UserActions" would be a perfect way to do this. When the #shutdown directive is envoked in a Plan and UserActions-template.wsc is registered, you have a choice of either replacing ACP's shutdown process completely or just adding some actions to be completed first before ACP continues on with its normal shutdown process. Since all I want to do is park the rotator in a specific position, I have written it such that ACP continues to complete its shutdown process after parking the rotator. The code is conceptionally simple, but the syntax is a bit tricky to get right - at least for me. To use, just add this code to UserActions-template.wsc in the Shutdown() section:

    Code:
    Function Shutdown()
        Util.Console.PrintLine "  [useraction] Shutdown called"
    'JRM mod - Park rotator in a specific position (Sky PA = 270 degrees)
        If Util.Script.SUP.HaveRotator Then
            Util.Console.PrintLine "  [useraction] Parking rotator..."
            Dim PA, RA
            If Util.GEMWestOfPier Then              ' StartRotateToPA() takes into account
                PA = 270 - 180                      ' which side the telescope is on with 
            Else                                    ' respect to the rotator's current
                PA = 270                            ' mechanical PA, so that needs to be
            End If                                  ' accounted for.
            RA = Util.ScriptTelescope.RightAscension
            Call Util.Script.SUP.StartRotateToPA(PA, RA)
            Call Util.Script.SUP.WaitForRotator
        End If
    'JRM mod end
        Shutdown = False                            ' Use built-in shutdown logic
    End Function
    For those with rotators, I hope you find this useful.

    Jim

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    30,768

    Default

    Very nice, Jim. Thanks for the "add on", and good work using the AcquireSupport library!!!!
    -- Bob

 

 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cable wrapping on Rotator (was: Help understanding rotator behavior)
    By Wesley D. Grimes in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 6
    Last Post: Sep 25, 2014, 17:18
  2. UserActions question
    By Lukas Demetz in forum Pre-Sales Technical Questions and Help
    Replies: 16
    Last Post: Jul 2, 2014, 17:59
  3. ACP Rotator Controller will not connect to my Pyxis 2" Rotator
    By fehner in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 6
    Last Post: Oct 1, 2011, 06:31

Posting Permissions

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