Files
sics/site_ansto/instrument/sans/config/environment/environment.tcl
Ferdi Franceschini 2e64619bd0 Add ips120 power supply control to 11T Magnet configuration.
r2971 | ffr | 2010-07-02 07:37:08 +1000 (Fri, 02 Jul 2010) | 2 lines
2012-11-15 17:04:49 +11:00

45 lines
1.3 KiB
Tcl

proc select_environment_controller {envtemp} {
if [ catch {
puts "selecting $envtemp for environment control"
switch $envtemp {
"lh45" {
add_lh45 tc1 ca5-quokka 4003 1
}
"rhqc" {
puts "Configuring RHQC"
add_sct_ls340 tc1 ca5-[instname] 4001 "\r" 0.5 5.0
if { [SplitReply [environment_simulation]] == "false"} {
tc1 controlsensor sensorB
}
puts "Added tc1 with [tc1 controlsensor]"
add_sct_ls340 tc2 ca5-[instname] 4002 "\r" 0.5 5.0
if { [SplitReply [environment_simulation]] == "false"} {
tc2 controlsensor sensorD
}
puts "Added tc2 with [tc2 controlsensor]"
}
"11TMagnet" {
puts "Configuring 11TMagnet"
add_sct_ls340 tc1 ca5-[instname] 4001 "\r" 0.5 5.0
if { [SplitReply [environment_simulation]] == "false"} {
::utility::macro::getset float temperature {} {
return [sicsmsgfmt [hval /sample/tc1_cntrl/sensora/value]]
}
sicslist setatt temperature long_name temperature
sicslist setatt temperature klass sample
sicslist setatt temperature units K
tc1 controlsensor sensorA
}
add_ips120 ips120 ca5-quokka 4004 0.001
}
default {
clientput "Unknown environment controller $envtemp"
}
}
} msg ] {
puts "Failed to configure $envtemp: $msg"
}
}