On error sequencer

Questions, tips, information and discussions about using the SharpCap Sequencer and Sequence Planner tools
Post Reply
astrocalina
Posts: 18
Joined: Thu Jul 18, 2024 8:17 am

On error sequencer

#1

Post by astrocalina »

Hello again,
I have a question about the sequencer: is any way to do some other sequncer on error. What I want to do in sequencer is:
When the plate solver fail I need to check it again and it fail again it will start the parking sequencer... if success it will continue on the main sequence
Thank you
User avatar
admin
Site Admin
Posts: 14652
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: On error sequencer

#2

Post by admin »

Hi,

yes, there are things you can do in the advanced editor to handle error situations - blocks are available like

* 'Ignore any errors when running these steps'
* 'Retry up to <n> times if there are errors running these steps'
* 'Steps to run just before the sequence finishes, even if an error has occurred'

I think a combination of the last two will probably solve your requirements.

cheers,

Robin
astrocalina
Posts: 18
Joined: Thu Jul 18, 2024 8:17 am

Re: On error sequencer

#3

Post by astrocalina »

Thank you,
this evening I will post my sequencer so maybe you can help me writing it, but in the meantime, to be more clear, I will write it what I need with some "simil programming language":

if(platesolve == false){
if(platesolve==false){
goto line xxx #where the parking procedure starts at the end of sequencer
}
else {
continue the sequencer
}
else {
continue the sequencer
}
}
User avatar
admin
Site Admin
Posts: 14652
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: On error sequencer

#4

Post by admin »

Hi,

something like this...

Code: Select all

SEQUENCE
    BEFORE SEQUENCE FINISH DO
        MOUNT PARK
    END DO
    # Stuff to do before the plate solve
    RETRY ERRORS UP TO 1 TIMES
        MOUNT SOLVEANDSYNC
    END RETRY ERRORS
    #More stuff here to happen after successful plate solve
END SEQUENCE
So, first this sequence sets up the 'Mount Park' step to be run at the exit of the sequence, regardless of whether an error happens or not. Then you can have whatever steps you need to get you to the target.

The MOUNT SOLVEANDSYNC is in a RETRY block, set to have 1 retry (which means a total of 2 tries). If the plate solve works the first time then the sequence just continues. If it fails the first time, the retry bock will try a second time - if the second try works then the sequence continues, otherwise an error escapes the retry block and will bring the sequence to an end. However, before it ends, the 'MOUNT PARK' that we previously set up to run before exit will happen.

Note that there are no 'IF' statements in the sequencer (and I don't intend to add them), so doing things like error handling and retries requires a slightly different way of thinking about how to do it.

cheers,

Robin
Post Reply