Results 1 to 2 of 2
  1. #1

    Default Pegasus Ultimate PB v.2 Switching Pattern and Guidelines .... See Attached

    Name:  Pegasus[2666].jpg
Views: 694
Size:  303.4 KB


    The switch order/pattern numbering system for the Pegasus Ultimate Powerbox v.2 is certainly not intuitive. I discovered the layout by trial and error. I hope I submitted my attachment properly) in which I marked up the switch numbers. I tested each number so it is verified. I hope you find the attachment helpful.

    Below is cut-and-past from my StartupObs.js. My StarupObs file has been tested and works fine and the Pegasus opening and switching occurs without a hitch.) Below Ihighlighted the specific changes that relate to opening the Pegasus software and the turning ON of some switches of the UPBv.2 I personally needed. Similar (but "opposite" code was included in my ShutdownObs.js file. Essentially my "true" became "false"

    Code:
    // ...
    // Bob Denny 27-Mar-2017 GEM:1533 Support multiple NetBooter power strips.
    //------------------------------------------------------------------------------
    
    
    var Pegasus = new ActiveXObject("ASCOM.pegasus_upb.Switch"); //this is utilitzing the ASCOM Pegasus ID
    var FSO; // FileSystemObject used in several functions
    var SWID = "ASCOM.DigitalLoggers.Switch"; // ID of power switch driver (e.g. DigitalLoggers)
    var SWT = null; // [sentinel] ASCOM Switch driver
    
    
    function main()
    {
        var i;
        
        FSO = new ActiveXObject("Scripting.FileSystemObject");
        
        Console.LogFile = Prefs.LocalUser.DefaultLogDir + "\\Scheduler\\StartupObs-" +
        Util.FormatVar(new Date().getVarDate(), "yyyymmdd") + "@" +
        Util.FormatVar(new Date().getVarDate(), "HhNnSs") + ".log";
        Console.Logging = true;
        
        // =====================================================
        // HERE IS WHERE YOU ADD CODE TO TURN POWER ON AS NEEDED
        // =====================================================
        
        Console.PrintLine("Starting Ultimate Power Box"); //Starting the Pegasus Software. Make sure in Config Tab that you
        if(!StartProgram("C:\\Program Files (x86)\\Pegasus Astro\\Ultimate Powerbox v2\\UPB.exe",1))
        {                                                 //check the box "autoconnect to device" under During Startup section
            Console.PrintLine("**Failed to start Pegasus");
            throw new Error(0x80040001, "==== Startup failed, cannot continue");
        }
        Pegasus.Connected = true; //Some Switches I personally need to be ON
        Console.PrintLine("Pegasus is Connected......");
        Pegasus.SetSwitch(0, true);
        Console.PrintLine("Gemini Power is ON......");
        Pegasus.SetSwitch(2, true);
        Console.PrintLine("Camera Power is ON......");
        Pegasus.SetSwitch(8, true);
        Console.PrintLine("Camera is Connected......");
        Pegasus.SetSwitch(11, true);
        Console.PrintLine("FlipFlat is Connected......");
        Pegasus.SetSwitch(12, true);
        Console.PrintLine("UltraStar is Connected......");
        
        // ================================================================== 
        // Just continuation of the rest of my StartUp script
        // CHANGE PATHS TO PROGRAMS AS NEEDED AND ADD OTHER PROGRAMS YOU NEED
        // ==================================================================
        
        Console.PrintLine("Starting support programs as needed");
        if(!StartProgram("C:\\Program Files (x86)\\Diffraction Limited\\MaxIm DL 6\\MaxIm_DL.exe", 1)) 
        {
            Console.PrintLine("**Failed to start MaxIm");
            throw new Error(0x80040001, "==== Startup failed, cannot continue"); // the rest is not Pegasus related
        }
    // ...
    }
    Last edited by Bob Denny; Jun 21, 2021 at 18:30. Reason: Reformat for clarity, use color theme-independent highlighting [rbd]

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,784

    Default

    Howard thank you so much!!! This is a proper "application note" so I cleaned it up a bit (formatting only) and have moved it to the Application Notes - Technology, Performance, and Capabilities section. BRAVO!!
    -- Bob

 

 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Startup failure I think, log attached
    By Peter Prendergast in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 1
    Last Post: Jan 24, 2014, 11:22

Posting Permissions

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