SICS-587 Setup hostport dictionary based configuration for Kookaburra
This commit is contained in:
@@ -4,3 +4,5 @@ sics_ports.tcl
|
|||||||
script_validator_ports.tcl
|
script_validator_ports.tcl
|
||||||
config
|
config
|
||||||
util
|
util
|
||||||
|
hostport_config.tcl
|
||||||
|
hostport_config_test.tcl
|
||||||
|
|||||||
@@ -15,10 +15,14 @@ proc ::counter::isc_initialize {} {
|
|||||||
variable isc_numchannels
|
variable isc_numchannels
|
||||||
variable isc_monitor_address
|
variable isc_monitor_address
|
||||||
variable isc_portlist
|
variable isc_portlist
|
||||||
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
|
|
||||||
|
|
||||||
set isc_monitor_address "das1-[SplitReply [instrument]]"
|
dict for {k v} $::MONITOR_HOSTPORT {
|
||||||
set isc_portlist [list 33000 33001 33002 33003 33004 33005 33006 33007]
|
lappend monlist $k
|
||||||
|
lappend hostlist [dict get $v HOST]
|
||||||
|
lappend isc_portlist [dict get $v PORT]
|
||||||
|
}
|
||||||
|
variable isc_beam_monitor_list $monlist
|
||||||
|
set isc_monitor_address [lindex $hostlist 0]
|
||||||
set isc_numchannels [llength $isc_beam_monitor_list]
|
set isc_numchannels [llength $isc_beam_monitor_list]
|
||||||
::counter::ic_initialize
|
::counter::ic_initialize
|
||||||
} message ] {
|
} message ] {
|
||||||
|
|||||||
@@ -9,27 +9,14 @@
|
|||||||
set animal kookaburra
|
set animal kookaburra
|
||||||
set sim_mode [SplitReply [motor_simulation]]
|
set sim_mode [SplitReply [motor_simulation]]
|
||||||
|
|
||||||
# Setup addresses of Galil DMC2280 controllers.
|
|
||||||
set dmc2280_controller1(host) mc1-$animal
|
|
||||||
set dmc2280_controller1(port) pmc1-$animal
|
|
||||||
|
|
||||||
set dmc2280_controller2(host) mc2-$animal
|
|
||||||
set dmc2280_controller2(port) pmc2-$animal
|
|
||||||
|
|
||||||
set dmc2280_controller3(host) mc3-$animal
|
|
||||||
set dmc2280_controller3(port) pmc3-$animal
|
|
||||||
|
|
||||||
#set dmc2280_controller4(host) mc4-$animal
|
|
||||||
#set dmc2280_controller4(port) pmc4-$animal
|
|
||||||
|
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
set motor_driver_type asim
|
set motor_driver_type asim
|
||||||
} else {
|
} else {
|
||||||
set motor_driver_type DMC2280
|
set motor_driver_type DMC2280
|
||||||
MakeAsyncQueue mc1 DMC2280 $dmc2280_controller1(host) $dmc2280_controller1(port)
|
MakeAsyncQueue mc1 DMC2280 [dict get $::MOTOR_HOSTPORT MC1 HOST] [dict get $::MOTOR_HOSTPORT MC1 PORT]
|
||||||
MakeAsyncQueue mc2 DMC2280 $dmc2280_controller2(host) $dmc2280_controller2(port)
|
MakeAsyncQueue mc2 DMC2280 [dict get $::MOTOR_HOSTPORT MC2 HOST] [dict get $::MOTOR_HOSTPORT MC2 PORT]
|
||||||
MakeAsyncQueue mc3 DMC2280 $dmc2280_controller3(host) $dmc2280_controller3(port)
|
MakeAsyncQueue mc3 DMC2280 [dict get $::MOTOR_HOSTPORT MC3 HOST] [dict get $::MOTOR_HOSTPORT MC3 PORT]
|
||||||
# MakeAsyncQueue mc4 DMC2280 $dmc2280_controller4(host) $dmc2280_controller4(port)
|
# MakeAsyncQueue mc4 DMC2280 [dict get $::MOTOR_HOSTPORT MC4 HOST] [dict get $::MOTOR_HOSTPORT MC4 PORT]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
30
site_ansto/instrument/kookaburra/hostport_config.tcl
Normal file
30
site_ansto/instrument/kookaburra/hostport_config.tcl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# MOTOR HOST AND PORT
|
||||||
|
foreach {mc host port} {
|
||||||
|
MC1 mc1-kookaburra pmc1-kookaburra
|
||||||
|
MC2 mc2-kookaburra pmc2-kookaburra
|
||||||
|
MC3 mc3-kookaburra pmc3-kookaburra
|
||||||
|
MC4 mc4-kookaburra pmc4-kookaburra
|
||||||
|
MC6 mc6-kookaburra pmc6-kookaburra
|
||||||
|
} {
|
||||||
|
dict set MOTOR_HOSTPORT $mc HOST $host
|
||||||
|
dict set MOTOR_HOSTPORT $mc PORT $port
|
||||||
|
}
|
||||||
|
|
||||||
|
# BEAM MONITOR HOST AND PORT
|
||||||
|
foreach {bm host port} {
|
||||||
|
MONITOR_1 das1-kookaburra 30000
|
||||||
|
MONITOR_2 das1-kookaburra 30001
|
||||||
|
MONITOR_3 das1-kookaburra 30002
|
||||||
|
} {
|
||||||
|
dict set MONITOR_HOSTPORT $bm HOST $host
|
||||||
|
dict set MONITOR_HOSTPORT $bm PORT $port
|
||||||
|
}
|
||||||
|
|
||||||
|
# HISTOGRAM SERVER HOST AND PORT
|
||||||
|
foreach {key host port} {
|
||||||
|
HMM das1-kookaburra.nbi.ansto.gov.au 8080
|
||||||
|
HMSTAT das1-kookaburra.nbi.ansto.gov.au 8081
|
||||||
|
} {
|
||||||
|
dict set HISTMEM_HOSTPORT $key HOST $host
|
||||||
|
dict set HISTMEM_HOSTPORT $key PORT $port
|
||||||
|
}
|
||||||
32
site_ansto/instrument/kookaburra/hostport_config_test.tcl
Normal file
32
site_ansto/instrument/kookaburra/hostport_config_test.tcl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Specify NONE for HOST and PORT if there is no fake device to talk to.
|
||||||
|
|
||||||
|
# TEST MOTOR HOST AND PORT
|
||||||
|
foreach {key host port} {
|
||||||
|
MC1 localhost 62930
|
||||||
|
MC2 localhost 62931
|
||||||
|
MC3 localhost 62932
|
||||||
|
MC4 localhost 62933
|
||||||
|
MC6 localhost 62934
|
||||||
|
} {
|
||||||
|
dict set MOTOR_HOSTPORT $key HOST $host
|
||||||
|
dict set MOTOR_HOSTPORT $key PORT $port
|
||||||
|
}
|
||||||
|
|
||||||
|
# TEST BEAM MONITOR HOST AND PORT
|
||||||
|
foreach {key host port} {
|
||||||
|
MONITOR_1 localhost 30000
|
||||||
|
MONITOR_2 localhost 30001
|
||||||
|
MONITOR_3 localhost 30002
|
||||||
|
} {
|
||||||
|
dict set MONITOR_HOSTPORT $key HOST $host
|
||||||
|
dict set MONITOR_HOSTPORT $key PORT $port
|
||||||
|
}
|
||||||
|
|
||||||
|
# TEST HISTOGRAM SERVER HOST AND PORT
|
||||||
|
foreach {key host port} {
|
||||||
|
HMM das1-test.nbi.ansto.gov.au 8080
|
||||||
|
HMSTAT das1-test.nbi.ansto.gov.au 8081
|
||||||
|
} {
|
||||||
|
dict set HISTMEM_HOSTPORT $key HOST $host
|
||||||
|
dict set HISTMEM_HOSTPORT $key PORT $port
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user