lakeshore340_common.tcl

Lakeshore controllers will be connected to the ca5-[instrument] moxa box
Default config parameters are now available via a tc_dfltPar array
IP and socket number are now mandatory when creating an ls340 object

hrpd/.../lakeshore340.tcl
Multiple lakeshores can now be added to the hdb tree

echidna_configuration.tcl
Provide example  for configuring two lakeshores

SICS-134 reflectometer/../commands.tcl
First draft of beam/attenuator command, currently sends POS=xx (this won't work)

reflectometer/../motor_configuration.tcl
Add bat position feedback via action

sans/../motor_configuration.tcl
Renamed action parameter (aoid) to "action"

server_config.tcl
Initialise motor movecount to 500 to reduce number of position updates by a factor of 50

SICS-134 action.c
Update the beam/attenuator command feedback variable when POS changes.

SICS-134 motor_dmc2280.c
Added PLP:BAT:POS status response handler for platypus bat position updates
Only send IDLE state position updates if position change is greater than the precision.
Rename action parameter (aoid) to "action"

r2679 | ffr | 2008-08-19 15:11:55 +1000 (Tue, 19 Aug 2008) | 31 lines
This commit is contained in:
Ferdi Franceschini
2008-08-19 15:11:55 +10:00
committed by Douglas Clowes
parent 8090104407
commit 165f1b90a4
9 changed files with 121 additions and 35 deletions

View File

@@ -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
}
}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.32 $
# $Date: 2008-08-07 03:17:28 $
# $Revision: 1.33 $
# $Date: 2008-08-19 05:11:55 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -40,7 +40,8 @@ source gumxml.tcl
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
restore
catch {
# ::environment::temperature::add_ls340
# ::environment::temperature::add_ls340 tc1 1
# ::environment::temperature::add_ls340 tc2 2
server_init
if [file exists ../extraconfig.tcl] {