From 80b0c09c3724d41e13ed54c89da3ec7084d6b95b Mon Sep 17 00:00:00 2001 From: l_samenv Date: Mon, 17 Oct 2022 16:56:44 +0200 Subject: [PATCH 01/16] calcurves/U081*.340: fix setpoint limits may be wrong order? R increasing T decreasing --- tcl/calcurves/U08127.340 | 2 +- tcl/calcurves/U08130.340 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcl/calcurves/U08127.340 b/tcl/calcurves/U08127.340 index 48cf12e..1ab7852 100644 --- a/tcl/calcurves/U08127.340 +++ b/tcl/calcurves/U08127.340 @@ -2,7 +2,7 @@ Comment: 30.07.2021, FP and CMN, 16mK--2.3K extrapolated elsewhere Sensor Model: RX-1000-BF0.007 Serial Number: U08127 Data Format: 4 (Log Ohms/Kelvin) -SetPoint Limit: 0.0282 (Kelvin) +SetPoint Limit: 20 (Kelvin) Temperature coefficient: 1 (Negative) Number of Breakpoints: 198 diff --git a/tcl/calcurves/U08130.340 b/tcl/calcurves/U08130.340 index 1baf133..7ad0b64 100644 --- a/tcl/calcurves/U08130.340 +++ b/tcl/calcurves/U08130.340 @@ -1,7 +1,7 @@ Sensor Model: RX-1000-BF0.007 Serial Number: U08130 Data Format: 4 (Log Ohms/Kelvin) -SetPoint Limit: 0.0167 (Kelvin) +SetPoint Limit: 10 (Kelvin) Temperature coefficient: 1 (Negative) Number of Breakpoints: 198 From 6d99df5bf1fa5e27153b6b64a929628ce5a7b522 Mon Sep 17 00:00:00 2001 From: l_samenv Date: Mon, 17 Oct 2022 17:09:43 +0200 Subject: [PATCH 02/16] CCU4: fix enum in he ext channel parameter --- tcl/drivers/ccu4.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcl/drivers/ccu4.tcl b/tcl/drivers/ccu4.tcl index a255017..1726313 100644 --- a/tcl/drivers/ccu4.tcl +++ b/tcl/drivers/ccu4.tcl @@ -228,7 +228,7 @@ proc stdConfig::ccu4 {{title CCU4} args} { node hea out prop label "add. He channels" - prop enum 0,1,6 + prop enum 0,1,6=6 node hch out -int prop label "LHe channel" From 60112ccdc5f3e22841aeecb174b203783f5e5ecf Mon Sep 17 00:00:00 2001 From: l_samenv Date: Mon, 17 Oct 2022 17:10:39 +0200 Subject: [PATCH 03/16] improve luft driver --- tcl/drivers/luft.tcl | 4 ++-- tcl/luft.tclsh | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/tcl/drivers/luft.tcl b/tcl/drivers/luft.tcl index d876760..a597cba 100644 --- a/tcl/drivers/luft.tcl +++ b/tcl/drivers/luft.tcl @@ -45,8 +45,8 @@ proc luft::writeCf {} { } else { luft::set_error "epics error: $val $errtxt" } - if {[scan [lindex [sct target] 0] %d period]} { - sct timeout [expr [clock seconds] + $period + 10] + catch { + sct timeout [expr [clock seconds] + $timeout + 10] } return idle } diff --git a/tcl/luft.tclsh b/tcl/luft.tclsh index 1aa17c6..c579f05 100755 --- a/tcl/luft.tclsh +++ b/tcl/luft.tclsh @@ -16,6 +16,7 @@ proc readpipe {} { puts stdout "> $line" } if {[eof $sea(pipe)]} { + puts stdout EOF exit } lassign $line adr date time value @@ -65,7 +66,12 @@ set env(EPICS_CA_AUTO_ADDR_LIST) NO set env(PATH) $env(PATH):/afs/psi.ch/project/sinq/rhel7/stow/base-3.15.5/bin/linux-x86_64-debug/ set sea(debug) [lindex "$argv 0" 0] -set sea(heartbeat) 300 +if {$sea(debug) eq "1"} { + set sea(heartbeat) 20 +} else { + set sea(heartbeat) 300 + set sea(debug) 0 +} # connect to sea server prep0 set sea(sock) [socket samenv.psi.ch 8640] @@ -78,15 +84,14 @@ if {$sea(debug)} { set cmd "/afs/psi.ch/project/sinq/rhel7/stow/base-3.15.5/bin/linux-x86_64-debug/camonitor [array names values]" set ret [catch {set proc [exec ps ax -o pid,args | grep $cmd]} msg] +set killed [list] if {$ret == 0} { foreach line [split $proc "\n"] { set l [split [string trim $line]] set c [lrange $l 1 end] if {"$c" eq "$cmd"} { # process was still running - if {$sea(debug)} { - puts stdout "kill $proc ($c)" - } + lappend killed [lindex $l 0] exec kill -9 [lindex $l 0] } } @@ -95,5 +100,15 @@ if {$ret == 0} { set sea(pipe) [open "|$cmd" r] fileevent $sea(pipe) readable readpipe -puts stdout [pid $sea(pipe)] +set mypid [pid $sea(pipe)] +set f [open $env(HOME)/monitfiles/luft_camonitor.pid w] +puts $f $mypid +close $f + +puts stdout $mypid +if {[llength $killed] > 0 && $sea(debug)} { + puts stdout "killed $killed" +} + +seacom "clientlog luft started" vwait forever From a7c452584192f53119c578a601cead9f7c0973bd Mon Sep 17 00:00:00 2001 From: l_samenv Date: Mon, 17 Oct 2022 17:11:21 +0200 Subject: [PATCH 04/16] enable motor valves --- tcl/dil3.stick | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcl/dil3.stick b/tcl/dil3.stick index d3bca3b..511052a 100644 --- a/tcl/dil3.stick +++ b/tcl/dil3.stick @@ -73,6 +73,6 @@ dil extVersion 1 catch {default ts control} catch {default ts heaterselect} -#makeMotorValve vb ${dilts}:3004 -#makeMotorValve vm ${dilts}:3006 +makeMotorValve vb ${dilts}:3004 +makeMotorValve vm ${dilts}:3006 From d223aa2d44597e1d5ec919401070db8da0714555 Mon Sep 17 00:00:00 2001 From: l_samenv Date: Mon, 17 Oct 2022 17:12:15 +0200 Subject: [PATCH 05/16] remove executable flag for calcurve --- tcl/calcurves/X145791.340 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tcl/calcurves/X145791.340 diff --git a/tcl/calcurves/X145791.340 b/tcl/calcurves/X145791.340 old mode 100755 new mode 100644 From fd176cd38cf981df42eefef55e1f5d41e289091a Mon Sep 17 00:00:00 2001 From: focus Date: Mon, 24 Oct 2022 14:42:26 +0200 Subject: [PATCH 06/16] fix he level edge cases - a full He reservoir might lead to a timeout message. a value of 111 is used instead of a "timeout" error - likewise, on a warm He reservoir -11.1 is used instead of the sensor warm message --- tcl/drivers/ccu4.tcl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tcl/drivers/ccu4.tcl b/tcl/drivers/ccu4.tcl index a255017..412304b 100644 --- a/tcl/drivers/ccu4.tcl +++ b/tcl/drivers/ccu4.tcl @@ -539,7 +539,13 @@ proc ccu4::update {} { set errvar [silent "" hgetpropval [sct]/$name errvar] if {$errvar ne ""} { set errval [hvali [sct]/$errvar] - if {$errval > 0} { + if {$errval == 1} { + # sens warm + updateval [sct]/$name -11 + } elseif {$errval == 3} { + # timeout + updateval [sct]/$name 111 + } elseif {$errval > 0} { hsetprop [sct]/$name geterror [lindex [split [hgetpropval [sct]/$errvar enum] ,] $errval] hupdate [sct]/$name $value } else { From 5f083bd9533ec615b8a4472d7ad5ad248d7f4d3f Mon Sep 17 00:00:00 2001 From: focus Date: Mon, 24 Oct 2022 14:45:58 +0200 Subject: [PATCH 07/16] remove +x for this cal file --- tcl/calcurves/X145791.340 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tcl/calcurves/X145791.340 diff --git a/tcl/calcurves/X145791.340 b/tcl/calcurves/X145791.340 old mode 100755 new mode 100644 From 69d6c09eed21b9dff0eef9c985edfdfbc95b47aa Mon Sep 17 00:00:00 2001 From: dmc Date: Fri, 28 Oct 2022 12:44:42 +0200 Subject: [PATCH 08/16] add sensirion to instconfig --- tcl/instconfig/dmc.tcl | 1 + 1 file changed, 1 insertion(+) diff --git a/tcl/instconfig/dmc.tcl b/tcl/instconfig/dmc.tcl index 6d2a5a5..f04a7c1 100644 --- a/tcl/instconfig/dmc.tcl +++ b/tcl/instconfig/dmc.tcl @@ -3,3 +3,4 @@ instconfig makeitem n2fill 1 instconfig makeitem hefill 1 # he vessel with RS232 instconfig makeitem hevessel 1 +instconfig makeitem sensirion 1 From bcc9b06193086da7f1d3c693c0901008d6c6c70d Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Nov 2022 14:06:40 +0100 Subject: [PATCH 09/16] fix issues on heliox --- tcl/drivers/heliox.tcl | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tcl/drivers/heliox.tcl b/tcl/drivers/heliox.tcl index 3676209..03bb43a 100644 --- a/tcl/drivers/heliox.tcl +++ b/tcl/drivers/heliox.tcl @@ -31,12 +31,14 @@ proc stdConfig::heliox {} { prop help "how many hours the pot should last (< 75)" } catch { - hsetprop /tt getsample hvali /ts/pot + hsetprop /tt getsample hvali /th/pot } msg clientput $msg } proc heliox::check_set {} { + # save for later + sct goto [sct target] if {[sct target] < 1.6} { set condense_text "" if {[hvali [sct]/lasts_until] > [DoubleTime]} { @@ -49,7 +51,7 @@ proc heliox::check_set {} { hupdate [sct]/mode 4 set condense_text "started" } - sct goto [sct target] + # sct goto [sct target] if {$condense_text ne ""} { sct print "going to [sct target] K might take a while - condense process is $condense_text" } @@ -111,13 +113,14 @@ proc heliox::check_set {} { } proc heliox::setmainsensor {mainsensor} { - set old [silent "" hgetpropval [sct objectPath] mainsensor] - if {$mainsensor ne $old} { - if {$old ne ""} { - catch {[sct controller] killupdatescript $old "updateval [sct objectPath]"} - } - [sct controller] updatescript $mainsensor "updateval [sct objectPath]" + if {$mainsensor eq "/th/low"} { + set old /th/pot + } else { + set old /th/low } + catch {[sct controller] killupdatescript $old "updateval [sct objectPath]"} + [sct controller] updatescript $mainsensor "updateval [sct objectPath]" + hsetprop [sct objectPath] mainsensor $mainsensor } proc heliox::check_mode {} { From 8e208aea4bd6c604f8e013f6a9374b39870fb37d Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 7 Nov 2022 14:07:08 +0100 Subject: [PATCH 10/16] fix vessel sensor config --- tcl/startup/ccu4make.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcl/startup/ccu4make.tcl b/tcl/startup/ccu4make.tcl index 6f44be1..0d0082c 100644 --- a/tcl/startup/ccu4make.tcl +++ b/tcl/startup/ccu4make.tcl @@ -81,6 +81,8 @@ proc makeCCU4 {args} { helium_register _cc /cc/h0 vessel if {$vessel ne "0"} { catch {cc hea 1} + catch {cc hem0 475} + catch {cc hfu0 0} } } helium_register _cc /cc/h From 87f2769b297cb2504462654120818cd79a3d1d99 Mon Sep 17 00:00:00 2001 From: zebra Date: Mon, 7 Nov 2022 14:08:34 +0100 Subject: [PATCH 11/16] shorten pipe pump start second phase already when V6 is at 50 --- tcl/drivers/dil12.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcl/drivers/dil12.tcl b/tcl/drivers/dil12.tcl index 3213355..b7e3bea 100644 --- a/tcl/drivers/dil12.tcl +++ b/tcl/drivers/dil12.tcl @@ -796,13 +796,13 @@ proc dil12::autostep {phase init} { } dil12::check_cool_button if {[result dil p1] < [hvali [sct]/p1low] && [result dil g1] < 5 && - [result dil p2] < [hvali [sct]/p2low] && [result dil v6pos] > 99} { + [result dil p2] < [hvali [sct]/p2low] && [result dil v6pos] > 50} { if {[sct pumptime] == 0} { dil12::openvalves v5a v2a v7 v2 v1 v6 v5 v3 vb_open dil v4a 1 sct pumptime [expr [DoubleTime] + 105] dil12::msg "pump for 2 more minutes" - } elseif {[DoubleTime] > [sct pumptime]} { + } elseif {[DoubleTime] > [sct pumptime] && [result dil v6pos] > 99} { # do not check for vb/vm here, as the user already might manipulate the valves dil12::openvalves v1 v6 v3 v5 dil v4a 0 From 72c8e990368a0d2044c65e4a48a67b8747ed5aad Mon Sep 17 00:00:00 2001 From: zebra Date: Tue, 8 Nov 2022 09:09:41 +0100 Subject: [PATCH 12/16] heliox: add holdflow and condenseflow params + fix mainsensor when switching from condense to lowT --- tcl/drivers/heliox.tcl | 49 ++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/tcl/drivers/heliox.tcl b/tcl/drivers/heliox.tcl index 03bb43a..29087d6 100644 --- a/tcl/drivers/heliox.tcl +++ b/tcl/drivers/heliox.tcl @@ -27,8 +27,20 @@ proc stdConfig::heliox {} { node pot_state -text upd - node target_hours par 60 + node target_hours par 48 prop help "how many hours the pot should last (< 75)" + + node holdflow out + default 1.5 + prop check heliox::check_holdflow + prop help "flow for holding pressure" + prop write stdSct::complete + + node condenseflow out + default 3 + prop check heliox::check_condenseflow + prop help "flow for condensing" + prop write stdSct::complete } catch { hsetprop /tt getsample hvali /th/pot @@ -67,7 +79,7 @@ proc heliox::check_set {} { set mainsensor /th/pot switch [sctval [sct]/mode] { 1 { - nv set 2.5 + nv set [hvali [sct parent]/holdflow]] th setsorb/channel C th setsorb 20 th mainloop set @@ -75,7 +87,7 @@ proc heliox::check_set {} { run tt [sct target] } 2 { - nv set 2.5 + nv set [hvali [sct parent]/holdflow]] th setsorb/channel C th setsorb 20 th mainloop set @@ -84,7 +96,7 @@ proc heliox::check_set {} { th set [sct target] } 3 { - nv set 2.5 + nv set [hvali [sct parent]/holdflow]] th setsorb/channel B th mainloop setsorb th set 0 @@ -129,7 +141,7 @@ proc heliox::check_mode {} { 0 { } 1 { - nv set 2.5 + nv set [hvali [sct parent]/holdflow] if {[sct target] != [hvali [sct]]} { th set [hvali /th/target] } @@ -139,7 +151,7 @@ proc heliox::check_mode {} { set state "hi-T mode" } 2 { - nv set 2.5 + nv set [hvali [sct parent]/holdflow] if {[sct target] != [hvali [sct]]} { th set [hvali /th/target] } @@ -149,7 +161,7 @@ proc heliox::check_mode {} { set state "mid-T mode" } 3 { - nv set 2.5 + nv set [hvali [sct parent]/holdflow] if {[hvali [sct parent]/lasts_until] > [DoubleTime]} { th set 0 th setsorb/channel B @@ -181,6 +193,20 @@ proc heliox::check_mode {} { sct update [sct target] } +proc heliox::check_condenseflow {} { + if {[sctval [sct parent]/mode] == 4} { + nv set [sct target] + } + sct update [sct target] +} + +proc heliox::check_holdflow {} { + if {[sctval [sct parent]/mode] != 4} { + nv set [sct target] + } + sct update [sct target] +} + proc heliox::complete {} { sct print [lindex {undefined "hi-T mode" "mid-T mode" "low-T mode" "-> condense"} [sct target]] return idle @@ -218,11 +244,11 @@ proc heliox::read {} { } if {[hvali [sct]] == 4} { if {$ts > 3} { - nv set 4 + nv set [hvali [sct parent]/condenseflow] set lasts_until 0 sct condense_deadline [expr $now + 36000] # timeout: should be 3600 } elseif {[result th sorb] > 39} { - nv set 4 + nv set [hvali [sct parent]/condenseflow] # 3He vapor pressure: 200 mbar at 2 K, power law set p [expr 200 * ($ts / 2.0) ** 3.5] # dump pressure at condensation start @@ -244,8 +270,9 @@ proc heliox::read {} { th setsorb/channel B th mainloop setsorb th setsorb [silent 0.25 hgetpropval [sct parent] goto] - sct update 3 - nv set 2.5 + # switch to lowT and trigger check_mode + hset [sct] 3 + nv set [hvali [sct parent]/holdflow]] clientput "the 3He pot [hvali [sct parent]/pot_state]" } } From bee02d8fa8c9a6174c7ff9d35070a2a98e4a7340 Mon Sep 17 00:00:00 2001 From: zebra Date: Wed, 9 Nov 2022 13:47:29 +0100 Subject: [PATCH 13/16] ipsmag: emit again a warning when slaves do not match --- tcl/drivers/ipsmag.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcl/drivers/ipsmag.tcl b/tcl/drivers/ipsmag.tcl index e92c156..e342775 100644 --- a/tcl/drivers/ipsmag.tcl +++ b/tcl/drivers/ipsmag.tcl @@ -303,7 +303,7 @@ proc ipsmag::update_leads {{n_of_slaves 3}} { set msg "slave currents ($currents) are not within $mincur .. $maxcur" hupdate [sct objectPath]/status $msg if {$status eq ""} { - # clientlog "ERROR: $msg" + clientlog "WARNING: $msg" } } elseif {[string match {slave currents *} $status]} { hupdate [sct objectPath]/status "" From 7c491cd49c1cac862f350f8b23972d14ccac9035 Mon Sep 17 00:00:00 2001 From: zebra Date: Wed, 9 Nov 2022 13:48:03 +0100 Subject: [PATCH 14/16] bug fix in heliox::check_set (sct instead fo sct parent) --- tcl/drivers/heliox.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tcl/drivers/heliox.tcl b/tcl/drivers/heliox.tcl index 29087d6..42021b0 100644 --- a/tcl/drivers/heliox.tcl +++ b/tcl/drivers/heliox.tcl @@ -79,7 +79,7 @@ proc heliox::check_set {} { set mainsensor /th/pot switch [sctval [sct]/mode] { 1 { - nv set [hvali [sct parent]/holdflow]] + nv set [hvali [sct]/holdflow] th setsorb/channel C th setsorb 20 th mainloop set @@ -87,7 +87,7 @@ proc heliox::check_set {} { run tt [sct target] } 2 { - nv set [hvali [sct parent]/holdflow]] + nv set [hvali [sct]/holdflow] th setsorb/channel C th setsorb 20 th mainloop set @@ -96,7 +96,7 @@ proc heliox::check_set {} { th set [sct target] } 3 { - nv set [hvali [sct parent]/holdflow]] + nv set [hvali [sct]/holdflow] th setsorb/channel B th mainloop setsorb th set 0 @@ -272,7 +272,7 @@ proc heliox::read {} { th setsorb [silent 0.25 hgetpropval [sct parent] goto] # switch to lowT and trigger check_mode hset [sct] 3 - nv set [hvali [sct parent]/holdflow]] + nv set [hvali [sct parent]/holdflow] clientput "the 3He pot [hvali [sct parent]/pot_state]" } } From c883fc12018ebdf48fe2cf0739bc75f426954fee Mon Sep 17 00:00:00 2001 From: dmc Date: Mon, 14 Nov 2022 14:46:14 +0100 Subject: [PATCH 15/16] fix he vessel reading when using ILM - add he_ilm to ma6.config - add new hem0 and hfu0 settings for vessel in ccu4make --- tcl/ma6.config | 2 +- tcl/startup/ccu4make.tcl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tcl/ma6.config b/tcl/ma6.config index ee69cbe..3b5cbb5 100644 --- a/tcl/ma6.config +++ b/tcl/ma6.config @@ -16,7 +16,7 @@ makenv tt -driver [lsdriver] { #tt set/limit 310 -makeCCU4 ma6 nv +makeCCU4 ma6 nv he_ilm hupdate /nv/set 1.2 makeN2Fill ccu4ilm { ln2fill lowlevel 10 diff --git a/tcl/startup/ccu4make.tcl b/tcl/startup/ccu4make.tcl index 0d0082c..12580b1 100644 --- a/tcl/startup/ccu4make.tcl +++ b/tcl/startup/ccu4make.tcl @@ -89,6 +89,12 @@ proc makeCCU4 {args} { } he_ilm { makenv hefill -driver ccu4ext he lev + set vessel [silent 0 result instconfig hevessel] + if {$vessel ne "0"} { + catch {cc hea 1} + catch {cc hem0 475} + catch {cc hfu0 0} + } GraphAdd lev % He_Level brown GraphAdd cc.h0 % HeVessel blue hsetprop /hefill fast_cmd "lev mode 1\ncc hf 1" From 465755ff00c0b320bb75fcf1ee390c7da23ab15b Mon Sep 17 00:00:00 2001 From: dmc Date: Thu, 24 Nov 2022 07:47:26 +0100 Subject: [PATCH 16/16] 2nd sensor of ma6.stick is no longer available --- tcl/ma6.stick | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcl/ma6.stick b/tcl/ma6.stick index d6aac64..c691879 100644 --- a/tcl/ma6.stick +++ b/tcl/ma6.stick @@ -1,3 +1,3 @@ stickDesc = standard MA6 stick -stick_sensors x63161 x63163 +stick_sensors x63161 undefined