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:

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.