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
|
||||
|
||||
@@ -34,7 +34,8 @@ if {$sim_mode == "true"} {
|
||||
#Measured absolute encoder reading at home position
|
||||
|
||||
set bz_home 8142000
|
||||
set c1ht_home 8152065
|
||||
#set c1ht_home 8152065 - this is wrong, it should be 8265000
|
||||
set c1ht_home 8265000
|
||||
set m1ro_home 134658
|
||||
set bat_home 8308518
|
||||
set st3vt_home 5250496
|
||||
|
||||
@@ -52,27 +52,31 @@ detector_distance 10000
|
||||
detector_base 300
|
||||
anal_distance 1808
|
||||
anal_base 20
|
||||
slit4_distance 5527
|
||||
slit4_distance 5331.15
|
||||
slit4_base 20
|
||||
sample_distance 5129
|
||||
sample_distance 5045.4
|
||||
sample_base 50
|
||||
slit3_distance 4808
|
||||
slit3_distance 4744.4
|
||||
slit3_base 20
|
||||
guide1_distance 2900.4 ;# distance measured to axis of rotation
|
||||
guide1_base
|
||||
guide2_distance 3200 ;# distance measured to midpoint of the 2nd compound mirror (i.e. closest to the sample)
|
||||
guide2_base
|
||||
slit2_distance 1895
|
||||
slit2_distance 1909.9
|
||||
slit2_base 20
|
||||
chopper4_distance 823
|
||||
chopper4_distance 808
|
||||
chopper4_base 20
|
||||
chopper3_distance 370
|
||||
chopper4_phase_offset 0.3246
|
||||
chopper3_distance 359
|
||||
chopper3_base 20
|
||||
chopper2_distance 102
|
||||
chopper3_phase_offset 0.38500
|
||||
chopper2_distance 103
|
||||
chopper2_base 20
|
||||
chopper2_phase_offset -0.02
|
||||
chopper1_distance 0
|
||||
chopper1_base 20
|
||||
slit1_distance -244
|
||||
chopper1_phase_offset -1.857
|
||||
slit1_distance -256.1
|
||||
slit1_base 20
|
||||
mode NONE
|
||||
omega -1
|
||||
|
||||
@@ -38,9 +38,9 @@ source gumxml.tcl
|
||||
::utility::mkVar ::anticollider::protect_detector text manager protect_detector false detector true false
|
||||
::anticollider::protect_detector "true"
|
||||
|
||||
# Driver for Bruker BEC1 power supply (1-Tesla Magnet) - beta
|
||||
# Driver for Bruker BEC1 power supply (1-Tesla Magnet)
|
||||
# driver short-name IP-address MoxaPort Tolerance(Amps)
|
||||
#add_bruker_BEC1 ma1 137.157.202.145 4003 0.1
|
||||
#add_bruker_BEC1 ma1 137.157.202.152 4444 0.1
|
||||
|
||||
server_init
|
||||
###########################################
|
||||
|
||||
Reference in New Issue
Block a user