From b8218e62036b41ac88e6827edc3571451a15fe1a Mon Sep 17 00:00:00 2001 From: l_samenv Date: Fri, 17 Jan 2025 17:05:02 +0100 Subject: [PATCH] move a lot of stuff to git --- compress_logger/compress.py | 13 +++++--- duout.py | 10 ------ tcl/ah2550.addon | 10 ++++++ tcl/altcur.job | 8 +++++ tcl/coil2.stick | 7 ++++ tcl/dilcal.addon | 65 +++++++++++++++++++++++++++++++++++++ tcl/dilscf.config | 6 ++++ tcl/drivers/sdvm.tcl | 51 +++++++++++++++++++++++++++++ tcl/drivers/srsbga244.tcl | 30 +++++++++++++++++ tcl/dryrex.config | 64 ++++++++++++++++++++++++++++++++++++ tcl/fitest.config | 55 +++++++++++++++++++++++++++++++ tcl/flowsas.config | 8 +++++ tcl/frappy.addon | 6 ++++ tcl/frappy.stick | 5 +++ tcl/heatramp.job | 18 ++++++++++ tcl/iv.addon | 8 +++++ tcl/ls372flamedil.addon | 7 ++++ tcl/ls372sc.addon | 16 +++++++++ tcl/ma10b.config | 41 +++++++++++++++++++++++ tcl/ma6_sampleheat.stick | 2 +- tcl/pestick.stick | 13 ++++++++ tcl/ppms_frappy2.config | 11 +++++++ tcl/rrr.job | 50 ++++++++++++++++++++++++++++ tcl/srrr.job | 28 ++++++++++++++++ tcl/srsbga244.addon | 7 ++++ tcl/test_vf.config | 13 ++++++++ tcl/tramp.job | 15 +++++++++ tcl/uzhstick_v2.config | 29 +++++++++++++++++ tcl/varioxb_sea.config | 58 +++++++++++++++++++++++++++++++++ tcl/varioxb_sea.stick | 9 +++++ 30 files changed, 647 insertions(+), 16 deletions(-) delete mode 100644 duout.py create mode 100644 tcl/ah2550.addon create mode 100644 tcl/altcur.job create mode 100644 tcl/coil2.stick create mode 100644 tcl/dilcal.addon create mode 100644 tcl/dilscf.config create mode 100644 tcl/drivers/sdvm.tcl create mode 100644 tcl/drivers/srsbga244.tcl create mode 100644 tcl/dryrex.config create mode 100644 tcl/fitest.config create mode 100644 tcl/flowsas.config create mode 100644 tcl/frappy.addon create mode 100644 tcl/frappy.stick create mode 100644 tcl/heatramp.job create mode 100644 tcl/iv.addon create mode 100644 tcl/ls372flamedil.addon create mode 100644 tcl/ls372sc.addon create mode 100644 tcl/ma10b.config create mode 100644 tcl/pestick.stick create mode 100644 tcl/ppms_frappy2.config create mode 100644 tcl/rrr.job create mode 100644 tcl/srrr.job create mode 100644 tcl/srsbga244.addon create mode 100644 tcl/test_vf.config create mode 100644 tcl/tramp.job create mode 100644 tcl/uzhstick_v2.config create mode 100644 tcl/varioxb_sea.config create mode 100644 tcl/varioxb_sea.stick diff --git a/compress_logger/compress.py b/compress_logger/compress.py index 4622afd..a2f0a81 100644 --- a/compress_logger/compress.py +++ b/compress_logger/compress.py @@ -96,7 +96,7 @@ def treat(action, instrument='', years='past', vars=None): if not vars: varlist = list(glob('*')) else: - varlist = vars + varlist = vars for variable in varlist: if action == COMPRESS: if os.path.isdir(logdir+variable): @@ -110,7 +110,7 @@ def treat(action, instrument='', years='past', vars=None): if os.path.isfile(gzdir + variable + '.gz'): expand(logdir, gzdir, variable) else: - print '%s is missing' % (gzdir + variable + '.gz') + print(gzdir + variable + '.gz', 'is missing') if __name__ == '__main__': action = COMPRESS @@ -125,6 +125,8 @@ if __name__ == '__main__': cleanup = False elif opt == '-c': cleanup = False + elif opt == '-n': + action = None elif opt == '-i': addto = instruments elif opt == '-p': @@ -164,10 +166,10 @@ if __name__ == '__main__': print("years: %s" % repr(years)) print("vars: %s" % ", ".join(vars)) for instrument in instruments: - print(instdir(instrument)) + print('instrument:', instdir(instrument)) if cleanup: for pat in removedirs: - print pat + print('remove', pat) gap = 0 t0 = time.time() t1 = t0 @@ -182,4 +184,5 @@ if __name__ == '__main__': gap += 1 time.sleep(min(1.0, now - t1)) # be nice t1 = now - treat(action, instrument, years, vars) + if action: + treat(action, instrument, years, vars) diff --git a/duout.py b/duout.py deleted file mode 100644 index 3908523..0000000 --- a/duout.py +++ /dev/null @@ -1,10 +0,0 @@ -# create du.out with (for example) -# -# du -cd 1 logger/2016 > du.out - -with open('du.out') as f: - duout = [line.split(None,1) for line in f.read().split('\n')] - while len(duout[-1]) != 2: - duout = duout[:-1] - for size, file in sorted([(int(size), file) for size, file in duout]): - print(size, file) diff --git a/tcl/ah2550.addon b/tcl/ah2550.addon new file mode 100644 index 0000000..2060d17 --- /dev/null +++ b/tcl/ah2550.addon @@ -0,0 +1,10 @@ +addonDesc = Andeen Hagerlin 2550 Capacitance Bridge +makenv cap -driver ah2550 + + +makenv capslope -driver slope /cap/cap +GraphAdd cap.cap pF Cap blue +GraphAdd cap.loss tand Loss blue + +GraphAdd capslope pF/min capslope blue + diff --git a/tcl/altcur.job b/tcl/altcur.job new file mode 100644 index 0000000..ad4f898 --- /dev/null +++ b/tcl/altcur.job @@ -0,0 +1,8 @@ +set ival 0.5 + +while {$ival<3 } { + cs iset $ival + wait 21 + cs iset -$ival + wait 21 +} diff --git a/tcl/coil2.stick b/tcl/coil2.stick new file mode 100644 index 0000000..fb4d75d --- /dev/null +++ b/tcl/coil2.stick @@ -0,0 +1,7 @@ +stickDesc = coil reading (channel D) + +stick_sensors undefined coil + +catch { + eval "[hgetpropval /lnv switchgraph] 1" +} diff --git a/tcl/dilcal.addon b/tcl/dilcal.addon new file mode 100644 index 0000000..6faba4a --- /dev/null +++ b/tcl/dilcal.addon @@ -0,0 +1,65 @@ +addonDesc = ULT calibration setup + +# LakeShore 372 Thermometers 1-6 + +makenv res1 -driver 372_lsc -port dilsc-ls2.psi.ch:7777 { + +lsc_sensor rx1 1 -sensor U08127 -excitation 20uV -filter 10 +lsc_sensor rx2 2 -sensor raw -excitation 20uV -filter 10 +lsc_sensor rx3 3 -sensor raw -excitation 20uV -filter 10 +lsc_sensor rx4 4 -sensor raw -excitation 20uV -filter 10 +lsc_sensor rx5 5 -sensor raw -excitation 20uV -filter 10 +#lsc_sensor rx6 6 -sensor raw -excitation 20uV -filter 10 + +# heater output 0 (=sample heater) for channel 4 (still) + lsc_loop set -loop 0 -channel 1 -maxheater 100mA -resist 100 + +} + +# LakeShore 372 Thermometers 7-13 + +makenv res2 -driver 372_lsc -port linse-se1-ls.psi.ch:7777 { + +lsc_sensor rx7 1 -sensor raw -excitation 20uV -filter 10 +lsc_sensor rx8 2 -sensor x165053 -excitation 20uV -filter 10 +lsc_sensor rx9 3 -sensor raw -excitation 20uV -filter 10 +lsc_sensor rx10 4 -sensor raw -excitation 20uV -filter 10 +lsc_sensor rx13 5 -sensor raw -excitation 20uV -filter 10 + +# heater output 0 (=sample heater) for channel 4 (still) +lsc_loop set -loop 0 -channel 1 -maxheater 0.5W -resist 15 + +} + +# Stuff for calibrations with fixed point device + +#defineTemperature tmix + +makenv cmn -driver cmnnanov -port ldmse-d910-ts.psi.ch:3001 + +GraphAdd cmn.u1 V cmn +GraphAdd cmn.u2 V fixp + +makenv softloop -driver piloop -invar "/cmn/temp" -outvar "res2 set/manualpower" \ + -inpfunc 1 -outfunc 1 -outlinear 1e-7 -precision 1e-15 -outmin 1e-11 -outmax 0.1 + +GraphAdd cmn.temp K +GraphAdd softloop.reg K cmn_reg +GraphAdd softloop.target K cmn_target +GraphAdd res2.rx8 K T_rx8 + +GraphAdd res1.rx1.raw Ohm +GraphAdd res1.rx2.raw Ohm +GraphAdd res1.rx3.raw Ohm +GraphAdd res1.rx4.raw Ohm +GraphAdd res1.rx5.raw Ohm +#GraphAdd res1.rx6.raw Ohm + +GraphAdd res2.rx7.raw Ohm +GraphAdd res2.rx8.raw Ohm +GraphAdd res2.rx9.raw Ohm +GraphAdd res2.rx10.raw Ohm +#GraphAdd res2.rx11.raw Ohm +#GraphAdd res2.rx12.raw Ohm +GraphAdd res2.rx13.raw Ohm + diff --git a/tcl/dilscf.config b/tcl/dilscf.config new file mode 100644 index 0000000..b04b077 --- /dev/null +++ b/tcl/dilscf.config @@ -0,0 +1,6 @@ +deviceDesc = DILSC through Frappy + +set ::secop_version 4 + +makenv frappy -driver secop -port dilsc:5000 + diff --git a/tcl/drivers/sdvm.tcl b/tcl/drivers/sdvm.tcl new file mode 100644 index 0000000..8c98b15 --- /dev/null +++ b/tcl/drivers/sdvm.tcl @@ -0,0 +1,51 @@ +# software dvm + + +namespace eval sdvm { +} + +if {![namespace exists trun]} { + source drivers/trun.tcl +} + +proc stdConfig::sdvm args { + variable name + variable path + variable node + + scanargs $args var -invar -outvar + +# custinp, custout: +# custom input / output function +# log: allow choice between linear and logarithmic +# none: only linear +# else: a custom function. the last arguments are either +# forward conversion +# inv inverted conversion + + variable hostport none + controller dumprot + + } + + obj dvm -upd out + prop lastinput 0 + prop custinp $custinp1 + prop custinp $custinp2 + + kids "$title settings" { + node dctime par $dctime + prop help {time held at one polarity [sec]} + + node current par $current + prop help {set current in A} + + node invar -text out + default 0 + prop check piloop::setinvar + prop write stdSct::completeUpdate + prop visible false + + node outvar -text par $outvar + prop visible false + diff --git a/tcl/drivers/srsbga244.tcl b/tcl/drivers/srsbga244.tcl new file mode 100644 index 0000000..5358290 --- /dev/null +++ b/tcl/drivers/srsbga244.tcl @@ -0,0 +1,30 @@ +namespace eval srsbga244 {} { +} + +proc stdConfig::srsbga244 {} { + controller std "" 5 + prop read srsbga244::read + prop update srsbga244::update + + obj He3 rd + prop cmd RATO?1% + kids He3 { + # node prx rd -text + # prop cmd PRX + + node press rd + prop cmd PRES?bar + + } +} + +proc srsbga244::read {} { + sct send "[sct cmd]\r\n" + return update +} + +proc srsbga244::update {} { + sct update [sct result] + return idle +} + diff --git a/tcl/dryrex.config b/tcl/dryrex.config new file mode 100644 index 0000000..ba83dfd --- /dev/null +++ b/tcl/dryrex.config @@ -0,0 +1,64 @@ +deviceDesc = dry system + +if {"[sicsdescriptor t]" != "notfound"} { +clientput [listexe] + stopexe t +clientput success + success +clientput "removeobject t" + removeobject t +} + +# --- configuration script +config listen 1 + +# create the device +# change X77456 for X154360 when calibration exists + +## Configuration for attocube testing: +#makenv tt -driver [lsdriver] { +# lsc_sensor tm A -sensor X71741 -sensorname top +# lsc_sensor ts B -sensor X68433 -sensorname bottom +# lsc_sensor tc C -sensor X154360 -sensorname middle +# lsc_loop set -loop 1 -channel B -maxheater 25W -resist 25Ohm +#} + +# Configuration for braid thermal conductivity measurements: +makenv tt -driver [lsdriver] { + lsc_sensor ts B -sensor X154360 -sensorname stage2 + lsc_loop set -loop 1 -channel B -maxheater 25W -loopname braid -resist 50Ohm +} + +tt set/limit 315 +tt set/prop 15 +tt set/integ 10 +catch { + enableTable 0 +} + + + makenv tx -driver 370_lsc { + lsc_sensor S1 -channel 1 -sensor ruox002 + lsc_sensor S2 -channel 3 -sensor ruox001 + #please set sample Thermpmeter to the real calib + GraphAdd tx.S1 K S1 yellow + GraphAdd tx.S2 K S2 cyan +} + + + +# --- compressor --- +makenv cp2800 cp2800 + +GraphAdd cp2800.inp_water_t C InpWater_C red +GraphAdd cp2800.out_water_t C OutWater_C blue +GraphAdd cp2800.oil_t C Oil_C green +GraphAdd cp2800.helium_t C Helium_C magenta + +GraphAdd cp2800.high_side_p_min psi High_psi_min red +GraphAdd cp2800.high_side_p_max psi High_psi_max orange +GraphAdd cp2800.low_side_p_min psi Low_psi_min green +GraphAdd cp2800.low_side_p_max psi Low_psi_max dark_green + + + diff --git a/tcl/fitest.config b/tcl/fitest.config new file mode 100644 index 0000000..9d19e8e --- /dev/null +++ b/tcl/fitest.config @@ -0,0 +1,55 @@ +deviceDesc = FI control (new FI control from valentin) + +makenv tt -driver fictrl -port ldm-fi-ts:3001 { + voltscale 17.8 + min_resist 0.02 + max_resist 0.05 + current_offset -1.11 + voltage_offset 0.05 +} + +defineTemperature tt + +#GraphAdd tt.t1 K T1 +#GraphAdd tt.t2 K T2 +#GraphAdd tt.t3 K T3 +GraphAdd tt.t4 K T4 +GraphAdd tt.target K T_set +#GraphAdd tt.t1.raw mV V1 +#GraphAdd tt.t2.raw mV V2 +#GraphAdd tt.t3.raw mV V3 +GraphAdd tt.t4.raw mV V4 +GraphAdd tt.tref K_2 +GraphAdd tt.tout K_2 +GraphAdd tt.power W power +GraphAdd tt.htr % htr +GraphAdd tt.resist Ohm resist +GraphAdd pv mbar p_vac +GraphAdd tt.s1 i s1 +GraphAdd tt.s2 i s2 +GraphAdd tt.s3 i s2 +GraphAdd tt.s4 i s2 +#GraphAdd tt.cool i cool + +GraphAdd tt.slope K/min +GraphAdd tt.sramp K/min +#GraphAdd tt.powerset W +#GraphAdd tt.powerprop W +GraphAdd tt.maxpower W + +tt t1/curve type-c +tt t2/curve type-c +tt t3/curve type-k +tt t4/curve type-k +tt ctrlchan 4 +tt ramp 99 + +makenv pv -driver pfeiffertpg -port ldm-fi-ts:3002 + +makenv table -driver table /tt/t1 { + "tt smooth" "300:500 400:160 500:120 700:60 1000:30" + "tt prop" "300:6 500:3 700:1.5 1000:1" + "tt int" "300:40 500:20 700:10 1000:10" + "tt maxpower" "300:150 500:200 1000:500 1400:2000 1800:3000" +} + diff --git a/tcl/flowsas.config b/tcl/flowsas.config new file mode 100644 index 0000000..d45abb4 --- /dev/null +++ b/tcl/flowsas.config @@ -0,0 +1,8 @@ +deviceDesc = flowsas + +set ::secop_version 4 + +makenv secop -driver secop +#debug _secop + +#dolater 0 _secop poll /secop 1 read test diff --git a/tcl/frappy.addon b/tcl/frappy.addon new file mode 100644 index 0000000..e72282b --- /dev/null +++ b/tcl/frappy.addon @@ -0,0 +1,6 @@ +addonDesc = FRAPPY history recorder for addons + +set ::secop_version 4 + +set nr [string range $serverport end-1 end] +makenv frappy_main -driver secop -port [frappy_port addons] diff --git a/tcl/frappy.stick b/tcl/frappy.stick new file mode 100644 index 0000000..3e75cff --- /dev/null +++ b/tcl/frappy.stick @@ -0,0 +1,5 @@ +stickDesc = FRAPPY history recorder for stick + +set ::secop_version 4 + +makenv frappy_main -driver secop -port [frappy_port stick] diff --git a/tcl/heatramp.job b/tcl/heatramp.job new file mode 100644 index 0000000..f89053a --- /dev/null +++ b/tcl/heatramp.job @@ -0,0 +1,18 @@ +hola reset + +proc measure { T } { + clientput set heater to $T W + tt setsamp/manualpower $T + wait 3600 + clientput DONE! +} + +wait 3600 +hola file "20240912_thermalcond.dat" +hola command measure +hola vars tt res.s1 res.s2 res.s3 res.s4 res.s5 tt.setsamp/power +hola measpars 600 tt res.s1 res.s2 res.s3 res.s4 res.s5 tt.setsamp/power +hola open tt res.s1 res.s2 res.s3 res.s4 res.s5 tt.setsamp/power +hola do 0.0 0.012 0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3 0.325 0.35 0.375 0.4 0.425 0.45 0.475 0.5 0.0 + + diff --git a/tcl/iv.addon b/tcl/iv.addon new file mode 100644 index 0000000..5857a0f --- /dev/null +++ b/tcl/iv.addon @@ -0,0 +1,8 @@ +addonDesc = k2601b current source and k2182a voltmeter + +makenv cs -driver k2601b +makenv vm -driver nanov + +GraphAdd vm.u1 V Voltage +GraphAdd cs.iset A Current + diff --git a/tcl/ls372flamedil.addon b/tcl/ls372flamedil.addon new file mode 100644 index 0000000..70c99c6 --- /dev/null +++ b/tcl/ls372flamedil.addon @@ -0,0 +1,7 @@ +addonDesc = additional LakeShore 372 + +makenv ts -driver 372_lsc -port flamedil-ls.psi.ch:7777 { + lsc_sensor t2 1 -sensor rx198 -excitation 20uV -filter 1 + lsc_sensor ts 3 -sensor cx198 -excitation 20uV -filter 1 +} + diff --git a/tcl/ls372sc.addon b/tcl/ls372sc.addon new file mode 100644 index 0000000..4b7e15c --- /dev/null +++ b/tcl/ls372sc.addon @@ -0,0 +1,16 @@ +addonDesc = additional LakeShore 372 + +#-sensor abs: converted value will be absolute value (-sensor raw does respect sign) + +makenv ls_dilsc -driver 372_lsc -port dilsc-ls2.psi.ch:7777 { + lsc_sensor plato 7 -sensor QT2-PS1_RuO -excitation 20uV -filter 1 -dwell 3 + #lsc_sensor chip 2 -sensor 2023-BC1_2 -excitation 20uV -filter 1 -dwell 3 + #lsc_sensor chip 8 -sensor 2024-BC1-V2 -excitation 20uV -filter 1 -dwell 3 + #lsc_loop heater_plato -loop 0 -channel 1 -maxheater 10mA -resist 320 -loopname plato + #lsc_sensor plato 8 -sensor U08910 -excitation 20uV -filter 1 -dwell 3 + lsc_sensor puck A -sensor U08127 -excitation 20uV -filter 1 -dwell 3 + lsc_loop heater_plato -loop 0 -channel A -maxheater 10mA -resist 84 -loopname plato +} + +GraphAdd ls_dilsc.plato.raw Ohm T_plato.raw +GraphAdd ls_dilsc.chip.raw Ohm T_chip.raw diff --git a/tcl/ma10b.config b/tcl/ma10b.config new file mode 100644 index 0000000..f52e170 --- /dev/null +++ b/tcl/ma10b.config @@ -0,0 +1,41 @@ +deviceDesc = MA10 + FRAPPY history recorder for magfield + +set ::secop_version 4 + +set ins [result instrument] +if {[string match "prep*" $ins]} { + set nr [string range $ins end end] +} else { + error "runs on prep0-9 only" +} +makenv frappy_main -driver secop -port localhost:1511$nr +makeHePump +deviceDesc = 10 Tesla vertical cryomagnet + +defineTemperature tt +device stick_menu "ma10 dil2 dil3 dil4 heliox oven2 coil" + +makenv tt -driver [lsdriver] { + lsc_sensor tm A -sensor x112386 -sensorname VTI + lsc_sensor ts C -sensorname sample + lsc_sensor ts_2 D -sensor code -sensorname sample2 + lsc_loop set -loop 1 -channel A -maxheater 32W -resist 80Ohm -color green + if {[lsdriver] eq "336_lsc"} { + lsc_loop setsamp -loop 2 -channel C -maxheater 62.5W -resist 20Ohm -color dark_green + } +} +tt set/limit 310 + +makeCCU4 ma10 nv_release_blocked +hupdate /nv/set 1.8 + +# increase motor current +cc mc 75 + +makenv table -driver table /tt/tm { + "tt set/prop" "50:50 300:20" + "tt set/integ" "10:50 50:20 300:5" + "tt dblctrl/int2" "2:10 20:50 50:300 120:500 300:800" + "tt dblctrl/prop_up" "20:0.1 50:0.4" + "tt dblctrl/prop_lo" "20:0.1 50:0.8" +} diff --git a/tcl/ma6_sampleheat.stick b/tcl/ma6_sampleheat.stick index 79f0d68..5ace843 100644 --- a/tcl/ma6_sampleheat.stick +++ b/tcl/ma6_sampleheat.stick @@ -1,3 +1,3 @@ -\stickDesc = MA6 stick with heater and pt-1000 sensor +stickDesc = MA6 stick with heater and pt-1000 sensor stick_sensors x63161 pt-1000 diff --git a/tcl/pestick.stick b/tcl/pestick.stick new file mode 100644 index 0000000..5feb0c6 --- /dev/null +++ b/tcl/pestick.stick @@ -0,0 +1,13 @@ +stickDesc = PE stick via Frappy / for MB11 / VarioxB + +set ::secop_version 4 + +set ins [result instrument] +if {[string match "prep*" $ins]} { + set nr [string range $ins end end] + makenv frappy_stick -driver secop -port localhost:1521$nr +} elseif {[lindex [split [info hostname] .] 0] ne $ins} { + error "runs on instruments or prep0-9 only" +} else { + makenv frappy_stick -driver secop -port localhost:15201 +} diff --git a/tcl/ppms_frappy2.config b/tcl/ppms_frappy2.config new file mode 100644 index 0000000..b83ab30 --- /dev/null +++ b/tcl/ppms_frappy2.config @@ -0,0 +1,11 @@ +deviceDesc = PPMS FRAPPY history recorder, with stick + +set ::secop_version 4 + +makenv frappy_main -driver secop -port pc12694:5000 +makenv frappy_stick -driver secop -port localhost:15201 +#makenv frappy_addons -driver secop -port localhost:15301 +#debug _secop + +#dolater 0 _secop poll /secop 1 read test + diff --git a/tcl/rrr.job b/tcl/rrr.job new file mode 100644 index 0000000..d2ec660 --- /dev/null +++ b/tcl/rrr.job @@ -0,0 +1,50 @@ +set Tmax 300 +set Tmin 4.0 +set Tramp 5 +set Imax 1.0 + +proc measres {iset dv} { + cs iset $iset + wait 15 + set Vpos [result vm u1] + cs iset -$iset + wait 15 + set Vneg [result vm u1] + set res [expr ($Vpos - $Vneg) / (2. * $iset)] + set inew [expr $dv/ ($Vpos - $Vneg) * $iset] + return [list $res $inew] +} + + +tt set/ramp $Tramp +set iset 1.0 +set resistance 0 +set rhigh 0 +set rlow 1 +cs Enable 1 + +while {[result tt] > [expr $Tmin * 1.1] | [result tt] < $Tmax } { + set test [measres $iset 1E-7] + set resistance [lindex $test 0] + set iset [format "%.3f" [lindex $test 1]] + if {$iset > $Imax} { + set iset $Imax + } + + clientput [result tt] ${resistance} + + if {[result tt] > 290} { + set rhigh $resistance + set thigh [result tt] + } + + if {[result tt] < 6.0} { + set rlow $resistance + set tlow [result tt] + } +} + +clientput resistance at ${thigh} K : ${rhigh} Ohm +clientput resistance at ${tlow} K : ${rlow} Ohm +clientput RRR : [ expr $rhigh / $rlow ] + diff --git a/tcl/srrr.job b/tcl/srrr.job new file mode 100644 index 0000000..acc03e6 --- /dev/null +++ b/tcl/srrr.job @@ -0,0 +1,28 @@ + +proc measres {iset dv} { + cs iset $iset + wait 15 + set Vpos [result vm u1] + cs iset -$iset + wait 15 + set Vneg [result vm u1] + set res [expr ($Vpos - $Vneg) / (2. * $iset)] + set inew [expr $dv/ ($Vpos - $Vneg) * $iset] + return [list $res $inew] +} + + +set iset 1.0 +set resistance 0 +cs Enable 1 + +while {0 < 1 } { + set test [measres $iset 1E-7] + set resistance [lindex $test 0] + set iset [format "%.3f" [lindex $test 1]] + if {$iset > 1.0} { + set iset 1.0 + } + + clientput ${resistance} Ohm +} diff --git a/tcl/srsbga244.addon b/tcl/srsbga244.addon new file mode 100644 index 0000000..847984b --- /dev/null +++ b/tcl/srsbga244.addon @@ -0,0 +1,7 @@ +addonDesc = SRS binary gas analyser 244 RS232 + +makenv bga -driver srsbga244 -port ldmprep12-ts:3004 + +GraphAdd bga % He3 blue +GraphAdd bga.press bar bga + diff --git a/tcl/test_vf.config b/tcl/test_vf.config new file mode 100644 index 0000000..8e61920 --- /dev/null +++ b/tcl/test_vf.config @@ -0,0 +1,13 @@ +deviceDesc = test ILL furnace with iono pi max + +set ::secop_version 4 + +makenv secop -driver secop + +makenv hvac -driver pfeiffertpg + +makenv softloop -driver piloop -invar "/t" -outvar "htr target" \ + -inpfunc 0 -outfunc 0 -outlinear 1e-9 -precision 1e-10 -outmin 0 -outmax 30 -int 100 -prop 200 + + +GraphAdd hvac mbar hvac blue diff --git a/tcl/tramp.job b/tcl/tramp.job new file mode 100644 index 0000000..49aac8d --- /dev/null +++ b/tcl/tramp.job @@ -0,0 +1,15 @@ +hola reset + +proc measure { T } { + clientput set T to $T + drive tt $T + clientput DONE! +} + +hola file "20230706_CCR2ht.dat" +hola command measure +hola vars tt tm te tk tt.set/power +hola measpars 90 tt tm te tk tt.set/power +hola open tt tm te tk tt.set/power +hola do 480 steps -20 40 + diff --git a/tcl/uzhstick_v2.config b/tcl/uzhstick_v2.config new file mode 100644 index 0000000..c4efbd8 --- /dev/null +++ b/tcl/uzhstick_v2.config @@ -0,0 +1,29 @@ +\deviceDesc = UZH_pulsed_magnet_chamber + +#defineTemperature cf + +#makenv cf -driver itcm -port lollypop-ts.psi.ch:3001 + +makenv tt -driver 336_lsc { + lsc_sensor tm A -sensor X131175 -sensorname magnet +# lsc_sensor ts B -sensor x148906 -sensorname sample +# lsc_sensor ts C -sensor X148903 -sensorname sample +#lsc_loop set -loop 1 -channel A -maxheater 60W -resist 40Ohm -color green +} + +#tt set/prop 25 +#tt set/integ 20 +#tt dblctrl/int2 100 + +#makeCCU4 lollyp he nv +#cc hav 1 +#cc hea 1 + +#nv ctrl/adjust_minpulse 0 +#nv ctrl/openpulse 0 +#nv ctrl/prop_o 0.5 +#nv ctrl/prop_c 0.5 + +#hupdate /hepump 3 +#hepump calib 1 +#dolater 1 hepump 3 diff --git a/tcl/varioxb_sea.config b/tcl/varioxb_sea.config new file mode 100644 index 0000000..758e9f7 --- /dev/null +++ b/tcl/varioxb_sea.config @@ -0,0 +1,58 @@ +deviceDesc = 100mm Variox + +device stick_menu "mb11 dil5 varioxb_sea" + +defineTemperature tvs + +makenv tvs -driver itctemp -port linvb-ts:3001 -controller _tt DB6.T1 DB1.H1 +GraphAdd tvs K T_VTIs red +GraphAdd tvs.set K T_stat_set orange +GraphAdd tvs.pow W pow_tvs red +#GraphAdd tvs.raw Ohm R_tvs red + +makenv tvd -driver itctemp -port linvb-ts:3001 -controller _tt DB7.T1 DB2.H1 +GraphAdd tvd K T_VTId magenta +GraphAdd tvd.set K T_dyn_set violet +GraphAdd tvd.pow W pow_tvd magenta +#GraphAdd tvd.raw Ohm R_tvd magenta + +makenv pstat -driver itcpress -port linvb-ts:3001 -controller _tt DB5.P1 DB3.G1 +GraphAdd pstat mbar p_stat +GraphAdd pstat.pos % nv_stat +GraphAdd pstat.set mbar p_stat_set + +makenv pdyn -driver itcpress -port linvb-ts:3001 -controller _tt DB8.P1 DB4.G1 +GraphAdd pdyn mbar p_dyn +GraphAdd pdyn.pos % nv_dyn +GraphAdd pdyn.set mbar p_dyn_set + +makeIpsLev -port linvb-ts:3002 -controller _ta -slot DB4 + +makenv tneck1 -driver itctemp -port linvb-ts:3002 -controller _ta MB1.T1 MB0.H1 +makenv tneck2 -driver itctemp -port linvb-ts:3002 -controller _ta DB6.T1 DB1.H1 +makenv tnvs -driver itctemp -port linvb-ts:3002 -controller _ta DB7.T1 DB2.H1 +makenv tnvd -driver itctemp -port lnivb-ts:3002 -controller _ta DB8.T1 DB3.H1 + +makeN2Fill ccu4ilm { + ln2fill lowlevel 30 + ln2fill highlevel 95 + ln2fill minfillminutes 8 + ln2fill maxfillminutes 40 + ln2fill minholdhours 24 + ln2fill maxholdhours 96 +# appendVars ln2fill.smooth/%/N2smooth/13 +} + + +GraphAdd tneck1 K_2 T_neck1 +GraphAdd tneck1.pow W pow_neck1 +GraphAdd tneck2 K_2 T_neck2 +GraphAdd tneck2.pow W pow_neck2 +GraphAdd tnvs K_2 T_nvs +#GraphAdd tnvs.pow W pow_nvs +GraphAdd tnvd K_2 T_nvd +#GraphAdd tnvd.pow W pow_nvd + + +setstickrot linvb-ts:3004 + diff --git a/tcl/varioxb_sea.stick b/tcl/varioxb_sea.stick new file mode 100644 index 0000000..a776c3b --- /dev/null +++ b/tcl/varioxb_sea.stick @@ -0,0 +1,9 @@ +stickDesc = stick for Variox B + +defineTemperature ts + +makenv ts -driver itctemp -port linvb-ts:3001 -controller _tt MB1.T1 MB0.H1 +GraphAdd ts K T_sam blue +GraphAdd ts.set K T_sam_set cyan +GraphAdd ts.pow W pow_ts blue +GraphAdd ts.raw Ohm R_ts blue