deviceDesc = compact 6 Tesla vertical cryomagnet

defineTemperature tt
device stick_menu "ma6 dil2 dil3 dil4 coil"

makenv tt -driver [lsdriver] {
  lsc_sensor tm A -sensor x48581 -sensorname VTI
  lsc_sensor ts C -sensorname sample
  lsc_sensor ts_2 D  -sensor code -sensorname sample2
# 2023-07-06: sample sensor seems defect, use hx sensor
#  lsc_sensor ts D -sensorname sample
#  lsc_sensor ts_2 C  -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 -loopname sample
  }
}

#tt set/limit 310

makeCCU4 ma6 nv he_ilm

hupdate /nv/set 1.5
makeN2Fill ccu4ilm {
  ln2fill lowlevel 10
  ln2fill highlevel 100
  ln2fill minfillminutes 8
  ln2fill maxfillminutes 30
  ln2fill minholdhours 12
  ln2fill maxholdhours 96
}

makeIps -limit 6 -startRamp 0.3844 -port ma6-ts:3002
if {[result instrument] eq "tasp"} {
  mf limit 4
}

makeIlm -channels 2 -port ma6-ts:3001

makeHePump

makenv table -driver table /tt/tm {
  "tt set/prop" "50:50 300:20 400:10"
  "tt set/integ" "10:50 50:20 300:5"
  "tt dblctrl/int2" "10:10 50:100 300:600 400:1200"
  "tt dblctrl/prop_up" "20:0.1 50:0.4"
  "tt dblctrl/prop_lo" "20:0.1 50:0.8"
}

