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
This commit is contained in:
Ferdi Franceschini
2010-05-07 14:32:51 +10:00
committed by Douglas Clowes
parent 1c4d6f398a
commit 8011cec140
7 changed files with 13 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ namespace eval ::environment::temperature {
upperlimit 500 upperlimit 500
lowerlimit 4 lowerlimit 4
} }
set tc_dfltURL ca5-[instname]
array set moxaPortMap {1 4001 2 4002 3 4003 4 4004} array set moxaPortMap {1 4001 2 4002 3 4003 4 4004}
} }

View File

@@ -15,9 +15,8 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
# @param range, lakeshore range # @param range, lakeshore range
# @param upperlimit, upper temperature limit Kelvin # @param upperlimit, upper temperature limit Kelvin
# @param lowerlimit, lower 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_dfltPar
variable tc_dfltURL
variable moxaPortMap variable moxaPortMap
if [catch { if [catch {
if {$tcn == "" || $mport == ""} { if {$tcn == "" || $mport == ""} {

View File

@@ -40,15 +40,15 @@ source gumxml.tcl
# Drivers for Lakeshore Temperature Controller # Drivers for Lakeshore Temperature Controller
# old Lakeshore driver (c-code) # old Lakeshore driver (c-code)
# ::environment::temperature::add_ls340 tc1 1 # ::environment::temperature::add_ls340 tc1 137.157.201.86 1
# ::environment::temperature::add_ls340 tc2 2 # ::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 # New Lakeshore series driver for models 340 and 336 - (tcl-code, version 20090824) - beta status
# driverName shortName IP-address portOnMoxa temperatureTolerance1 Tolerance2 LakeshoreModel # driverName shortName IP-address portOnMoxa temperatureTolerance1 Tolerance2 LakeshoreModel
# ffr 2009-11-11: NOTE I've added a line terminator argument to the ls3xx setup. # 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 # 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 # 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 tc1 137.157.201.86 4001 "\r\" 400 340
# add_ls3xx tc2 137.157.201.86 4002 "\r" 5 5 340 # add_ls3xx tc2 137.157.201.86 4002 "\r" 5 5 340

View File

@@ -15,9 +15,8 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
# @param range, lakeshore range # @param range, lakeshore range
# @param upperlimit, upper temperature limit Kelvin # @param upperlimit, upper temperature limit Kelvin
# @param lowerlimit, lower 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_dfltPar
variable tc_dfltURL
variable moxaPortMap variable moxaPortMap
if [catch { if [catch {
if {$tcn == "" || $mport == ""} { if {$tcn == "" || $mport == ""} {

View File

@@ -36,8 +36,8 @@ fileeval $cfPath(anticollider)/anticollider.tcl
fileeval $cfPath(environment)/robby_configuration.tcl fileeval $cfPath(environment)/robby_configuration.tcl
source gumxml.tcl source gumxml.tcl
# ::environment::temperature::add_ls340 tc1 1 # ::environment::temperature::add_ls340 tc1 137.157.201.86 1
###::environment::temperature::add_ls340 tc2 1 # ::environment::temperature::add_ls340 tc2 137.157.201.86 2
## ##
# New lakeshore driver. BETA status. Data saving not tested # New lakeshore driver. BETA status. Data saving not tested

View File

@@ -15,9 +15,8 @@ source $cfPath(environment)/temperature/lakeshore340_common.tcl
# @param range, lakeshore range # @param range, lakeshore range
# @param upperlimit, upper temperature limit Kelvin # @param upperlimit, upper temperature limit Kelvin
# @param lowerlimit, lower 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_dfltPar
variable tc_dfltURL
variable moxaPortMap variable moxaPortMap
if [catch { if [catch {
if {$tcn == "" || $mport == ""} { if {$tcn == "" || $mport == ""} {
@@ -36,7 +35,7 @@ proc ::environment::temperature::add_ls340 {tcn mport args} {
if {$sim_mode == "true"} { if {$sim_mode == "true"} {
::environment::temperature::mkls340sim $tcn ::environment::temperature::mkls340sim $tcn
} else { } 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] { foreach nm [array names tc_param] {
$tcn $nm $tc_param($nm) $tcn $nm $tc_param($nm)
} }

View File

@@ -47,16 +47,16 @@ switch $envtemp {
} }
"rhqc" { "rhqc" {
puts "Configuring RHQC" puts "Configuring RHQC"
::environment::temperature::add_ls340 tc1 1 ::environment::temperature::add_ls340 tc1 137.157.202.85 1
tc1 controlsensor sensorB tc1 controlsensor sensorB
puts "Added tc1 with [tc1 controlsensor]" 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 tc2 controlsensor sensorD
puts "Added tc2 with [tc2 controlsensor]" puts "Added tc2 with [tc2 controlsensor]"
} }
"11TMagnet" { "11TMagnet" {
puts "Configuring 11TMagnet" puts "Configuring 11TMagnet"
::environment::temperature::add_ls340 tc1 1 ::environment::temperature::add_ls340 tc1 137.157.202.85 1
tc1 controlsensor sensorA tc1 controlsensor sensorA
} }
default { default {