Merged in-situ modifications for Release 2.5 candidate 5
r2895 | ffr | 2010-04-29 16:02:15 +1000 (Thu, 29 Apr 2010) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
a2ca46ab67
commit
e6e3c3be52
@@ -36,7 +36,7 @@ namespace eval exp_mode {
|
||||
#4=Single
|
||||
variable c1ht_pos
|
||||
set valid_modes [list SB DB FOC MT POL]
|
||||
set c1ht_pos [list 1057 806.7 557.1 200 0.1]
|
||||
set c1ht_pos [list 1057 806.7 557.1 320 68.9]
|
||||
|
||||
command set_mode "text=[join $valid_modes ,] arg " { ;#need to change all softzero's
|
||||
global ::exp_mode::valid_modes
|
||||
@@ -64,8 +64,21 @@ namespace eval exp_mode {
|
||||
# the following line does the job. However, it is duplicated when the mode is set in
|
||||
# set_omega, so it is commented out for now.
|
||||
# drive ss1u 0 ss1d 0 ss2u 0 ss2d 0 ss3u 0 ss3d 0 ss4u 0 ss4d 0
|
||||
if {[catch {::exp_mode::set_omega $arg1} errMsg]} {return -code error $errMsg}
|
||||
if {[catch {::exp_mode::set_two_theta $arg2} errMsg]} {return -code error $errMsg}
|
||||
# if {[catch {::exp_mode::set_omega $arg1} errMsg]} {return -code error $errMsg}
|
||||
# if {[catch {::exp_mode::set_two_theta $arg2} errMsg]} {return -code error $errMsg}
|
||||
|
||||
omega $arg1
|
||||
twotheta $arg2
|
||||
|
||||
if {[catch {
|
||||
::exp_mode::set_omega $arg1
|
||||
::exp_mode::set_two_theta $arg2
|
||||
} errMsg ] } {
|
||||
omega -1
|
||||
twotheta -1
|
||||
return -code error $errMsg
|
||||
}
|
||||
|
||||
return -code ok
|
||||
}
|
||||
|
||||
@@ -114,9 +127,10 @@ proc ::exp_mode::set_omega { arg } {
|
||||
|
||||
switch $expmode {
|
||||
SB { ;#checked ARJN on 081231
|
||||
if {[catch {::exp_mode::checkMotionAndDrive m1ro [expr -1.*$arg/2.]} errMsg]} {return -code error $errMsg}
|
||||
drive st4vt 0
|
||||
if {[catch {::exp_mode::checkMotionAndDrive m1ro [expr -1.*$arg/2.]} errMsg]} {return -code error $errMsg}
|
||||
|
||||
set d1 [expr [SplitReply [slit3_distance]] - [SplitReply [guide1_distance]]]
|
||||
set d1 [expr [SplitReply [slit3_distance]] - [SplitReply [guide1_distance]]]
|
||||
set d2 [expr [SplitReply [sample_distance]] - [SplitReply [guide1_distance]]]
|
||||
set h1 [expr -1. * $d1 * tan($argrad)]
|
||||
set h2 [expr -1. * $d2 * tan($argrad)]
|
||||
@@ -148,23 +162,37 @@ proc ::exp_mode::set_omega { arg } {
|
||||
if { [catch {checkMotionAndDrive sz $h2} errMsg]} {return -code error $errMsg}
|
||||
}
|
||||
FOC {
|
||||
if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg}
|
||||
if {[catch {checkMotionAndDrive st3vt 0} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {
|
||||
checkMotion sth $arg
|
||||
checkMotion st3vt 0
|
||||
} errMsg ] } {
|
||||
return -code error $errMsg
|
||||
}
|
||||
run sth $arg st3vt 0
|
||||
}
|
||||
MT {
|
||||
if {[catch {checkMotionAndDrive st3vt 0} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {
|
||||
checkMotion sth $arg
|
||||
checkMotion st3vt 0
|
||||
} errMsg ] } {
|
||||
return -code error $errMsg
|
||||
}
|
||||
run sth $arg st3vt 0
|
||||
}
|
||||
POL {
|
||||
if {[catch {checkMotionAndDrive st3vt 0} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {
|
||||
checkMotion sth $arg
|
||||
checkMotion st3vt 0
|
||||
} errMsg ] } {
|
||||
return -code error $errMsg
|
||||
}
|
||||
run sth $arg st3vt 0
|
||||
}
|
||||
default {
|
||||
return -code error "omega driving not specified for that mode"
|
||||
}
|
||||
}
|
||||
|
||||
omega $arg
|
||||
return -code ok
|
||||
}
|
||||
publish ::exp_mode::set_omega user
|
||||
@@ -231,43 +259,56 @@ proc ::exp_mode::set_two_theta { arg } {
|
||||
if { [catch {checkMotionAndDrive dz [expr $h3 + $h4]} errMsg]} {return -code error $errMsg}
|
||||
}
|
||||
FOC {
|
||||
set d1 [SplitReply [dy]]
|
||||
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
|
||||
set h1 [expr $d1 * tan($argrad)]
|
||||
set h2 [expr $d2 * tan($argrad)]
|
||||
if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive dz $h1} errMsg]} {return -code error $errMsg}
|
||||
set d1 [SplitReply [dy]]
|
||||
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
|
||||
set h1 [expr $d1 * tan($argrad)]
|
||||
set h2 [expr $d2 * tan($argrad)]
|
||||
if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {
|
||||
checkMotion st4vt $h2
|
||||
checkMotion dz $h1
|
||||
} errMsg]} {
|
||||
return -code error $errMsg
|
||||
}
|
||||
run st4vt $h2 dz $h1
|
||||
}
|
||||
MT {
|
||||
set d1 [SplitReply [dy]]
|
||||
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
|
||||
set h1 [expr $d1 * tan($argrad)]
|
||||
set h2 [expr $d2 * tan($argrad)]
|
||||
if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive dz $h1} errMsg]} {return -code error $errMsg}
|
||||
set d1 [SplitReply [dy]]
|
||||
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
|
||||
set h1 [expr $d1 * tan($argrad)]
|
||||
set h2 [expr $d2 * tan($argrad)]
|
||||
if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {
|
||||
checkMotion st4vt $h2
|
||||
checkMotion dz $h1
|
||||
} errMsg ] } {
|
||||
return -code error $errMsg
|
||||
}
|
||||
run st4vt $h2 dz $h1
|
||||
}
|
||||
POL {
|
||||
set d1 [SplitReply [dy]]
|
||||
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
|
||||
set d3 [expr [SplitReply [anal_distance]] - [SplitReply [sample_distance]]]
|
||||
set h1 [expr $d1 * tan($argrad)]
|
||||
set h2 [expr $d2 * tan($argrad)]
|
||||
set h3 [expr $d3 * tan($argrad)]
|
||||
set ang1 [expr $arg + 0.8]
|
||||
if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive dz $h1} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive analz $h3} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {checkMotionAndDrive analtilt $ang1} errMsg]} {return -code error $errMsg}
|
||||
|
||||
set d1 [SplitReply [dy]]
|
||||
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
|
||||
set d3 [expr [SplitReply [anal_distance]] - [SplitReply [sample_distance]]]
|
||||
set h1 [expr $d1 * tan($argrad)]
|
||||
set h2 [expr $d2 * tan($argrad)]
|
||||
set h3 [expr $d3 * tan($argrad)]
|
||||
set ang1 [expr $arg + 0.8]
|
||||
if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
|
||||
if { [catch {
|
||||
checkMotion st4vt $h2
|
||||
checkMotion dz $h1
|
||||
checkMotion analz $h3
|
||||
checkMotion analtilit $ang1
|
||||
} errMsg ] } {
|
||||
return -code error $errMsg
|
||||
}
|
||||
run st4vt $h2 dz $h1 analz $h3 analtilit $ang1
|
||||
}
|
||||
default {
|
||||
return -code error "two_theta not defined for that mode: $expmode"
|
||||
return -code error "two_theta not defined for that mode: $expmode"
|
||||
}
|
||||
}
|
||||
twotheta $arg
|
||||
return -code ok
|
||||
}
|
||||
publish ::exp_mode::set_two_theta user
|
||||
|
||||
Reference in New Issue
Block a user