Automating run including meridian flip

Questions, tips, information and discussions about using the SharpCap Sequencer and Sequence Planner tools
garyhawkins
Posts: 54
Joined: Sun Dec 22, 2019 6:59 pm

Automating run including meridian flip

#1

Post by garyhawkins »

My goal is to do a long imaging run that involves a meridian flip without having to manually do the flip. I wrote a sequence to do this, but it seems to fail at two points. The guiding does not start - saying PHD2 is not available, and it jumps right through the first loop to start capturing images on the East side of the run. Can anyone point out why the following sequence is not executing correctly?

SEQUENCE
TARGETNAME "V396 Aur before"
MOUNT GOTO "04 55 36, +30 17 55"
DELAY 20
MOUNT SOLVEANDSYNC
DELAY 20
GUIDING START
STOP AT -2 FROM MERIDIAN
CAPTURE START
END STOP AT
CAPTURE STOP
GUIDING STOP
TARGETNAME "V396 Aur after"
MOUNT GOTO "04 55 36, +30 17 55"
DELAY 20
MOUNT SOLVEANDSYNC
DELAY 20
GUIDING START
DELAY 10
STOP AT LOCALTIME "1:00 AM"
CAPTURE START
END STOP AT
CAPTURE STOP
GUIDING STOP
MOUNT PARK
END SEQUENCE

Is there are somewhere complete description to the sequence commands?

Best regards,

Gary
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Automating run including meridian flip

#2

Post by admin »

Hi Gary,

the best documentation is here - https://docs.sharpcap.co.uk/4.0/#The%20 ... e%20Editor - however, it only covers the steps that were available when SharpCap 4 was released, not the ones added more recently.

I can see a couple of things that you need to fix...

1) You need a 'Monitor Guiding Application' step before trying to use guiding - that tells SharpCap to start talking to PHD2, after which the Guiding start step should work.

2) You need to put something inside the 'Stop at X from meridian' that takes time - the 'Capture Start' is basically instant, so it will finish and the sequence will move on. You could put something as simple as a 'wait 20000 seconds' after the capture start. That will keep the sequence inside that step until the meridian is reached, at which point the wait should cancel and the sequence should move on.

3) Stopping at -2 degrees from the meridian is 2 degrees past I think, not 2 degrees before. Maybe that is what you wanted, but depending on your mount it may stop tracking at the meridian and never hit the threshold.

cheers,

Robin
garyhawkins
Posts: 54
Joined: Sun Dec 22, 2019 6:59 pm

Re: Automating run including meridian flip

#3

Post by garyhawkins »

Hi Robin,

Thanks for your feedback.

Unfortunately, the guiding piece is still not working. I now have Monitor Guiding Application at the beginning of the sequence but when the sequence reaches Start guiding if necessary, it says 'Guiding not connected' and the sequence halts.

Best regards,

Gary
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Automating run including meridian flip

#4

Post by admin »

Hi Gary,

that's odd. Can you share your current sequence with me please and I will check. I am away at the moment, so don't have the equipment to test, but will try to have a look on Monday.

thanks,

Robin
garyhawkins
Posts: 54
Joined: Sun Dec 22, 2019 6:59 pm

Re: Automating run including meridian flip

#5

Post by garyhawkins »

Hi Robin,

Here's the latest version of my sequence to do an extended imaging run that includes a meridian flip. Any input greatly appreciated.

SEQUENCE
GUIDING CONNECT ABORT True
TARGETNAME "AD Leo before"
PRESERVE CAMERA SETTINGS
MOUNT GOTO "10 19 36.27 +19 52 12.1 "
DELAY 20
SET GAIN TO 500
SET EXPOSURE TO 10
MOUNT SOLVEANDSYNC
DELAY 20
END PRESERVE
GUIDING START
DELAY 20
STOP AT -1 FROM MERIDIAN
CAPTURE START
DELAY 200000
END STOP AT
CAPTURE STOP
GUIDING STOP
TARGETNAME "AD Leo after"
PRESERVE CAMERA SETTINGS
MOUNT GOTO "10 19 36.27 +19 52 12.1 "
DELAY 20
SET GAIN TO 500
SET EXPOSURE TO 10
MOUNT SOLVEANDSYNC
DELAY 20
END PRESERVE
GUIDING START
DELAY 20
STOP AT LOCALTIME "5:00 AM"
CAPTURE START
DELAY 200000
END STOP AT
CAPTURE STOP
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Automating run including meridian flip

#6

Post by admin »

Hi,

I think the answer will most likely be in the log that shows on the bottom right when you run your sequence.

I ran a slightly modified version of it (I removed the plate solve, since I was using the test camera and it would have failed, and got this...)

Code: Select all

20:14:12 Starting  : Sequence
20:14:13 Starting  : Monitor Guiding Application
20:14:13 Info      : 'Connected to PHD2, current state is Stopped' while running step Monitor Guiding Application
20:14:14 Completed : Monitor Guiding Application
20:14:14 Starting  : Set imaging target name to 'AD Leo before'
20:14:14 Completed : Set imaging target name to 'AD Leo before'
20:14:14 Starting  : Save the camera settings and restore them when this block finishes
20:14:14 Starting  : Move the mount to (RA,Dec) 10 19 36.27 +19 52 12.1  (RA=10:19:36,Dec=+19:52:12)
20:14:14 Info      : 'Converting RA=10:19:36,Dec=+19:52:12 (J2000) position to RA=10:20:52,Dec=+19:45:10 (JNOW)' while running step Move the mount to (RA,Dec) 10 19 36.27 +19 52 12.1  (RA=10:19:36,Dec=+19:52:12)
20:14:34 Info      : 'Mount slew complete, waiting for mount to settle.' while running step Move the mount to (RA,Dec) 10 19 36.27 +19 52 12.1  (RA=10:19:36,Dec=+19:52:12)
20:14:39 Completed : Move the mount to (RA,Dec) 10 19 36.27 +19 52 12.1  (RA=10:19:36,Dec=+19:52:12)
20:14:39 Starting  : Wait for 20 seconds
20:14:59 Completed : Wait for 20 seconds
20:14:59 Starting  : Set Gain to 500
20:14:59 Completed : Set Gain to 500
20:14:59 Starting  : Set Exposure to 10.0000s
20:14:59 Completed : Set Exposure to 10.0000s
20:14:59 Starting  : Wait for 20 seconds
20:15:19 Completed : Wait for 20 seconds
20:15:19 Starting  : Restore previously saved camera settings
20:15:19 Completed : Restore previously saved camera settings
20:15:19 Completed : Save the camera settings and restore them when this block finishes
20:15:19 Starting  : Start guiding if necessary
20:15:19 Info      : 'Current guiding state is Stopped' while running step Start guiding if necessary
20:15:20 Info      : 'Current guiding state is Stopped' while running step Start guiding if necessary
20:15:21 Info      : 'Current guiding state is Stopped' while running step Start guiding if necessary
20:15:22 Info      : 'Current guiding state is Stopped' while running step Start guiding if necessary
20:15:23 Info      : 'Current guiding state is Looping' while running step Start guiding if necessary
20:15:24 Info      : 'Current guiding state is Looping' while running step Start guiding if necessary
20:15:25 Info      : 'Current guiding state is Calibrating' while running step Start guiding if necessary
... lots of calibrating lines removed...
20:17:08 Info      : 'Current guiding state is Calibrating' while running step Start guiding if necessary
20:17:09 Info      : 'Current guiding state is Guiding' while running step Start guiding if necessary
20:17:10 Completed : Start guiding if necessary
20:17:10 Starting  : Wait for 20 seconds
20:17:30 Completed : Wait for 20 seconds
20:17:30 Starting  : Stop running these steps when -1 degrees from the meridian
20:17:30 Starting  : Start capturing frames
20:17:30 Completed : Start capturing frames
20:17:30 Starting  : Wait for 200000 seconds
One thing to note is that PHD2 must already be running for the guiding steps to work (SharpCap will not actually launch PHD2). However SharpCap will try to get it to activate by opening the most recently used hardware, calibrating, etc.

cheers,

Robin
MikeHuerto
Posts: 75
Joined: Thu Jan 21, 2021 12:05 pm
Location: Spain

Re: Automating run including meridian flip

#7

Post by MikeHuerto »

Hi Gary
Any progress on this? I'm planning to try your script on my HEQ5 running Sharpcap, SynscanApp and PHD2. Any further tips or lines would help.

CS
Mike
Bortle 5
Skywatcher GOTO Synscan 14" Dobson
Skywatcher 130PDS on HEQ5
ZWOASI224MC and ASI294MCPro
Laptop = Lenovo Legion 5 FullHD 144Hz (Intel Core i7-10750H, 16GB RAM, 512GB SSD, NVIDIA RTX2060-6GB, Windows 10
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Automating run including meridian flip

#8

Post by admin »

Hi Mike,

a full meridian flip solution is still on the todo list, but feedback on custom solutions built using the sequencer is welcome (in particular to gather information on how different brands of mount/different ASCOM drivers handle the flip situation - for instance on EQMOD once the mount has reached the meridian limit, you cannot use MoveAxis to try to get it back past the limit, but can use a Slew command...)

Right now I am still catching up on little bits and pieces after spending time working on the new SharpSolve plate solving option.

cheers,

Robin
MikeHuerto
Posts: 75
Joined: Thu Jan 21, 2021 12:05 pm
Location: Spain

Re: Automating run including meridian flip

#9

Post by MikeHuerto »

Hi Robin
Ok - I will give Gary's script a try as is, and let you know what happens. I am using an HEQ5 controlled by the Synscan Windows app via Skywatcher USB connector from PC to mount - no eq mod software or cable.
Will be interesting!
Best
Mike
Bortle 5
Skywatcher GOTO Synscan 14" Dobson
Skywatcher 130PDS on HEQ5
ZWOASI224MC and ASI294MCPro
Laptop = Lenovo Legion 5 FullHD 144Hz (Intel Core i7-10750H, 16GB RAM, 512GB SSD, NVIDIA RTX2060-6GB, Windows 10
garyhawkins
Posts: 54
Joined: Sun Dec 22, 2019 6:59 pm

Re: Automating run including meridian flip

#10

Post by garyhawkins »

Hi Mike,

Sorry for the delayed response. I've not updated this script further, as I've moved to NINA for long photometry runs. The move to NINA was prompted by its ability to support remote observatory (I built an observatory in the Spring) control rather than the meridian flip challenge, but NINA does do a great job of dealing with this issue seamlessly. Thus, I now split my observing between NINA for long extended imaging (primarily photometry) runs, and SharpCap for EAA, which is its swetrue et-spot. Meridian flips during EAA don't really occur and I simply rely on platesolving for final positioning of the scope. I'm looking forward to seeing what Robin is adding in this regard.

On a side note, I think it's better to develop packages to be masters of their domain, rather than a 'Jack of all Trades'. I know I've been guilty of asking Robin for features that address issues outside of EAA. Thanks, Robin for a wonderful tool.

Best regards,

Gary
Post Reply