From bf3bd5342e3626eeced665144da7ed8f69ca7532 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Mon, 13 May 2013 23:31:12 +1000 Subject: [PATCH] Use hostport_config for quokka detector addresses and ports. --- .../instrument/sans/config/hmm/nhq200_detector_config.tcl | 4 +++- .../instrument/sans/config/hmm/ordela_detector_config.tcl | 4 +++- site_ansto/instrument/sans/hostport_config.tcl | 2 ++ site_ansto/instrument/sans/hostport_config_test.tcl | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/site_ansto/instrument/sans/config/hmm/nhq200_detector_config.tcl b/site_ansto/instrument/sans/config/hmm/nhq200_detector_config.tcl index 6214cce7..c3ca2e30 100644 --- a/site_ansto/instrument/sans/config/hmm/nhq200_detector_config.tcl +++ b/site_ansto/instrument/sans/config/hmm/nhq200_detector_config.tcl @@ -6,7 +6,9 @@ if {$::sim_mode == "true"} { EvFactory new dhv1 sim } else { clientput "FastCom Detector Voltage control" -makeasyncqueue acq NHQ200 ca1-quokka 4002 +set host [dict get $::HISTMEM_HOSTPORT NHQ200 HOST] +set port [dict get $::HISTMEM_HOSTPORT NHQ200 PORT] +makeasyncqueue acq NHQ200 $host $port evfactory new dhv1 nhq200 acq 1 dhv1 tolerance 5 dhv1 rate 10 diff --git a/site_ansto/instrument/sans/config/hmm/ordela_detector_config.tcl b/site_ansto/instrument/sans/config/hmm/ordela_detector_config.tcl index fd7732cc..01d50e3e 100644 --- a/site_ansto/instrument/sans/config/hmm/ordela_detector_config.tcl +++ b/site_ansto/instrument/sans/config/hmm/ordela_detector_config.tcl @@ -25,7 +25,9 @@ set upper_SN003 57 set dhvMax $dhv1Max_SN006 set dhvUpper $upper_SN006 -::scobj::dethvps::init 137.157.202.71 4001 [expr 0.1 * $dhvMax /63.0] +set host [dict get $::HISTMEM_HOSTPORT ORDELA HOST] +set port [dict get $::HISTMEM_HOSTPORT ORDELA PORT] +::scobj::dethvps::init $host $port [expr 0.1 * $dhvMax /63.0] # Voltage = potval * (dhv1.max / 63) # if potval = 60 and dhv1.max = 2400 then voltage = 60 * 2400/63 = 2285.7V dhv1 max $dhvMax diff --git a/site_ansto/instrument/sans/hostport_config.tcl b/site_ansto/instrument/sans/hostport_config.tcl index cfba8964..eaac9982 100644 --- a/site_ansto/instrument/sans/hostport_config.tcl +++ b/site_ansto/instrument/sans/hostport_config.tcl @@ -23,6 +23,8 @@ foreach {bm host port} { foreach {key host port} { HMM das1-quokka.nbi.ansto.gov.au 8080 HMSTAT das1-quokka.nbi.ansto.gov.au 8081 + ORDELA 137.157.202.71 4001 + NHQ200 ca1-quokka 4002 } { dict set HISTMEM_HOSTPORT $key HOST $host dict set HISTMEM_HOSTPORT $key PORT $port diff --git a/site_ansto/instrument/sans/hostport_config_test.tcl b/site_ansto/instrument/sans/hostport_config_test.tcl index f00da609..c65d2d3a 100644 --- a/site_ansto/instrument/sans/hostport_config_test.tcl +++ b/site_ansto/instrument/sans/hostport_config_test.tcl @@ -25,6 +25,8 @@ foreach {key host port} { foreach {key host port} { HMM das1-test.nbi.ansto.gov.au 8080 HMSTAT das1-test.nbi.ansto.gov.au 8081 + ORDELA localhost 4001 + NHQ200 localhost 4002 } { dict set HISTMEM_HOSTPORT $key HOST $host dict set HISTMEM_HOSTPORT $key PORT $port