From 8011cec14044a519f67bdef568e8ded4d0732bdf Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Fri, 7 May 2010 14:32:51 +1000 Subject: [PATCH] Make IP addresses explicit when configuring the old lakeshore 340 drivers. r2910 | ffr | 2010-05-07 14:32:51 +1000 (Fri, 07 May 2010) | 2 lines --- .../config/environment/temperature/lakeshore340_common.tcl | 2 +- .../hipd/config/environment/temperature/lakeshore340.tcl | 3 +-- site_ansto/instrument/hipd/wombat_configuration.tcl | 6 +++--- .../hrpd/config/environment/temperature/lakeshore340.tcl | 3 +-- site_ansto/instrument/hrpd/echidna_configuration.tcl | 4 ++-- .../sans/config/environment/temperature/lakeshore340.tcl | 5 ++--- site_ansto/instrument/sans/quokka_configuration.tcl | 6 +++--- 7 files changed, 13 insertions(+), 16 deletions(-) diff --git a/site_ansto/instrument/config/environment/temperature/lakeshore340_common.tcl b/site_ansto/instrument/config/environment/temperature/lakeshore340_common.tcl index df7dd3f9..f4b81771 100644 --- a/site_ansto/instrument/config/environment/temperature/lakeshore340_common.tcl +++ b/site_ansto/instrument/config/environment/temperature/lakeshore340_common.tcl @@ -7,7 +7,7 @@ namespace eval ::environment::temperature { upperlimit 500 lowerlimit 4 } - set tc_dfltURL ca5-[instname] + array set moxaPortMap {1 4001 2 4002 3 4003 4 4004} } diff --git a/site_ansto/instrument/hipd/config/environment/temperature/lakeshore340.tcl b/site_ansto/instrument/hipd/config/environment/temperature/lakeshore340.tcl index 2f4aa1d2..31c49bbd 100644 --- a/site_ansto/instrument/hipd/config/environment/temperature/lakeshore340.tcl +++ b/site_ansto/instrument/hipd/config/environment/temperature/lakeshore340.tcl @@ -15,9 +15,8 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl # @param range, lakeshore range # @param upperlimit, upper temperature limit Kelvin # @param lowerlimit, lower temperature limit Kelvin -proc ::environment::temperature::add_ls340 {tcn mport args} { +proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} { variable tc_dfltPar - variable tc_dfltURL variable moxaPortMap if [catch { if {$tcn == "" || $mport == ""} { diff --git a/site_ansto/instrument/hipd/wombat_configuration.tcl b/site_ansto/instrument/hipd/wombat_configuration.tcl index 902d81b0..173884f7 100644 --- a/site_ansto/instrument/hipd/wombat_configuration.tcl +++ b/site_ansto/instrument/hipd/wombat_configuration.tcl @@ -40,15 +40,15 @@ source gumxml.tcl # Drivers for Lakeshore Temperature Controller # old Lakeshore driver (c-code) -# ::environment::temperature::add_ls340 tc1 1 -# ::environment::temperature::add_ls340 tc2 2 +# ::environment::temperature::add_ls340 tc1 137.157.201.86 1 +# ::environment::temperature::add_ls340 tc2 137.157.201.86 2 # New Lakeshore series driver for models 340 and 336 - (tcl-code, version 20090824) - beta status # driverName shortName IP-address portOnMoxa temperatureTolerance1 Tolerance2 LakeshoreModel # ffr 2009-11-11: NOTE I've added a line terminator argument to the ls3xx setup. # You need to set the line termintator to either "\r\n" for CRLF or "\r" for CR # name IP-address port term LakeshoreModel tol1 tol2 - add_ls3xx tc1 137.157.201.85 7777 "\r\n" 336 5 5 +# add_ls3xx tc1 137.157.201.85 7777 "\r\n" 336 5 5 # add_ls3xx tc1 137.157.201.86 4001 "\r\" 400 340 # add_ls3xx tc2 137.157.201.86 4002 "\r" 5 5 340 diff --git a/site_ansto/instrument/hrpd/config/environment/temperature/lakeshore340.tcl b/site_ansto/instrument/hrpd/config/environment/temperature/lakeshore340.tcl index 2f4aa1d2..31c49bbd 100644 --- a/site_ansto/instrument/hrpd/config/environment/temperature/lakeshore340.tcl +++ b/site_ansto/instrument/hrpd/config/environment/temperature/lakeshore340.tcl @@ -15,9 +15,8 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl # @param range, lakeshore range # @param upperlimit, upper temperature limit Kelvin # @param lowerlimit, lower temperature limit Kelvin -proc ::environment::temperature::add_ls340 {tcn mport args} { +proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} { variable tc_dfltPar - variable tc_dfltURL variable moxaPortMap if [catch { if {$tcn == "" || $mport == ""} { diff --git a/site_ansto/instrument/hrpd/echidna_configuration.tcl b/site_ansto/instrument/hrpd/echidna_configuration.tcl index bdf3a65b..a1119de7 100644 --- a/site_ansto/instrument/hrpd/echidna_configuration.tcl +++ b/site_ansto/instrument/hrpd/echidna_configuration.tcl @@ -36,8 +36,8 @@ fileeval $cfPath(anticollider)/anticollider.tcl fileeval $cfPath(environment)/robby_configuration.tcl source gumxml.tcl -# ::environment::temperature::add_ls340 tc1 1 -###::environment::temperature::add_ls340 tc2 1 +# ::environment::temperature::add_ls340 tc1 137.157.201.86 1 +# ::environment::temperature::add_ls340 tc2 137.157.201.86 2 ## # New lakeshore driver. BETA status. Data saving not tested diff --git a/site_ansto/instrument/sans/config/environment/temperature/lakeshore340.tcl b/site_ansto/instrument/sans/config/environment/temperature/lakeshore340.tcl index b3007e9f..31c49bbd 100644 --- a/site_ansto/instrument/sans/config/environment/temperature/lakeshore340.tcl +++ b/site_ansto/instrument/sans/config/environment/temperature/lakeshore340.tcl @@ -15,9 +15,8 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl # @param range, lakeshore range # @param upperlimit, upper temperature limit Kelvin # @param lowerlimit, lower temperature limit Kelvin -proc ::environment::temperature::add_ls340 {tcn mport args} { +proc ::environment::temperature::add_ls340 {tcn tc_dfltURL mport args} { variable tc_dfltPar - variable tc_dfltURL variable moxaPortMap if [catch { if {$tcn == "" || $mport == ""} { @@ -36,7 +35,7 @@ proc ::environment::temperature::add_ls340 {tcn mport args} { if {$sim_mode == "true"} { ::environment::temperature::mkls340sim $tcn } else { - ::environment::temperature::mkls340 $tcn 137.157.202.85 $moxaPortMap($mport) + ::environment::temperature::mkls340 $tcn $tc_dfltURL $moxaPortMap($mport) foreach nm [array names tc_param] { $tcn $nm $tc_param($nm) } diff --git a/site_ansto/instrument/sans/quokka_configuration.tcl b/site_ansto/instrument/sans/quokka_configuration.tcl index a766b15f..0082cb2a 100644 --- a/site_ansto/instrument/sans/quokka_configuration.tcl +++ b/site_ansto/instrument/sans/quokka_configuration.tcl @@ -47,16 +47,16 @@ switch $envtemp { } "rhqc" { puts "Configuring RHQC" - ::environment::temperature::add_ls340 tc1 1 + ::environment::temperature::add_ls340 tc1 137.157.202.85 1 tc1 controlsensor sensorB puts "Added tc1 with [tc1 controlsensor]" - ::environment::temperature::add_ls340 tc2 2 + ::environment::temperature::add_ls340 tc2 137.157.202.85 2 tc2 controlsensor sensorD puts "Added tc2 with [tc2 controlsensor]" } "11TMagnet" { puts "Configuring 11TMagnet" - ::environment::temperature::add_ls340 tc1 1 + ::environment::temperature::add_ls340 tc1 137.157.202.85 1 tc1 controlsensor sensorA } default {