85 lines
2.4 KiB
Tcl
85 lines
2.4 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(motors)/extraconfig.tcl
|
|
fileeval $cfPath(plc)/plc.tcl
|
|
fileeval $cfPath(counter)/counter.tcl
|
|
fileeval $cfPath(beamline)/sct_power.tcl
|
|
fileeval $cfPath(environment)/temperature/sct_lakeshore_218.tcl
|
|
fileeval $cfPath(environment)/temperature/sct_lakeshore_340.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)/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"]
|
|
eval "sicsrun $runargs"
|
|
}
|
|
|
|
proc drive {args} {
|
|
set runargs [eval "mkrunargs $args"]
|
|
eval "sicsdrive $runargs"
|
|
}
|
|
|
|
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
|