This commit is contained in:
l_samenv
2022-08-22 14:51:05 +02:00
parent 796fb02c48
commit c8b29b26d1
2 changed files with 78 additions and 0 deletions

37
tcl/startup/dilprep.tcl Normal file
View File

@ -0,0 +1,37 @@
proc dilprepLayout args {
set bad [list]
foreach {chan min max} {
/tmon/sorb 260 3290
/tmon/onek 2000 2400
/tmon/stillt 2000 2400
/tmon/mix 2000 2400
/tmon/samplehtr 2600 2800
/ts 270 320
} {
set val [silent 0 hval $chan]
if {$val < $min || $val > $max } {
lappend bad [lindex [split $chan /] end]
}
}
if {[enum_txt /dilprep/dil] eq "undef"} {
Style hotwarning
Label "detecting stick, please wait"
} elseif {[enum_txt /dilprep] eq "warmup"} {
Style hotwarning
Label "warming up [enum_txt /dilprep/dil], please wait before opening"
} elseif {[result _tmon status] eq "no response"} {
Style hotwarning
Label "LakeShore switched off"
} elseif {[result _tmon status] ne ""} {
Style hotwarning
Label "LakeShore not properly connected"
} elseif {$val == 0} {
Style hotwarning
Label "stick disconnected"
} elseif {[llength $bad] > 0} {
Style hotwarning
Label "bad channels: $bad"
} else {
Label "All channels OK on [enum_txt /dilprep/dil]"
}
}