SICS-587 (in progress) IP and PORT configurations DONE for Quokka.

TODO Environment controllers etc.
This commit is contained in:
Ferdi Franceschini
2013-04-24 16:54:22 +10:00
parent 20a3dff71e
commit d8b48728b4
9 changed files with 116 additions and 30 deletions

View File

@@ -147,4 +147,4 @@ proc startserver {args} {
return;
}
startserver -port 65001
startserver -port 64001

View File

@@ -4,3 +4,5 @@ script_validator_ports.tcl
extraconfig.tcl
config
util
hostport_config.tcl
hostport_config_test.tcl

View File

@@ -1,18 +1,18 @@
fileeval $cfPath(beamline)/sct_flipper.tcl
# NOTE: opCurr is 10 * your operating current, ie if the current is 7.1 then opCurr = 71
::scobj::rfgen::mkFlipper {
::scobj::rfgen::mkFlipper [subst {
name "flipper"
address 1
opCurr 71
opFreq 407
IP 137.157.202.86
PORT 4001
IP [dict get $::ACGEN_HOSTPORT ANSFR83B HOST]
PORT [dict get $::ACGEN_HOSTPORT ANSFR83B PORT]
tuning 1
interval 2
currtol 1
compCurr 1
guideCurr 1
thickness 1
}
}]

View File

@@ -15,10 +15,14 @@ proc ::counter::isc_initialize {} {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list {MONITOR_1 MONITOR_2 MONITOR_3}
set isc_monitor_address "das1-[SplitReply [instrument]]"
set isc_portlist [list 30000 30001 30002 30003 30004 30005 30006 30007]
dict for {k v} $::MONITOR_HOSTPORT {
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]
::counter::ic_initialize
} message ] {

View File

@@ -10,26 +10,14 @@ set animal quokka
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"} {
set motor_driver_type asim
} else {
set motor_driver_type DMC2280
MakeAsyncQueue mc1 DMC2280 $dmc2280_controller1(host) $dmc2280_controller1(port)
MakeAsyncQueue mc2 DMC2280 $dmc2280_controller2(host) $dmc2280_controller2(port)
MakeAsyncQueue mc3 DMC2280 $dmc2280_controller3(host) $dmc2280_controller3(port)
MakeAsyncQueue mc4 DMC2280 $dmc2280_controller4(host) $dmc2280_controller4(port)
MakeAsyncQueue mc1 DMC2280 [dict get $::MOTOR_HOSTPORT MC1 HOST] [dict get $::MOTOR_HOSTPORT MC1 PORT]
MakeAsyncQueue mc2 DMC2280 [dict get $::MOTOR_HOSTPORT MC2 HOST] [dict get $::MOTOR_HOSTPORT MC2 PORT]
MakeAsyncQueue mc3 DMC2280 [dict get $::MOTOR_HOSTPORT MC3 HOST] [dict get $::MOTOR_HOSTPORT MC3 PORT]
MakeAsyncQueue mc4 DMC2280 [dict get $::MOTOR_HOSTPORT MC4 HOST] [dict get $::MOTOR_HOSTPORT MC4 PORT]
}
# Beam stop gearing and signs (BS1=largest)

View File

@@ -26,8 +26,8 @@ namespace eval ::scobj::velocity_selector {
switch $::currVelSel {
40 {
set velsel_ID "NVS40"
set velsel_IP "137.157.202.73"
set velsel_port 10000
set velsel_IP [dict get $VELSEL_HOSTPORT $velsel_ID HOST]
set velsel_port [dict get $VELSEL_HOSTPORT $velsel_ID PORT]
set ::scobj::velocity_selector::UID "NVS"
set ::scobj::velocity_selector::PWD "NVS"
set ::scobj::velocity_selector::blocked_speeds {
@@ -40,8 +40,8 @@ namespace eval ::scobj::velocity_selector {
43 {
# dc2-quokka.nbi.ansto.gov.au
set velsel_ID "NVS43"
set velsel_IP "137.157.202.74"
set velsel_port 10000
set velsel_IP [dict get $VELSEL_HOSTPORT $velsel_ID HOST]
set velsel_port [dict get $VELSEL_HOSTPORT $velsel_ID PORT]
set ::scobj::velocity_selector::UID "NVS"
set ::scobj::velocity_selector::PWD "NVS"
set ::scobj::velocity_selector::blocked_speeds {

View File

@@ -0,0 +1,45 @@
# MOTOR HOST AND PORT
foreach {mc host port} {
MC1 mc1-quokka pmc1-quokka
MC2 mc2-quokka pmc2-quokka
MC3 mc3-quokka pmc3-quokka
MC4 mc4-quokka pmc4-quokka
} {
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-quokka 30000
MONITOR_2 das1-quokka 30001
MONITOR_3 das1-quokka 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-quokka.nbi.ansto.gov.au 8080
} {
dict set HISTMEM_HOSTPORT $key HOST $host
dict set HISTMEM_HOSTPORT $key PORT $port
}
# SPIN FLIPPER HOST AND PORT
foreach {key host port} {
ANSFR83B 137.157.202.86 4001
} {
dict set ACGEN_HOSTPORT $key HOST $host
dict set ACGEN_HOSTPORT $key PORT $port
}
# VELOCITY SELECTOR HOST AND PORT
foreach {key host port} {
NVS40 137.157.202.73 10000
NVS43 137.157.202.74 10000
} {
dict set VELSEL_HOSTPORT $key HOST $host
dict set VELSEL_HOSTPORT $key PORT $port
}

View File

@@ -0,0 +1,47 @@
# 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 62430
MC2 localhost 62431
MC3 localhost 62432
MC4 localhost 62433
} {
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
} {
dict set HISTMEM_HOSTPORT $key HOST $host
dict set HISTMEM_HOSTPORT $key PORT $port
}
# SPIN FLIPPER HOST AND PORT
foreach {key host port} {
ANSFR83B localhost 64001
} {
dict set ACGEN_HOSTPORT $key HOST $host
dict set ACGEN_HOSTPORT $key PORT $port
}
# VELOCITY SELECTOR HOST AND PORT
foreach {key host port} {
NVS40 localhost 60001
NVS43 localhost 60001
} {
dict set VELSEL_HOSTPORT $key HOST $host
dict set VELSEL_HOSTPORT $key PORT $port
}

View File

@@ -19,9 +19,9 @@ foreach {simflag icsval fakedev} {
counter_simulation false false
motor_simulation false false
chopper_simulation false false
velsel_simulation false true
velsel_simulation false false
plc_simulation false true
rfgen_simulation false true
rfgen_simulation false false
goniometer_simulation false true
magnetic_simulation false true
} {