Page 1 of 1

Indefinite repeats and filenaming

Posted: Mon Dec 05, 2022 7:55 pm
by joellama
I'm using sharpcap to cycle through 3 ZWO cameras and a webcam to take various images of my telescope enclosure. I've tried doing this with the scripting language but it crashes after about 1 or 2 loops (I think because I'm using a USB extender - I have no control over this). The sequencer does seem a bit more stable but I can't figure out how to customize it to how I need.

Ideally I would need to be able to have the files named CAMERANAME_TIMESTAMP.jpg in a single folder DATE but I can't seem to be able to set that, is that currently possible? I would also need to loop indefinitely (even better would be an IF statement for if the sun is up - I do this during the day).

I know this isn't really what Sharpcap is designed for but if any of this is already possible I would love some guidance! Thanks, Joe.

Re: Indefinite repeats and filenaming

Posted: Tue Dec 06, 2022 3:54 pm
by admin
Hi Joe,

you should be able to get the filenames that you want by setting the 'Stills' capture template to something like

Code: Select all

{Date}\{Camera}_{FrameTime}
See this part of the documentation for more info on setting up filename templates : https://docs.sharpcap.co.uk/4.0/#Filename%20Templates

While there is no step in the sequencer to repeat indefinitely, you can add a repeat loop for a specified number of times and set the count up as far as 1,000,000,000 - which should be enough. If you want more, nest two loops inside each other.

As for the sun being up, there is no if statement, but there are 'wait until' and 'repeat until' steps which you can use. For instance the sequence below will capture 1 frame every 10 seconds during daytime for the next ~27 million years

Code: Select all

SEQUENCE
    LOOP 999999999 TIMES
        WAIT UNTIL EVENT Sunrise
        LOOP UNTIL Sunset
            CAPTURE 1 LIVE FRAMES
            DELAY 10
        END LOOP
    END LOOP
END SEQUENCE
Hope this helps,

Robin

Re: Indefinite repeats and filenaming

Posted: Tue Dec 06, 2022 4:15 pm
by joellama
Thanks for the reply, Robin! I’ll give that part of the documentation a proper read (I missed it originally).

Re: Indefinite repeats and filenaming

Posted: Tue Dec 06, 2022 4:56 pm
by joellama
Hi Robin, this looks to *almost do exactly what I need, thanks! Could I request a new feature? Under the Repeat tab of the sequencer, could you add Repeat Until Time? Currently there is Repeat N times, or until AstronomicalEvent; however, that requires an ASCOM mount from what I can tell? There is a Time option available under Wait but not repeat from what I can see. Thanks!

Re: Indefinite repeats and filenaming

Posted: Tue Dec 06, 2022 5:02 pm
by admin
Hi,

yes, a repeat until time is something I can add.

You should be able to get the repeat until Astro event to work without an ASCOM mount - just set your latitude and longitude in the 'Polar Align' settings and I think that will work.

cheers,

Robin

Re: Indefinite repeats and filenaming

Posted: Tue Dec 06, 2022 5:03 pm
by joellama
Yep, I just found that setting - thanks for the quick replies! Currently the script is doing exactly what I need (though the repeat until Time feature could be a useful addition anyway). Thanks again!