- 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:
23
tascom.tcl
23
tascom.tcl
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user