SEQUENCE PROBLEM

Somewhere to ask questions about the best way to use SharpCap
Forum rules
‍

If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
User avatar
carlomuccini
Posts: 260
Joined: Mon Apr 27, 2020 12:42 pm
Location: Montecatini Terme (PT), Italy
Contact:

SEQUENCE PROBLEM

#1

Post by carlomuccini »

Hi

Just last night I was trying out a new test sequence to get a better understanding of how it works, and I needed the forum, but until this morning the site was down.
Welcome back, SharpCap!

Let's get to my problem...

My test sequence is essentially supposed to point to two objects, livestack each twice, and then stop.

Problem: The first loop goes infinitely, while I think it should loop twice and then move on to the next; instead, after the second livestack, the third starts, then the fourth, and then I stopped it.

Below is the sequence (The first loop works great: goto, livestacking, etc...).

SEQUENCE
LOOP 2 TIMES
PRESERVE CAMERA SETTINGS
SET EXPOSURE TO 2
MOUNT GOTO "KING6, RA=03 28.0, DEC=+56 27"
MOUNT SOLVEANDSYNC
END PRESERVE
SET EXPOSURE TO 15
DELAY 2
LIVE STACKING START
LIVE STACK FOR 1 MORE FRAMES THEN PAUSE
LIVE STACKING AUTOSTRETCH
LIVE STACK FOR 19 MORE FRAMES THEN PAUSE
LIVE STACKING SAVE FITSRawStack16Bit
LIVE STACK SAVE AND CLOSE

END LOOP
LOOP 2 TIMES
PRESERVE CAMERA SETTINGS
SET EXPOSURE TO 2
MOUNT GOTO "KING4, RA=02 35.0, DEC=+59 01"
MOUNT SOLVEANDSYNC
END PRESERVE
SET EXPOSURE TO 15
DELAY 2
LIVE STACKING START
LIVE STACK FOR 1 MORE FRAMES THEN PAUSE
LIVE STACKING AUTOSTRETCH
LIVE STACK FOR 19 MORE FRAMES THEN PAUSE
LIVE STACKING SAVE FITSRawStack16Bit
LIVE STACK SAVE AND CLOSE

END LOOP
END SEQUENCE





I don't understand where I'm going wrong.....
The loop doesn't execute twice, but continues...
Perhaps the blank line before END LOOP could be a problem?
The decimal point in the coordinates? However, the GOTO works well (although it is imprecise due to the simplified coordinates)

Thanks

Carlo

P.S. the log of sequencer

18:39:50 Starting : Sequence
18:39:50 Starting : Repeat 2 times
18:39:50 Starting : Save the camera settings and restore them when this block finishes
18:39:50 Starting : Set Exposure to 2,00000s
18:39:50 Completed : Set Exposure to 2,00000s
18:39:50 Starting : Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:50 Info : 'Setting target name to KING6' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:50 Info : 'Converting RA=03:28:00,0,Dec=+56:27:00 (J2000) position to RA=03:30:03,2,Dec=+56:32:32 (JNOW)' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:52 Info : 'Slewing, 1,7° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:53 Info : 'Slewing, 1,7° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:53 Info : 'Slewing, 1,1° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:54 Info : 'Slewing, 1,1° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:54 Info : 'Slewing, 1,1° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:55 Info : 'Slewing, 0,8° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:55 Info : 'Slewing, 0,5° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:56 Info : 'Slewing, 0,2° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:56 Info : 'Slewing, 0,0° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:57 Info : 'Slewing, 0,0° from target at RA=03:30:03,2,Dec=+56:32:32' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:57 Info : 'Waiting for mount to settle' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:39:57 Info : 'Mount slew complete, waiting for mount to settle.' while running step Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:40:02 Completed : Move the mount to (RA,Dec) KING6, RA=03 28.0, DEC=+56 27 (RA=03:28:00,0,Dec=+56:27:00)
18:40:02 Starting : Plate solve a single frame, sync the mount and re-goto the target co-ordinates
18:40:17 Info : 'Mount movement complete, waiting for mount to settle.' while running step Plate solve a single frame, sync the mount and re-goto the target co-ordinates
18:40:17 Completed : Plate solve a single frame, sync the mount and re-goto the target co-ordinates
18:40:17 Starting : Restore previously saved camera settings
18:40:17 Completed : Restore previously saved camera settings
18:40:17 Completed : Save the camera settings and restore them when this block finishes
18:40:17 Starting : Set Exposure to 15,00000s
18:40:17 Completed : Set Exposure to 15,00000s
18:40:17 Starting : Wait for 2 seconds
18:40:19 Completed : Wait for 2 seconds
18:40:19 Starting : Start Live Stacking
18:40:19 Completed : Start Live Stacking
18:40:19 Starting : Live Stack for 1 more frames then pause
18:40:20 Info : 'Waiting for live stack to reach a total of 1 stacked frames.' while running step Live Stack for 1 more frames then pause
18:40:34 Info : 'Live stacking paused, 1 stacked frames reached.' while running step Live Stack for 1 more frames then pause
18:40:35 Completed : Live Stack for 1 more frames then pause
18:40:35 Starting : Live Stacking Apply Auto Stretch
18:40:35 Completed : Live Stacking Apply Auto Stretch
18:40:35 Starting : Live Stack for 19 more frames then pause
18:40:35 Info : 'Waiting for live stack to reach a total of 20 stacked frames.' while running step Live Stack for 19 more frames then pause
18:56:18 Info : Cancellation request received
18:56:18 Cancelled : Live Stack for 19 more frames then pause
18:56:18 Cancelled : Repeat 2 times
18:56:18 Cancelled : Sequence
18:56:18 Cancelled : Sequence stopped.
18:56:18 Finished
User avatar
admin
Site Admin
Posts: 17534
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: SEQUENCE PROBLEM

#2

Post by admin »

Hi,

your problem is that the 'live stack for one more frame then pause' step leaves live stacking paused, so no more frames are added to the stack. On top of this, the following 'live stack for 19 more frames' doesn't automatically resume stacking for you (I think it should, but I never considered that before).

The quick fix is to add a 'resume live stacking' step after the auto stretch to get stacking going again before starting on the next 19 frames.

Hope this helps,

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

Re: SEQUENCE PROBLEM

#3

Post by admin »

Hmm,

just went to check the code and it already unpauses the live stacking in the 'stack for n more frames' step, so that can't be the cause...

During the period when it was stuck, did you notice if the frame count from the camera was going up? If that was then either the 'stacked frames' count or the 'rejected frames' count in live stacking should be going up. If it is the rejected frames then that is the cause of the problem as the 'wait for 19 more frames' is waiting for a total of 20 stacked frames, not a total of 20 total (stacked + rejected) frames.

cheers,

Robin
User avatar
carlomuccini
Posts: 260
Joined: Mon Apr 27, 2020 12:42 pm
Location: Montecatini Terme (PT), Italy
Contact:

Re: SEQUENCE PROBLEM

#4

Post by carlomuccini »

Maybe I didn't explain myself well, sorry for my English.

This block works great, but it doesn't stop after two passes.
saves the livestack output every 5 minutes; perfect.
at the stop I had 4 FITs of 5 minutes and not 2 FITs as requested

The "LOOP 2 TIMES" continues for three times (save the new FIT), then four (save the new FIT), then I stopped it; does not exit the loop.
And it doesn't continue to the next block

LOOP 2 TIMES
PRESERVE CAMERA SETTINGS
SET EXPOSURE TO 2
MOUNT GOTO "KING6, RA=03 28.0, DEC=+56 27"
MOUNT SOLVEANDSYNC
END PRESERVE
SET EXPOSURE TO 15
DELAY 2
LIVE STACKING START
LIVE STACK FOR 1 MORE FRAMES THEN PAUSE
LIVE STACKING AUTOSTRETCH
LIVE STACK FOR 19 MORE FRAMES THEN PAUSE
LIVE STACKING SAVE FITSRawStack16Bit
LIVE STACK SAVE AND CLOSE
END LOOP

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

Re: SEQUENCE PROBLEM

#5

Post by admin »

Hi,

OK, I think this may be an interaction between the sequencer and the other features in Live Stacking. Do you have live stacking set up to auto reset? If that happens before the extra 19 frames are completed then it will get stuck because the sequencer is waiting for the frame count in live stacking to hit 20, but live stacking will be resetting before it gets to 20 total frames, so round and round it goes...

cheers,

Robin
User avatar
carlomuccini
Posts: 260
Joined: Mon Apr 27, 2020 12:42 pm
Location: Montecatini Terme (PT), Italy
Contact:

Re: SEQUENCE PROBLEM

#6

Post by carlomuccini »

Hi

Livestacking works well and returns a 5-minute FIT file, then performs another livestack and saves a 5-minute FIT file.

It works well.

However, END LOOP is not recognized; the sequencer restarts with a third live stack and should have exited the LOOP and started the new LOOP instead.

It gets stuck in the first LOOP and doesn't exit.
Are multiple non-nested LOOP-END LOOPs allowed?


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

Re: SEQUENCE PROBLEM

#7

Post by admin »

Hi,

yes, no problem with multiple loops, but from your log above, it's never getting to the end of the loop - in fact it is never getting to the end of the 'stack 20 more frames step' at all - in the log we see

Code: Select all

18:40:35 Starting : Live Stack for 19 more frames then pause
but no matching 'Completed' line further on to say that step has finished. So, if you got multiple stacks saved then I really think it has to be the 'Save and reset every X minutes' option (bottom left of live stacking) being enabled that is causing the live stack to reset before it gets to 19 more frames, and that means that the sequence can never complete.

cheers,

Robin
User avatar
carlomuccini
Posts: 260
Joined: Mon Apr 27, 2020 12:42 pm
Location: Montecatini Terme (PT), Italy
Contact:

Re: SEQUENCE PROBLEM

#8

Post by carlomuccini »

Thank you

I didn't find a command in the sequencer to disable automatic saving, or am I wrong?
For now I solve it with an alert message

Thanks for everything, as always, very kind.

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

Re: SEQUENCE PROBLEM

#9

Post by admin »

Hi,

you are right that there isn't a way to have that sort of fine control over the live stacking from the sequencer - that particular option would need to be cleared by the user before running the sequence as the sequence will just launch live stacking with the existing options in place.

cheers,

Robin
Gfischer
Posts: 320
Joined: Thu Jun 22, 2023 4:20 pm

Re: SEQUENCE PROBLEM

#10

Post by Gfischer »

I like the option of controlling the live stacking functions during sequence. I use the float option for the live stack window when starting sc then close live stack. Then when using sequence you have full access to livestack controls.
Post Reply