Page 1 of 1

ASCOM Commands

Posted: Fri Feb 19, 2021 8:19 pm
by clwas1
Do you have or can you publish the ASCOM commands I can use to control the On/Off power switches, initiate a connection, etc. plus examples? I am looking to turn on and off one of the four power outlets from ACP in a JavaScript.

Thanks.

Re: ASCOM Commands

Posted: Fri Mar 12, 2021 1:48 pm
by clwas1
I have figured out the scripting for anyone who is interested.

function main()
{
var Pegasus = new ActiveXObject("ASCOM.pegasus_upb.Switch");
Console.PrintLine("Pegasus variable set..." );


Pegasus.Connected = true;
Console.PrintLine("Pegasus Connected..." );
Pegasus.SetSwitch(2, true); // Switch # starts at 0
Console.PrintLine("Switch #3 On..." );

Util.WaitForMilliseconds(10000); // Pause 10 seconds
Pegasus.SetSwitch(2, false);
Console.PrintLine("Switch #3 Off..." );


Pegasus.Connected = false;
Console.PrintLine("Pegasus Disconnected..." );

}

Thanks.

Re: ASCOM Commands

Posted: Fri Nov 12, 2021 3:25 pm
by johnakers
Can you provide more advance level commands.