Files
sics/site_ansto/instrument/pelican/pelican_configuration.tcl
2014-10-17 16:42:57 +11:00

120 lines
4.3 KiB
Tcl

# Author: Jing Chen (jgn@ansto.gov.au)
# Ferdi Franceschini: April 2013
# Added run and drive wrappers which set the target speed to an allowed speed
# for fermi motors.
# Required by server_config.tcl
VarMake Instrument Text Internal
Instrument pelican
Instrument lock
#START SERVER CONFIGURATION SECTION
source util/dmc2280/dmc2280_util.tcl
source sics_ports.tcl
source server_config.tcl
MakeDrive sicsdrive sicsrun
#END SERVER CONFIGURATION SECTION
########################################
# INSTRUMENT SPECIFIC CONFIGURATION
source $cfPath(hipadaba)/hipadaba_configuration.tcl
fileeval $cfPath(source)/source.tcl
fileeval $cfPath(motors)/motor_configuration.tcl
fileeval $cfPath(motors)/positmotor_configuration.tcl
fileeval $cfPath(plc)/plc.tcl
fileeval $cfPath(counter)/counter.tcl
#fileeval $cfPath(beamline)/sct_power.tcl
fileeval $cfPath(environment)/sct_agilent_33220A.tcl
fileeval $cfPath(environment)/sct_hiden_xcs.tcl
fileeval $cfPath(environment)/sct_huber_pilot.tcl
fileeval $cfPath(environment)/sct_isotech_ps.tcl
fileeval $cfPath(environment)/temperature/sct_eurotherm_2000.tcl
fileeval $cfPath(environment)/temperature/sct_eurotherm_m2000.tcl
fileeval $cfPath(environment)/sct_keithley_2700.tcl
fileeval $cfPath(environment)/sct_keithley_m2700.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_218.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_336.tcl
fileeval $cfPath(environment)/temperature/sct_ls336.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl
fileeval $cfPath(environment)/temperature/sct_ls340.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_370.tcl
fileeval $cfPath(environment)/temperature/sct_lakeshore_m370.tcl
fileeval $cfPath(environment)/temperature/sct_mercury_base.tcl
fileeval $cfPath(environment)/temperature/sct_mercury_level.tcl
fileeval $cfPath(environment)/temperature/sct_mercury_pres.tcl
fileeval $cfPath(environment)/temperature/sct_mercury_scpi.tcl
fileeval $cfPath(environment)/temperature/sct_mercury_temp.tcl
fileeval $cfPath(environment)/temperature/sct_mercury_valve.tcl
fileeval $cfPath(environment)/sct_protek_common.tcl
fileeval $cfPath(environment)/sct_protekmm.tcl
fileeval $cfPath(environment)/temperature/sct_julabo_lh45_gen.tcl
fileeval $cfPath(environment)/temperature/sct_qlink.tcl
fileeval $cfPath(environment)/temperature/west400.tcl
fileeval $cfPath(environment)/temperature/sct_west4100.tcl
fileeval $cfPath(environment)/temperature/sct_west_6100.tcl
fileeval $cfPath(environment)/magneticField/sct_oxford_labview.tcl
fileeval $cfPath(environment)/magneticField/sct_oxford12tlv.tcl
fileeval $cfPath(environment)/he3/sct_he3.tcl
fileeval $cfPath(environment)/magneticField/sct_green_magnet.tcl
fileeval $cfPath(hmm)/hmm_configuration.tcl
fileeval $cfPath(hmm)/sct_hv.tcl
fileeval $cfPath(nexus)/nxscripts.tcl
fileeval $cfPath(scan)/scan.tcl
fileeval $cfPath(commands)/commands.tcl
fileeval $cfPath(commands)/pulser.tcl
fileeval $cfPath(commands)/hvcommands.tcl
fileeval $cfPath(commands)/monodrive.tcl
fileeval $cfPath(anticollider)/anticollider.tcl
fileeval $cfPath(chopper)/sct_fermichopper.tcl
fileeval $cfPath(chopper)/fermimot.tcl
proc mkrunargs {args} {
foreach {mot speed} $args {
lappend runargs $mot
if {$mot == "mchs" || $mot == "schs"} {
set refspeed [SplitReply [$mot refspeed]]
set sprat [expr {abs($speed)/$refspeed}]
set mult [::chopper::findSpeedMult $sprat]
set target [expr $mult * $refspeed]
if {$speed < 0} {
set target -$target
}
lappend runargs [expr round($target)]
} else {
lappend runargs $speed
}
}
return "$runargs"
}
proc run {args} {
set runargs [eval "mkrunargs $args"]
anstocapture sicsrun {*}$runargs
#NOTE The return prevents seeing the message twice. See SICS-764 and SICS-765
return;
}
proc drive {args} {
set runargs [eval "mkrunargs $args"]
anstocapture sicsdrive {*}$runargs
#NOTE The return prevents seeing the message twice. See SICS-764 and SICS-765
return;
}
publish run user
publish drive user
source gumxml.tcl
::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false
::anticollider::protect_detector "true"
server_init
###########################################
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.
# You can add extra-configuration code in ../extraconfig.tcl