Page 1 of 1

Is it possible to have some sequnce routines work in background?

Posted: Mon Sep 01, 2025 9:07 am
by cydonia
Hi Robin,

I was just wondering if there is any way to have some routines such as cooling the camera at a set rate work in the background please? I currently don't tend to use the sequencer for camera cool down (I do for warm up and shooting) as it locks out the GUI controls (by design I believe) but it would be handy to have it cooling the camera at a set rate whilst I do focusing, target alignment etc. Currently I do it manually bit by bit so I can continue with these tasks and still cool the camera slowly.

Alternatively maybe a feature (unless I am being blind and it's there already) to chose the speed at which it cools in the main interface?

I'm using ZWO ASI183MC Pro and ASI533MC Pro cameras if that matters.

Thanks.

Re: Is it possible to have some sequnce routines work in background?

Posted: Mon Sep 01, 2025 1:32 pm
by admin
Hi,

there is no real way to do this at the moment - there are basically two ways to do cooling in SharpCap

1) Just set the target temperature and let the camera get on with it. The rate of cooling will be determined by the camera driver/SDK/firmware

2) The sequencer cooldown step you have been using - in this case, SharCap gradually decreases the target temperature to cool at the rate requested, however this blocks the sequencer while it is happening. There isn't a way to do this without using the sequencer.

I'm not sure wheter it would really be possible to modify the sequencer for this sort of thing to run nicely in the background - it would certainly be a challenge from a code point of view...

For now, it might be best to take a mixed approach - instead of using the cool down step in the sequencer, put various steps in to lower the target temperature a few degrees at a time - for instance set the target to 5C before focus, then 0C after, then -5C after target GOTO or similar.

cheers,

Robin

Re: Is it possible to have some sequnce routines work in background?

Posted: Mon Sep 01, 2025 3:06 pm
by Jean-Francois
Hello Cydonia and Robin,

It exists a third way to do the cooling ... with a script :-)

Code: Select all

import time

print("Target Temperature : 15")
SharpCap.SelectedCamera.Controls.TargetTemperature.Value = 15
time.sleep(10)

print("Target Temperature : 13")
SharpCap.SelectedCamera.Controls.TargetTemperature.Value = 13
time.sleep(10)

print("Target Temperature : 12")
SharpCap.SelectedCamera.Controls.TargetTemperature.Value = 12
time.sleep(10)
A program should do some tests before starting the cooling of the camera and some user input field.
It is possible to have the script in the menu list.

Regards,
Jean-Francois

Re: Is it possible to have some sequnce routines work in background?

Posted: Tue Sep 02, 2025 10:00 am
by cydonia
Thanks Robin. I did think it might not be that easy to implement. It's not a deal breaker anyway but thought I'd ask the question. :)

Thanks also Jean-Francois, I'll take a look into this.

Re: Is it possible to have some sequnce routines work in background?

Posted: Tue Sep 02, 2025 9:40 pm
by cydonia
I've managed to throw together a script that works well. I will probably tweak the values in it but it just cooled my ASI183MC Pro down to -10C ready to shoot some dark frames perfectly. Can probably reduce the pauses a bit but anyway it works and leaves the main GUI alone so I can do whatever I want.

Like I say it still needs some tweaks but it works so all sorted I think.
__________________

import time

temp = round(camera.Controls.Temperature.Value)
temp = int(temp)
targetTemp = int(temp)

print(f"Current Temperature: {temp}°C")
print(f"Target Temperature: {targetTemp}°C")

while targetTemp > -10:
targetTemp = targetTemp -1
print(f"Target Temperature: {targetTemp}°C")
camera.Controls.TargetTemperature.Value = int(targetTemp)
while temp > targetTemp:
temp = camera.Controls.Temperature.Value
time.sleep(1)
print(f"Current Temperature: {temp}°C")
time.sleep(90)

print(f"Target Temperature Reached")