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 CR2 A -sensor X148903 -sensorname CR2
  #lsc_sensor ts B -sensor X68433 -sensorname platform  
  lsc_sensor SR2 C -sensor X148906 -sensorname SR2
  lsc_sensor CZ2 D -sensor X142474 -sensorname CZ2	
  lsc_loop set -loop 1 -channel C -maxheater 25W -loopname braid -resist 81Ohm
}

tt set/limit 315
tt set/prop 15
tt set/integ 10
catch {
  enableTable 0
}

# Add second LakeShore (LS336)
makenv ttb -driver 336_lsc -port lollypop-ls:7777 {
  # Choose which brad is connecter and change the corresponding thermomemter calibration (copy from the top LakeShore 340)
  lsc_sensor PLAT A -sensor X68433 -sensorname platform
  lsc_loop set -loop 1 -channel A -maxheater 25W -resist 25Ohm -loopname platform -color green
}

ttb set/prop 25
ttb set/integ 20
ttb dblctrl/int2 100



if {0} {

# lakeshore 370

 makenv tx -driver 370_lsc {
  lsc_sensor Exhaust 1 pt1000e
#  lsc_sensor Shield1top 2 pt1000e
  lsc_sensor Shield1bot 3 pt1000e
  lsc_sensor VTI 4 x68433
  lsc_sensor Sample 7 x75610
  #please set sample Thermpmeter to the real calib
  GraphAdd tx.Exhaust K Stage2PT yellow
#  GraphAdd tx.Shield1top K Shield1_top orange
  GraphAdd tx.Shield1bot K Shield1_bot cyan
  GraphAdd tx.VTI K VTI_HX orange
  GraphAdd tx.Sample K Sample_T black
 }

}
#debug tx


# --- 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

if {0} {
#---- Pressure gauge ---

 makenv p pinp
 GraphAdd p.a2 mbar P_pot yellow
 GraphAdd p.a3 mbar P_VTI green
 GraphAdd p.a4 mbar P_dump blue
 GraphAdd p.a5 mbar Compress red
 GraphAdd p.a6 mbar P3 cyan
 GraphAdd p.a7 mbar P4 magenta
#GraphAdd p.gnd mV1 gnd blue
#GraphAdd p.max mV2 max red


#--- flow meter ---

 makenv flow bronkhorst

 appendVars flow/ff/flow flow.counter/float/counter flow.ff/ff/ff flow.fi/fi/fi

#--- cold trap ---
#makenv n2 n2_ccu ccu
#appendVars n2.upper/K2/N2_Upper n2.lower/K2/N2_Lower

#---pressure in front of pump---
#makenv nv nv_ccu ccu
#appendVars nv.flow/mbar/nv_Flow nv.autoflow.flowset/mbar/nv_Set

#GraphAdd nv.flow mbar pfront_flow 4


#--solenoid valve unit ---

#makenv mv svuold
 makenv  mv -driver svu {needle 1 bypass 2}

 #--ACM Levelmeter---
 makenv He acm

 #GraphAdd He pF Helium_level 4
}
