deviceDesc = "SANS Climate Chamber"

makenv rh -driver hcell

set ts ldm-humidity-ts.psi.ch
set fp $ts:3005
set tp $ts:3002

makenv t -driver multit t_sample "Sample Temperature" "{/t1 /t2}" /th 0 18000
makenv th -driver multit -visibility expert \
  t_holder "RH-Sensor Holder Temperature" "{/t3 /t4}" {} "1.25 % - 0.25"
makenv t_tube -driver horst -visibility expert -port $ts:3004 \
  "Feed Line Temperature"

# arguments:
# cem_temp      label
# 200           max value
# 5             modbus adr
# 0             readonly
# 1000          standard ramp
# 0             setoffset
# 1             control mode available
# 0             invalid value
makenv t_cem0 -driver bronkgen -controller _fp -port $fp -visibility expert \
  "CEM Evaporator Temperature" 200 5 0 2000 0 1 0
makenv t_cem -driver cemhack -visibility expert t_cem0

# arguments:
# gasflow       label
# 775.8         max value
# 3             modbus adr
# 0             readonly
# 258           standard ramp
# 2.0           setoffset (surprisingly the set value has be given 2 higher)
makenv fg -driver bronkgen -controller _fp -port $fp -visibility expert \
  Gasflow 775.8 3 0 500 2.0 0

makenv fw -driver bronkgen -controller _fp -port $fp -visibility expert \
  Waterflow 100 4 0 100 0.2 0

makenv rhs -driver vaisala -port $ts:3003 -visibility expert \
  "Humidity Sensor" /t

makenv ps -driver presshch -port $ts:3006 -visibility expert

for {set i 1} {$i <= 4} {incr i} {
  makenv t$i -driver jumo -controller _jumo -port $tp -visibility expert \
    $i 150
}
t pb 130
t td 0
t ramp 999.9

th pb 380
th rt 800
th td 0
th ramp 999.9

GraphAdd t C
GraphAdd t.set C
GraphAdd t.reg C
GraphAdd t_cem C
GraphAdd t_cem.set C
GraphAdd t_tube C
GraphAdd t_tube.set C
GraphAdd th C
GraphAdd th.set C

GraphAdd t.htr %_2 sample_htr
GraphAdd t_tube.out %_2 tube_htr
GraphAdd th.htr %_2 holder_htr

GraphAdd fg g/h
GraphAdd fg.set g/h
GraphAdd fg.reg g/h
GraphAdd fw g/h
GraphAdd fw.set g/h
GraphAdd fw.reg g/h

GraphAdd ps mbar
GraphAdd rhs % rh_sensor
GraphAdd rh.rh_set % rh_set
GraphAdd rh.rh_calc % rh_calc
GraphAdd rh.rh_reg % rh_reg

Layout visibility
