heliux: improve condense deadline (soft_dealine)

This commit is contained in:
2024-10-22 10:37:03 +02:00
parent 10de483a52
commit 35c5b225b6

View File

@ -115,6 +115,7 @@ proc heliox::check_set {} {
th mainloop setsorb th mainloop setsorb
tt dblctrl 0 tt dblctrl 0
tt set 1.25 tt set 1.25
catch {hdelprop /ts/mode soft_deadline}
} }
default { default {
error "bad mode" error "bad mode"
@ -190,6 +191,7 @@ proc heliox::check_mode {} {
set state "-> condense" set state "-> condense"
hsetprop /th target 0.25 hsetprop /th target 0.25
hsetprop /ts target 0.25 hsetprop /ts target 0.25
catch {hdelprop /ts/mode soft_deadline}
} }
} }
setmainsensor $mainsensor setmainsensor $mainsensor
@ -230,7 +232,8 @@ proc heliox::read {} {
set ts [result th pot] set ts [result th pot]
set tsorb [result th sorb] set tsorb [result th sorb]
sct lasttime $now sct lasttime $now
if {$ts > 3 && $tsorb < 10} { set mode [hvali [sct]]
if {(($mode == 3 && $ts > 2) || ($ts > 3)) && $tsorb < 10} {
if {$lasts_until} { if {$lasts_until} {
clientput "3He pot went empty" clientput "3He pot went empty"
} }
@ -246,12 +249,12 @@ proc heliox::read {} {
set lasts_until 0 set lasts_until 0
} }
} }
if {[hvali [sct]] == 4} { if {$mode == 4} {
if {$ts > 3} { if {$ts > 3} {
# above 3 K: set deadline # above 3 K: set deadline
nv set [hvali [sct parent]/condenseflow] nv set [hvali [sct parent]/condenseflow]
set lasts_until 0 set lasts_until 0
sct condense_deadline [expr $now + 3600] # timeout 1 hour sct condense_deadline [expr $now + 3600]
} elseif {[result th sorb] > 39} { } elseif {[result th sorb] > 39} {
nv set [hvali [sct parent]/condenseflow] nv set [hvali [sct parent]/condenseflow]
# 3He vapor pressure: 200 mbar at 2 K, power law # 3He vapor pressure: 200 mbar at 2 K, power law
@ -271,7 +274,7 @@ proc heliox::read {} {
set sdl [silent $dl sct soft_deadline] set sdl [silent $dl sct soft_deadline]
if {$dl <= $sdl} { if {$dl <= $sdl} {
sct soft_deadline $dl sct soft_deadline $dl
} elseif {$now > $sdl + 600} { } elseif {$now > $sdl + 300} {
clientput "stop condensing - target_hours is probably too high - expect only [expr round($hours)] h hold time" clientput "stop condensing - target_hours is probably too high - expect only [expr round($hours)] h hold time"
set target_hours $hours set target_hours $hours
} }