Slaving the Roof

I have a couple of issues with roof slaving. I am using the Dragonfly unit and my mount is a Mesu 200. I have configured the Dragonfly so that the roof will refuse to open if the mount is unparked or if the Cloudwatcher is reporting bad weather.

If everything is OK the slaving the roof and unparking the mount works - the roof will open and the mount will unpark. (Although even here there is some oddness - my mount driver window says ‘unpark’ but the SGP window still offers the ‘Unpark’ rather than the ‘Park’ option and continues to do so until I start slewing).

The problem arises if I try to unpark when there is an unsafe (weather or mount) condition. My Dragonfly log shows that the roof is not going to open due to whatever condition. But SGP locks up altogether. I need to kill it with Task Manager.

This is the last few lines of the log:

[02/18/18 14:59:58.875][DEBUG] [Telescope Thread] SGM_TELESCOPE_CONNECT complete…
[02/18/18 14:59:58.925][DEBUG] [Main Thread] Telescope: Setting sync behavior to: Sync
[02/18/18 15:00:03.145][DEBUG] [Main Thread] Connecting ASCOM dome…
[02/18/18 15:00:03.224][DEBUG] [Main Thread] Dome: CanSetAzimuth is false
[02/18/18 15:00:39.660][DEBUG] [Main Thread] Dome: Opening Shutter

As an aside, I noticed this line a few above it. Is this all OK? I’m running a registered 3.0.0.7

[02/18/18 14:59:25.627][DEBUG] [Main Thread] Version Check: Could not find version info for beta track (Sequence+Generator+Pro+3+Beta. : Could not fetch Sequence+Generator+Pro+3+Beta

I had fun with this too when I was writing my own obsy application. I had to consider fail safe logic. I use ok to open for the roof and ok to image for SGP. I use a physical detector on the roof and mount to detect safe conditions. This overrides any mount status as far as the roof controller is concerned. If I unpark the mount when the roof is closed and it moves off station the roof controller interrupts mount power. Your condition might be averted if you distinguish between say cloudy and overcast conditions (and wet/raining) betrwen the safety monitors.

Thanks Buzz. So I assume you do ‘Slave’ roof to the mount, correct?

Yes, correct - but my roof controller (like your Dragonfly) is the final arbitrator and it uses sensors to decide if it is safe to move roof or mount (as the two can collide). It can block a roof move but in the case of the mount, it can only monitor its position and cut off power if it is trying to slew into the closed roof. If I was better at writing drivers, I would have my roof controller also being a mount hub but I have not yet got to those dizzy heights.

Thanks Chris. I’ve just been looking at your SGP set-up videos. Very helpful and I have changed a couple of things in my own set up, as a result.

A quick unrelated question, if you don’t mind, that arises from your videos. You recommend that guiding is paused during autofocus if you are using an OAG (which I am). If you get some drift during autofocus, does PHD2 return the guide star to the same position it was in when guiding was suspended, or will I get a little misalignment?

Yes - I don’t want PHD moving the mount during an AF exposure and as far as I can tell, it resumes to the crosshair after the pause - it does not re-acquire and autoselect a new guidestar. I do a tiny amount of dither but typically my stacked exposure only needs a tiny crop to remove the inconsistent boundaries.

OK thanks Buzz. I’ve been testing again this morning. I have put some text into the Dragonfly ‘log window’ just to keep me up to date with what is happening. From the text messages, it would appear that SGP is running my ‘Close Shutter’ script twice (it’s called 'SyncCloseShutter.vbs). Indeed, the SGP log seems to confirm this. (This was triggered by an unsafe Cloudwatcher event.)

[02/20/18 10:52:58.120][DEBUG] [Safety Thread] In RunEndOfSequenceEquipmentOptions
[02/20/18 10:53:27.954][DEBUG] [Main Thread] PopulateDataModel: Transferring view to the data model…
[02/20/18 10:53:27.972][DEBUG] [MF Update Thread] Performing serialize…
[02/20/18 10:53:30.760][DEBUG] [Safety Thread] Parking telescope…
[02/20/18 10:53:30.761][DEBUG] [Sequence Thread] Parking telescope…
[02/20/18 10:53:30.781][DEBUG] [Safety Thread] ASCOM Telescope: Park message received.
[02/20/18 10:53:30.781][DEBUG] [Safety Thread] ASCOM Telescope: Dome slave set to park mount first, parking mount.
[02/20/18 10:53:30.783][DEBUG] [Safety Thread] ASCOM Telescope: Sending park…
[02/20/18 10:53:30.792][DEBUG] [Sequence Thread] ASCOM Telescope: Park message received.
[02/20/18 10:53:30.792][DEBUG] [Sequence Thread] ASCOM Telescope: Dome slave set to park mount first, parking mount.
[02/20/18 10:53:30.793][DEBUG] [Sequence Thread] ASCOM Telescope: Sending park…
[02/20/18 10:53:42.818][DEBUG] [Safety Thread] ASCOM Telescope: Parked
[02/20/18 10:53:42.818][DEBUG] [Safety Thread] ASCOM Telescope: closing observatory shutter…
[02/20/18 10:53:42.822][DEBUG] [Sequence Thread] ASCOM Telescope: Parked
[02/20/18 10:53:42.823][DEBUG] [Sequence Thread] ASCOM Telescope: closing observatory shutter…
[02/20/18 10:53:42.919][DEBUG] [Safety Thread] Dome: Closing Shutter
[02/20/18 10:53:43.131][DEBUG] [Sequence Thread] Dome: Closing Shutter
[02/20/18 10:54:21.121][DEBUG] [Safety Thread] ASCOM Telescope: Parked

Should it be doing this? If not, why is it doing it in my case. I have my Slave Settings set exactly as you have yours in the video.

And a quick update: if the Sequence gets to the end without a Cloudwatcher ‘Unsafe’ event the Close Shutter script is only run once!

Final test. I was watching carefully this time. When the weather went unsafe, the little dialogue box opened up and started counting down from 30s. A few seconds later, the box flashed and again began counting down from 30s. The close shutter script had been called twice by now. And crucially, the roof did not close. So having the script be called twice seems somehow to be breaking the roof close script, which otherwise runs perfectly.

I’m not sure why SGP (or CW) would ‘reset’ the warning dialogue box like this. For weather, I am using a Cloudwatcher connected to a Solo.

It seems that the instruction to park mount and shutter is being sent in a [Sequence Thread] and then again in a [Safety Thread]. Here is the relevant bit of the final log:

[02/20/18 11:21:47.902][DEBUG] [Safety Thread] Adding sequence level notification: Shutting down due to Unsafe Conditions.
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] Sending Notification: Error - Shutting down due to Unsafe Conditions.
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] Handling monitoring event (Good Night System, Error): (M92_DaytimeTest) Shutting down due to Unsafe Conditions.
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] GNS: Sent error message to GNS ((M92_DaytimeTest) Shutting down due to Unsafe Conditions.)…
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] Shutting down due to Unsafe Conditions…
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] Clearing timed monitoring events…
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] Checking RunEndOfSequenceEquipmentOptions, force = True
[02/20/18 11:21:47.904][DEBUG] [Safety Thread] In RunEndOfSequenceEquipmentOptions
[02/20/18 11:21:57.366][DEBUG] [Sequence Thread] Run event requested sequence abort…
[02/20/18 11:21:57.366][DEBUG] [Sequence Thread] ********* Run post sequence *********
[02/20/18 11:21:57.366][DEBUG] [Sequence Thread] SGPro capture cal frame mode is OFF…
[02/20/18 11:21:57.366][DEBUG] [Sequence Thread] Clearing timed monitoring events…
[02/20/18 11:21:57.366][DEBUG] [Sequence Thread] Checking RunEndOfSequenceEquipmentOptions, force = True
[02/20/18 11:21:57.366][DEBUG] [Sequence Thread] In RunEndOfSequenceEquipmentOptions
[02/20/18 11:21:57.900][DEBUG] [Camera Thread] QSI expose and download: 19.7801716s
[02/20/18 11:21:57.900][DEBUG] [Camera Thread] SGM_CAMERA_CAPTURE complete…
[02/20/18 11:22:30.262][DEBUG] [Sequence Thread] Parking telescope…
[02/20/18 11:22:30.262][DEBUG] [Safety Thread] Parking telescope…
[02/20/18 11:22:30.275][DEBUG] [Sequence Thread] ASCOM Telescope: Park message received.
[02/20/18 11:22:30.275][DEBUG] [Sequence Thread] ASCOM Telescope: Dome slave set to park mount first, parking mount.
[02/20/18 11:22:30.277][DEBUG] [Sequence Thread] ASCOM Telescope: Sending park…
[02/20/18 11:22:30.286][DEBUG] [Safety Thread] ASCOM Telescope: Park message received.
[02/20/18 11:22:30.286][DEBUG] [Safety Thread] ASCOM Telescope: Dome slave set to park mount first, parking mount.
[02/20/18 11:22:30.287][DEBUG] [Safety Thread] ASCOM Telescope: Sending park…
[02/20/18 11:22:42.309][DEBUG] [Sequence Thread] ASCOM Telescope: Parked
[02/20/18 11:22:42.309][DEBUG] [Sequence Thread] ASCOM Telescope: closing observatory shutter…
[02/20/18 11:22:42.312][DEBUG] [Safety Thread] ASCOM Telescope: Parked
[02/20/18 11:22:42.312][DEBUG] [Safety Thread] ASCOM Telescope: closing observatory shutter…
[02/20/18 11:22:42.384][DEBUG] [Sequence Thread] Dome: Closing Shutter
[02/20/18 11:22:42.544][DEBUG] [Safety Thread] Dome: Closing Shutter
[02/20/18 11:24:26.588][DEBUG] [Main Thread] Disconnecting QSI Filter Wheel
[02/20/18 11:24:26.595][DEBUG] [Main Thread] Disconnecting ASCOM (QSI) camera: QSI CCD Camera…
[02/20/18 11:24:26.828][DEBUG] [Main Thread] Disconnecting ASCOM Telescope: ASCOM.SiTechDll.Telescope
[02/20/18 11:24:26.836][DEBUG] [Main Thread] Disconnecting ASCOM Observatory: Dragonfly.Dome
[02/20/18 11:24:26.836][DEBUG] [Main Thread] Dome: Disconnecting
[02/20/18 11:24:26.850][DEBUG] [Main Thread] Disconnecting ASCOM Safgety Monitor
[02/20/18 11:24:26.850][DEBUG] [Main Thread] ASCOM Safety Monitor: Disconnecting
[02/20/18 11:24:28.460][DEBUG] [CP Update Thread] Caught exception in CanPierFlipNow : Object reference not set to an instance of an object.
at qp.kw()
[02/20/18 11:24:28.521][DEBUG] [Filter Wheel Thread] Filter Wheel Dispatch loop: Received SGM_TERMINATE…
[02/20/18 11:24:28.523][DEBUG] [Camera Thread] Camera Dispatch loop: Received SGM_TERMINATE…
[02/20/18 11:24:28.523][DEBUG] [Auto Guider Thread] Auto Guider Dispatch loop: Received SGM_TERMINATE…
[02/20/18 11:24:28.523][DEBUG] [Focuser Thread] Focuser Dispatch loop: Received SGM_TERMINATE…
[02/20/18 11:24:28.523][DEBUG] [TEC Thread] TEC Dispatch loop: Received SGM_TERMINATE…
[02/20/18 11:24:28.523][DEBUG] [Telescope Thread] Telescope Dispatch loop: Received SGM_TERMINATE…
[02/20/18 11:24:28.740][DEBUG] [Main Thread] Performing clean up…

I have been experimenting with this on and off today. I ended up going back to 2.6 for a while. It is clear that SGP 3.0 and 2.6 is sending two commands to park and close teh shutter when an unsafe weather condition is encountered. SGP 3.0 causes some sort of error with the DF script and the roof does not close. I tried SGP 2.6 three times and (even though it issued two commands) the roof did close. I’m not entirely sure how that can be the case, but 2.6 seems to work, 3.0 does not.

I know that there were roof closure issues with the 3.0 beta. It would seem that, at least for me, these have not been completely eradicated. Given that DF and the scripts seem to work with 2.6, the ‘issue’ would seem to lie with SGP.

It would be nice to get some ‘official’ confirmation that the Park (and therefore Close Shutter) command is indeed issued twice when we have a weather event. If it is not, then I wonder why it is doing it on my system. If it is, then is this intentional? Park (and Close Shutter) seems to be issued only once when the sequence ends.

PS: My observatory is a Roll Off Roof and this is selected in the Slave settings dialogue.

I haven’t checked my log files, but my roof controller wouldn’t be phased by multiple commands while it was moving, unless they were to open<>close during movement, in which case it stops and reverses direction. I’ll try and reproduce what you are seeing and check my log files.

If it’s happening twice it’s not intentional. Maybe it’s shutting down because of weather and then the end of sequence events are running. I’ll have to check into it.

Thanks,
Jared

Thanks Jared. I have been setting things up so that the CW event happens at the start of a series of 5 minute exposures. So if ‘end of sequence’ is being triggered then it is not because I have reached end of sequence.

OK. Jaime Alemany from Lunatico has been extremely helpful with this (as he usually is in all things). He has re-written his software and sent me the latest version to try.

The new software “blocks” (Jaime says ‘semaphore’ is the correct word - I don’t really understand these things) the second instruction from SGP. SGP (2.6 and 3.0) is still sending 2 instructions but the Dragonfly software is now able to ignore the second (and any subsequent) ones.

Dragonfly is now working smoothly and reliably for me with SGP. Jaime is a top man.