Results 1 to 2 of 2
  1. #1

    Default Flip-Flat Control

    Hi Guys,

    I have been fooling around to get my Flip-Flap to open and close via the ACP script console. My aim is to have it open at plan start and close at plan end. Eventually get it automated to do all my flats. One step at a time though.

    Below is some code I have re-used to simply open and close the flip flat. i know there are a few people out there using these, so i would be interested to hear your work-arounds.

    You can control the Flip-Flat via the command line, and you will need to download the latest software from the alnitak site first.
    P.S. Don't have the Flip-Flat OEM software running while doing this, it will not work!

    Just save these javascripts in c:\program files\acp obs control\scripts, then run them via the ACP script console on the host machine.

    You will need to change the path name if different of the alnitak software in the scripts, just use a text editor.

    Hope some of you find it useful.

    function FlipFlatOpen()
    {
    var tid = Util.ShellExec("C:/program files/alnitak astrosystems/alnitak astrosystems controller/aacmd.exe", "4 o s");
    var i;
    for(i = 0; i < 20; i++) { // Wait up to 20 sec
    if(!Util.IsTaskActive(tid)) break;
    Util.WaitForMilliseconds(1000); // Wait 1 sec here
    }
    if(i >= 20) // Wait failed?
    throw "**failed to exit in 20 sec.";
    if(Util.GetTaskExitStatus(tid) !== 0) // Exited with failure status?
    throw "**program exited with error status.";
    Console.PrintLine("Flip Flat Open...");
    }

    function FlipFlatClose()
    {
    var tid = Util.ShellExec("C:/program files/alnitak astrosystems/alnitak astrosystems controller/aacmd.exe", "4 c s");
    var i;
    for(i = 0; i < 20; i++) { // Wait up to 20 sec
    if(!Util.IsTaskActive(tid)) break;
    Util.WaitForMilliseconds(1000); // Wait 1 sec here
    }
    if(i >= 20) // Wait failed?
    throw "**failed to exit in 20 sec.";
    if(Util.GetTaskExitStatus(tid) !== 0) // Exited with failure status?
    throw "**program exited with error status.";
    Console.PrintLine("Flip Flat Closed...");
    }


    Cheers
    Mark

  2. #2

    Default

    P.S. The "4" in line 3 of the code represents the port number your Flip-Flat is using.

    Forgot to mention that part, sorry!

 

 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Alnitak Flip Flat and Maxim DL
    By Joel Hatfield in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 5
    Last Post: Aug 8, 2013, 20:16

Posting Permissions

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