Results 1 to 3 of 3

Hybrid View

  1. #1

    Default Turning on and off scopedome power relays during startup and shutdown

    I know there is a Dome object in ACP but it only has a limited set of methods.

    If I want to access the power relay capability built into the ScopeDome controller what's the best way to do this ? Everything is exposed via ASCOM see this link for a quick example - http://www.scopedome.com/en/ScopeDom...com-script.htm

    Basically I need a way to turn on the CCD and Scope relays during startup and power them off during shut down to save on electricity, and not run dew heaters unnecessarily.

    Can I do this by talking directly to the ASCOM object somehow without causing problems? What's the best way basically?

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    28,257

    Default

    Well, this is semi-bad news. What they did was add their own non-standard methods to the Dome object (which is for Domes/Roofs, not outlet control). It appears that they are rooted in the past:

    'Jacek Pala
    '2009 Słupsk
    'ScopeDomeUSB Driver
    '-------------------------
    'Driver implements all standard ASCOM 5.0a platform dome commands

    I believe that 10 years ago was about when the ASCOM Switch standard was released. I'm betting that they have not checked their controller against the Dome standard using the Conform tool either. The right way to have done this would have been to expose a separate ASCOM Switch device for the outlets. Then ACP would be able to use it very easily as there is already code in the sample startup/shutdown scripts:

    Code:
    //// Turn on a switch using the ASCOM switch driver
    // Errors are fatal to the script, right?
    //
    function TurnOnPower(switchNumber, switchName)
    {
        if (SWT === null) {
            SWT = new ActiveXObject(SWID);
            if (!SWT.Connected) SWT.Connected = true;
        }
        if(!SWT.GetSwitch(switchNumber)) {
            SWT.SetSwitch(switchNumber, true);
            Console.PrintLine("...powered on " + switchName);
        } else {
            Console.PrintLine("..." + switchName + " already powered up");        
        }
    }
    This is universal code that works with any device that uses this standard interface. You might be able to use their non-standard calls from the startup/shutdown scripts. but only if their control system allows more than one connection to their Dome interface. You can try it. In Javascript (used in the startup/shutdown scripts)

    var dome = new ActiveXObject("Ascom.ScopeDomeUSBDome.Dome");
    dome.Connected = true;
    dome.Light = true;
    dome.CCD = true;
    dome.FAN = true;
    dome.Scope = true;

    I would leave Connected = true. On shutdown you'll probably need to experiment since this is a non-standard setup. It might be ok to set it false or leave it true. It really makes me uncomfortable to encounter things like this and being the bearer of bad news. I will set a reminder to contact these folks on yor behalf when I get back from the SAS Conference.


    -- Bob

  3. #3

    Default

    Edit: Hopefully this doesn't drag up an old thread, but I wanted to leave a breadcrumb and put in what I've learned for anyone else with a ScopeDome.

    There are two ways to work with the dome... if you're in javascript etc then you can do things like this...
    Code:
    var dome = new ActiveXObject(“ASCOM.ScopeDomeUSBDome.DomeLS”); 
    
    humidity = dome.commandString(“Humidity_Humidity_Sensor”);
    temp = dome.commandString(“Temperature_Humidity_Sensor”);
    If you are doing it on the command line then you can do this...

    Code:
    LightCtrlProgram      C:\ScopeDome\Driver_LS\ASCOM.ScopeDomeUSBDome.exe
    LightOnCommand        Rel_Light_On      ; Command string to turn light on and set/change brightness
    LightOffCommand       Rel_Light_Off     ; Command string to turn light off
    In a command window you just do

    C:\ScopeDome\Driver_LS\ASCOM.ScopeDomeUSBDome.exe ?

    To get a full list of commands ... some will report back values, some will turn on and off relays etc.
    Last edited by James Pierce; Apr 4, 2020 at 00:30.

 

 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ScopeDome slaving vs ACP dome slaving and scheduler Shutdown
    By Shai Kaspi in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 5
    Last Post: Dec 8, 2015, 18:32
  2. Will ACP tolerate mount power being turning off for safety?
    By Barry Megdal in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 5
    Last Post: Mar 17, 2014, 14:39

Posting Permissions

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