- Fixes to HM code for AMOR TOF

- A couple of TAS fixes
- o2t was fixed to work with any drivable
- FOCUS was mended to include beam monitor in data file
This commit is contained in:
cvs
2002-07-19 15:09:21 +00:00
parent e0c5afcf6d
commit bde19bb973
38 changed files with 604 additions and 249 deletions

View File

@@ -77,6 +77,15 @@ proc tasSplit {text} {
return [lindex $list 1]
}
#----------------------------------------------------------------------
# put an angle into 360
proc circlify {val} {
set p $val
while {$p > 360.0} {
set p [expr $p - 360.]
}
return $p
}
#-------------------------------------------------------------------------
# motor zero points are handled differently in SICS and MAD:
# - MAD zero's are of opposite sign to SICS
@@ -102,8 +111,8 @@ proc madZero args {
set high [tasSplit [$mot softupperlim]]
set displacement [expr $val - $zero]
$mot softzero $val
$mot softupperlim [expr $high + $displacement]
$mot softlowerlim [expr $low + $displacement]
$mot softupperlim [expr $high - $displacement]
$mot softlowerlim [expr $low - $displacement]
}
}
@@ -574,7 +583,7 @@ proc fz args {
}
#--------------------------------------------------------------------------
# pr (int) values of variables
# pr(int) values of variables
proc pr args {
global tasmap
@@ -582,7 +591,8 @@ proc pr args {
set line [string tolower $line]
set pos 0
set token [varToken $line $pos]
while { [string compare $token END] != 0 } {
while { [string compare $token END] != 0 && \
[string compare $token end] != 0 } {
#-------- check for mapped values first
if { [info exists tasmap($token)] == 1 } {
set val [tasSplit [eval $tasmap($token)]]
@@ -907,10 +917,10 @@ proc sz args {
set mot [varToken $line $pos]
set val [varToken $line $pos]
if { [lsearch $tasmot $mot] < 0 } {
error [format "ERROR: %s is no motor %s" $mot $usage]
error [format "ERROR: %s is no motor\n %s" $mot $usage]
}
if { [string compare [SICStype $val] NUM ] != 0 } {
error [format "ERROR: expected number, got %s %s" $val $usage]
error [format "ERROR: expected number, got %s \n%s" $val $usage]
}
#-------- output, output, output.........
append output [format "Values : Lo(hard) Lo(soft) Posn%s" \
@@ -945,7 +955,6 @@ proc sz args {
$loh $los $pos $targ $his $hih $zero]
return $output
}
#---------------------------------------------------------------------------
# switches and the sw command