Hi -- I moved the script into a file and attached it. In the future could you also attach scripts. Pasting without [code] tags destroys the indentation. And even with [code] it is hard to read with a huge script in the middle of the "heart" of the message :-)
- Is there known issues with ASCOM with the domes (I am using V6.2)?
6.2? Do you mean ACP 6.2? There is no ACP 6.2. There is a 6.0 from 2011 and a 7.2 from 2014... I reviewed all changes related to "Dome" since 2011 and cannot find any changes of basic functionality ir bug fixes. There was a safety fix in 2011 relating so rotating with the shutter closed and geometry for non-flipping German mount. No known "big problems" and many people are running with various domes.
I believe the part that is having problems is this (which I reformatted since it was squashed by unformatted paste):
Code:
// ================================================== ================
// THEN WE CAN OPEN DOME SHUTTER
// ================================================== ================
try {
Console.PrintLine("Send command: OPEN DOME SHUTTER.");
MyOpenShutter();
} catch(ex) {
Console.PrintLine("**Failed to open the Dome Shutter");
throw new Error(0x80040001, "==== Cannot continue");
}
Which calls this ( I did my best to restore the indentation so that I can understand it):
Code:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// To open the dome shutter
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function MyOpenShutter()
{
if(Dome.Available && Dome.CanSetShutter)
{
if(Dome.ShutterStatus == 1) // 1 = shutterClosed
{
Console.PrintLine(" Opening dome shutter");
Dome.OpenShutter();
Util.WaitForMilliseconds(15000);
for(var i = 0; i < 6; i++) // Wait for up to 1 minute
{
if(Dome.ShutterStatus == 0)
{
Console.PrintLine(" Shutter now open.");
break;
}
else if(Dome.ShutterStatus == 4)
Console.PrintLine(" ?? Shutter error being reported, still waiting for open ??");
Util.WaitForMilliseconds(10000); // Check every 10 seconds
}
if(i >= 6)
{
Console.PrintLine("** #domeopen - Shutter failed to open after 1 minute");
return false;
}
}
else if(Dome.ShutterStatus == 0) { // 0 = shutterOpen
Console.PrintLine(" Shutter already open.");
} else { // Some other (bad) status
Console.PrintLine("** #domeopen - Unexpected shutter status " + Dome.ShutterStatus);
return false;
}
}
}
The way the dome is supposed to work per the ASCOM specification is
- Program (your script through ACP) calls Dome.OpenShutter(). If it returns without throwing an error, then ACP assumes that it has succeeded in starting the shutter opening.
- Dome must immediately show ShutterStatus = ShutterOpening, and continue to report ShutterOpening until the shutter is open or fails.
- When the shutter has completely opened, ShutterStatus must be ShutterOpen.
In other words, the dome controller must do the right thing and tell the truth or throw an error.
Looking at your logic, it appears that you are trying to program around behavior that is not conforming to the ASCOM specification.
You are expecting a shutter error to appear during a normal opening process? If ACP sees a Shutter error it will immediately stop with a thrown error. This may disable the dome button as well, as ACP is protecting the "failed" dome controller from additional problems. A ShutterError should never be indicated unless something serious has happened.
OK, with that issue identified, I am looking at the StartupObs log and the ASTELCO trace. In the logI see
Code:
17:20:34 Send command: OPEN DOME SHUTTER.
17:20:34 ** #domeopen - Unexpected shutter status 4
and in the trace file, at the same time I see
Code:
2017-12-15 17:20:34.410 I => execution(Telescope.CommandString(..)) arguments('CABINET.STATUS.LIST', 'false') (classes.ck a:77)
2017-12-15 17:20:34.410 I <= execution(Telescope.CommandString(..)) arguments('CABINET.STATUS.LIST', 'false') return(class java.lang.String:) (classes.ck a:77)
This has nothing to do with the Dome, in fact I see almost no Dome traffic at all in the ASCOM log.
Code:
2017-12-15 17:20:07.454 I => execution(Dome.setConnected(..)) arguments('true') (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.setConnected(..)) arguments('true') return() (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.canFindHome()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.canFindHome()) return(class java.lang.Boolean:true) (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.canPark()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.canPark()) return(class java.lang.Boolean:true) (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.canSetShutter()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.canSetShutter()) return(class java.lang.Boolean:true) (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.canSetAzimuth()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.canSetAzimuth()) return(class java.lang.Boolean:true) (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.canSetAzimuth()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.canSetAzimuth()) return(class java.lang.Boolean:true) (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.canSetAltitude()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.canSetAltitude()) return(class java.lang.Boolean:false) (classes.ck a:77)
2017-12-15 17:20:07.454 I => execution(Dome.getName()) (classes.ck a:77)
2017-12-15 17:20:07.454 I <= execution(Dome.getName()) return(class java.lang.String:NTM) (classes.ck a:77)
...
2017-12-15 17:25:26.095 I => execution(Dome.Park()) (classes.ck a:77)
2017-12-15 17:25:26.095 I <= execution(Dome.Park()) return() (classes.ck a:77)
Yet clearly the StartupObs script is calling Dome members. ACP is not "trapping" these calls, obviously, because your StartubObs log is showing ShutterError 4 and that must have come from the Dome yet there is no evidence of Dome activity in the ASCOM log at that time.
Is the time stamp in the ASTELCO log really UTC or is it perhaps local time? Also I can see nothing in StartupObs.js that is responsible for the logged message "Send command: OPEN DOME SHUTTER.". This is not coming from within ACP. So are ytou certain that the script you posted is actually the one that ran to produce the StartupObs.log? Furthermore I don't see the logged line in StartupObs.log that comes from this
Console.PrintLine(" Opening dome shutter");
It must precede the error
17:20:34 ** #domeopen - Unexpected shutter status 4
So I cannot at the moment piece together what is happening. What I can say is that the Dome object's functions and properties are passing through ACP into the Dome controller via ASCOM. It may be necessary for us to get together on the phone as I thing there is some misunderstanding and incomplete data.