Results 1 to 5 of 5
  1. #1

    Default Anyone have experience scripting the M1 OASYS Live interface?

    I would like to have a script run at the start of an imaging session that will turn power on to the mount as well asa the focuser and camera (two switches) and then wait a period to allow them to be ready and then go through the connecting and roof opening normal ACP activities. I would like the reverse to happen at shut down. Does anyone have any experience scripting for the M1 OASYS ssystem? Can such a script be called by ACP prior to starting all its activities? As you might guess I am completely new to ACP.

    Chris A
    Chris A.
    Dark Horse Observatory
    Kimberton, PA

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

    Default

    Hi Chris -- There are a number of people here using M1 OASYS. ACP itself doesn't have the scheduling for startup and shutdown scripts, though you can certainly run a startup script in ACP's console yourself (and it's convenient due to the astro-objects are are already in the namespace of the scripting engines). For a hands-off experience, after running ACP for a while, consider ACP Expert (with scheduler). It will automatically start up and shut down using scripts.

    I don't know the M1 OASYS scripting objects, nor do I know if you can write in Javascript. I changed the topic to have M1 OASYS instead of just M1 to hopefully catch the eye of others.
    -- Bob

  3. #3

    Default

    Bob,

    Thanks for your help. I'll wait and see if anyone replies.



    Sent from my iPhone using Tapatalk
    Chris A.
    Dark Horse Observatory
    Kimberton, PA

  4. #4
    Join Date
    Jun 2009
    Posts
    165

    Default

    The M1OASYS Help file has a section on scripting. It works fine to create instances of , for example, the M1OASYS Dome object and call its methods.

    - Barry

  5. #5
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,941

    Default

    If you are looking to script the roof, I do know that there is an ASCOM standard Dome object (something like "M1OASYS.Dome") that would have all of the standard calls for the ASCOM Dome Standard. That standard interface is documented in the end-user ASCOM Platform (Start menu, All Programs, ASCOM Platform 6, Help and Device Interface Standards.



    So to open the roof, e.g.,

    Code:
    var roof = new ActiveXObject("M1OASYS.Dome");  // <- The ID is a guess
    roof.Connected = true;
    roof.OpenShutter();
    at this point you should wait for roof.ShutterStatus to become 0 (shutterOpen). Waiting needs some sort of sleep or wait function and this depends on whether you are running the script in the ACP Console (Util.WaitForMilliseconds(xxx) or under the Windows shell (WScript.Sleep(xxx).

    Code:
    while (roof.ShutterStatus !== 0) {  // Yes, in Javascript the extra = is for "real" 0
        wait statement for 500 ms
    }
    Finally, to be really robust you need to check for ShutterStatus = 4 (shutterError) in the loop. Failure to do so will result in an infinite loop if the roof encounters a problem while opening. The ShutterStatus will never become 0. Once again, printing something out depends on whether you are running in ACP's console (Console.PrintLine("xxx") or the windows shell (Wscript.Echo("xxx")

    Code:
    while (roof.ShutterStatus !== 0) {  // Yes, in Javascript the extra = is for "real" 0
        if (roof.ShutterStatus == 4) {
            PrintStatement("Shutter error. Aborted")
            break;
        }
        else {
            wait statement for 500 ms
        } 
    }
    -- Bob

 

 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [solved: latest driver] M1 Oasys Disconnect Problem
    By Brian Perry in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 12
    Last Post: Nov 4, 2014, 17:14
  2. Anyone have experience with the Planewave Ascension 200HR
    By Peter Prendergast in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 1
    Last Post: May 31, 2014, 17:51
  3. Some basic questions that I live by to run
    By Dean Salman in forum Pre-Sales Technical Questions and Help
    Replies: 5
    Last Post: May 28, 2014, 20:40
  4. Experience With Astrohaven?
    By joshwalawender in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 1
    Last Post: Sep 17, 2009, 13:38
  5. Live reconstruction of Apollo 11
    By Bob Denny in forum General Astronomy-Related
    Replies: 1
    Last Post: Jul 22, 2009, 08:11

Posting Permissions

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