drivers/heliox.tcl: improve timeout
- softer implementation of timeout (depending on progress) + handle dblctrl correctly
This commit is contained in:
@ -104,6 +104,7 @@ proc heliox::check_set {} {
|
||||
th setsorb [sct target]
|
||||
}
|
||||
set mainsensor /th/low
|
||||
tt dblctrl 0
|
||||
tt set 1.25
|
||||
set state "low-T mode"
|
||||
}
|
||||
@ -112,6 +113,7 @@ proc heliox::check_set {} {
|
||||
th setsorb 40
|
||||
th set 0
|
||||
th mainloop setsorb
|
||||
tt dblctrl 0
|
||||
tt set 1.25
|
||||
}
|
||||
default {
|
||||
@ -170,6 +172,7 @@ proc heliox::check_mode {} {
|
||||
th setsorb [expr min(1.8, [hvali /th/target])]
|
||||
}
|
||||
tt set 1.25
|
||||
tt dblctrl 0
|
||||
} else {
|
||||
clientput "the 3He pot is probably empty"
|
||||
error "condense needed before lowT mode"
|
||||
@ -183,6 +186,7 @@ proc heliox::check_mode {} {
|
||||
th mainloop set
|
||||
th setsorb 40
|
||||
tt set 1.25
|
||||
tt dblctrl 0
|
||||
set state "-> condense"
|
||||
hsetprop /th target 0.25
|
||||
hsetprop /ts target 0.25
|
||||
@ -244,9 +248,10 @@ proc heliox::read {} {
|
||||
}
|
||||
if {[hvali [sct]] == 4} {
|
||||
if {$ts > 3} {
|
||||
# above 3 K: set deadline
|
||||
nv set [hvali [sct parent]/condenseflow]
|
||||
set lasts_until 0
|
||||
sct condense_deadline [expr $now + 36000] # timeout: should be 3600
|
||||
sct condense_deadline [expr $now + 3600] # timeout 1 hour
|
||||
} elseif {[result th sorb] > 39} {
|
||||
nv set [hvali [sct parent]/condenseflow]
|
||||
# 3He vapor pressure: 200 mbar at 2 K, power law
|
||||
@ -261,8 +266,18 @@ proc heliox::read {} {
|
||||
set lasts_until [expr int($now + $hours * 3600)]
|
||||
calc_pot $lasts_until
|
||||
sct condense_deadline [silent [expr $now + 3600] sct condense_deadline]
|
||||
if {$now > [sct condense_deadline]} {
|
||||
clientput "condense timeout - cannot fill pot for lasting $target_hours hours"
|
||||
if {$hours > 8} {
|
||||
set dl [expr $now + ($target_hours - $hours) * 30]
|
||||
set sdl [silent $dl sct soft_deadline]
|
||||
clientput "T-H [expr $target_hours - $hours] $dl $sdl"
|
||||
if {$dl <= $sdl} {
|
||||
sct soft_deadline $dl
|
||||
} elseif {$now > $sdl + 600} {
|
||||
clientput "stop condensing - target_hours is probably too high - expect only [expr round($hours)] h hold time"
|
||||
set target_hours $hours
|
||||
}
|
||||
} elseif {$now > [sct condense_deadline]} {
|
||||
clientput "condense timeout - hold time is probably very low"
|
||||
set target_hours $hours
|
||||
}
|
||||
if {$hours >= $target_hours} {
|
||||
|
Reference in New Issue
Block a user