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