lakeshore340_common.tcl
Now supports creation of multiple lakeshore controller objects. hmm_configuration_common_1.tcl SICS-275 histmem command now rejects invalid frame source arguments hipd/config/environment/temperature/lakeshore340.tcl Now supports creation of multiple lakeshore controller objects. wombat_configuration.tcl Added example which creates two lakeshore controllers. rsd/config/motors/motor_configuration.tcl SICS-276 Disable debug mode on sz motor. r2694 | ffr | 2008-09-18 12:20:09 +1000 (Thu, 18 Sep 2008) | 15 lines
This commit is contained in:
committed by
Douglas Clowes
parent
8b4c571d63
commit
cc640e2fb0
@@ -5,20 +5,48 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
|
||||
# This must be called when the instrument configuration is loaded and before\n
|
||||
# the buildHDB function is called. Currently there is no way to add and remove\n
|
||||
# environment controllers and their hdb paths at runtime.
|
||||
proc ::environment::temperature::add_ls340 {} {
|
||||
set sim_mode [SplitReply [environment_simulation]]
|
||||
if {$sim_mode == "true"} {
|
||||
::environment::temperature::mkls340sim tc1
|
||||
} else {
|
||||
::environment::temperature::mkls340 tc1
|
||||
tc1 tolerance 1
|
||||
tc1 Settle 30
|
||||
tc1 range 2
|
||||
tc1 UpperLimit 500
|
||||
tc1 LowerLimit 4
|
||||
}
|
||||
#
|
||||
# @param tcn temperature controller name, the hdb name will be tcn_cntrl
|
||||
# @param mport, the moxa RS232 port number, ie 1,2,3,4
|
||||
#
|
||||
# Optional parameters, see lakeshore340_common.tcl for defaults in tc_dfltPar
|
||||
# @param tolerance, temperature controller tolerance
|
||||
# @param settle, settling time in seconds
|
||||
# @param range, lakeshore range
|
||||
# @param upperlimit, upper temperature limit Kelvin
|
||||
# @param lowerlimit, lower temperature limit Kelvin
|
||||
proc ::environment::temperature::add_ls340 {tcn mport args} {
|
||||
variable tc_dfltPar
|
||||
variable tc_dfltURL
|
||||
variable moxaPortMap
|
||||
if [catch {
|
||||
if {$tcn == "" || $mport == ""} {
|
||||
error "ERROR: You must provide a temperature controller name and moxa port number"
|
||||
}
|
||||
|
||||
sicslist setatt tc1 environment_name tempone
|
||||
sicslist setatt tc1 long_name control_sensor_reading
|
||||
::environment::mkenvinfo tc1 {heateron {priv user} range {priv manager} }
|
||||
array set tc_param [array get tc_dfltPar]
|
||||
|
||||
if {$args != ""} {
|
||||
array set tc_param $args
|
||||
foreach {nm v} $args {
|
||||
set tc_param($nm) $v
|
||||
}
|
||||
}
|
||||
set sim_mode [SplitReply [environment_simulation]]
|
||||
if {$sim_mode == "true"} {
|
||||
::environment::temperature::mkls340sim $tcn
|
||||
} else {
|
||||
::environment::temperature::mkls340 $tcn $tc_dfltURL $moxaPortMap($mport)
|
||||
foreach nm [array names tc_param] {
|
||||
$tcn $nm $tc_param($nm)
|
||||
}
|
||||
}
|
||||
|
||||
sicslist setatt $tcn environment_name ${tcn}_cntrl
|
||||
sicslist setatt $tcn long_name control_sensor_reading
|
||||
::environment::mkenvinfo $tcn {heateron {priv user} range {priv manager} }
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user