SICS-587 (in progress) Put IP and PORT configurations in a single file.
Pelican DONE motor, counter, chopper. TODO hmm, environment.
This commit is contained in:
@@ -3,3 +3,5 @@ sics_ports.tcl
|
||||
script_validator_ports.tcl
|
||||
config
|
||||
util
|
||||
hostport_config.tcl
|
||||
hostport_config_test.tcl
|
||||
|
||||
@@ -119,9 +119,11 @@ namespace eval ::scobj::chopper {
|
||||
variable fermiPath
|
||||
set fermiPath /sics/fermi_chopper
|
||||
::scobj::hinitprops fermi_chopper
|
||||
set sim_mode false
|
||||
set sim_mode [SplitReply chopper_simulation]
|
||||
if {$sim_mode == "false"} {
|
||||
makesctcontroller sct_fermi tcpmodbus 137.157.202.213:502
|
||||
set host [dict get $::CHOPPER_HOSTPORT MB350PC HOST]
|
||||
set port [dict get $::CHOPPER_HOSTPORT MB350PC PORT]
|
||||
makesctcontroller sct_fermi tcpmodbus $host:$port
|
||||
}
|
||||
hsetprop $fermiPath P_chIndex 0
|
||||
set intlck_fields {test_mode cc_shutdown_req dsp_summ_shtdwn cooling_loss spd_sensor_loss ref_sig_loss over_temp vac_fail overspeed_or_breakfail cc_wd_fail ext_fault ups_fail emerg_stop pos_alarm osc_fail dsp_wd_fail}
|
||||
@@ -171,6 +173,7 @@ namespace eval ::scobj::chopper {
|
||||
foreach {n cmd} [subst -nocommands {
|
||||
set_vetowin100 "$chN:16:30:1:U32"
|
||||
set_vetowin50 "$chN:16:32:1:U32"
|
||||
set_mode "$chN:16:34:1:U32"
|
||||
set_rotspeed "$chN:16:1000:1:U32"
|
||||
set_prop_gain "$chN:16:1004:1:F32"
|
||||
set_int_gain "$chN:16:1006:1:F32"
|
||||
|
||||
@@ -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 33000 33001 33002 33003 33004 33005 33006 33007]
|
||||
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 ] {
|
||||
|
||||
@@ -3,34 +3,15 @@
|
||||
set animal pelican
|
||||
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
|
||||
|
||||
set dmc2280_controller5(host) mc5-$animal
|
||||
set dmc2280_controller5(port) pmc5-$animal
|
||||
|
||||
set dmc2280_controller6(host) mc6-$animal
|
||||
set dmc2280_controller6(port) pmc6-$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 mc6 DMC2280 $dmc2280_controller6(host) $dmc2280_controller6(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]
|
||||
MakeAsyncQueue mc6 DMC2280 [dict get $::MOTOR_HOSTPORT MC6 HOST] [dict get $::MOTOR_HOSTPORT MC6 PORT]
|
||||
}
|
||||
|
||||
|
||||
|
||||
36
site_ansto/instrument/pelican/hostport_config.tcl
Normal file
36
site_ansto/instrument/pelican/hostport_config.tcl
Normal file
@@ -0,0 +1,36 @@
|
||||
# MOTOR HOST AND PORT
|
||||
foreach {mc host port} {
|
||||
MC1 mc1-platypus pmc1-platypus
|
||||
MC2 mc2-platypus pmc2-platypus
|
||||
MC3 mc3-platypus pmc3-platypus
|
||||
MC4 mc4-platypus pmc4-platypus
|
||||
} {
|
||||
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 localhost 33000
|
||||
MONITOR_2 localhost 33001
|
||||
MONITOR_3 localhost 33002
|
||||
} {
|
||||
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-platypus.nbi.ansto.gov.au 8080
|
||||
} {
|
||||
dict set HISTMEM_HOSTPORT $key HOST $host
|
||||
dict set HISTMEM_HOSTPORT $key PORT $port
|
||||
}
|
||||
|
||||
# CHOPPER HOST AND PORT
|
||||
foreach {key host port} {
|
||||
MB350PC 137.157.202.213 502
|
||||
} {
|
||||
dict set CHOPPER_HOSTPORT $key HOST $host
|
||||
dict set CHOPPER_HOSTPORT $key PORT $port
|
||||
}
|
||||
38
site_ansto/instrument/pelican/hostport_config_test.tcl
Normal file
38
site_ansto/instrument/pelican/hostport_config_test.tcl
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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 62530
|
||||
MC2 localhost 62531
|
||||
MC3 localhost 62532
|
||||
MC4 localhost 62533
|
||||
} {
|
||||
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 33000
|
||||
MONITOR_2 localhost 33001
|
||||
MONITOR_3 localhost 33002
|
||||
} {
|
||||
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
|
||||
}
|
||||
|
||||
# TEST CHOPPER HOST AND PORT
|
||||
foreach {key host port} {
|
||||
MB350PC localhost 502
|
||||
} {
|
||||
dict set CHOPPER_HOSTPORT $key HOST $host
|
||||
dict set CHOPPER_HOSTPORT $key PORT $port
|
||||
}
|
||||
Reference in New Issue
Block a user