Merged changes made in-situ

r2768 | ffr | 2009-03-31 17:25:20 +1100 (Tue, 31 Mar 2009) | 2 lines
This commit is contained in:
Ferdi Franceschini
2009-03-31 17:25:20 +11:00
committed by Douglas Clowes
parent d2f57e4615
commit 8e5b7842e3
17 changed files with 471 additions and 229 deletions

View File

@@ -1,5 +1,5 @@
# $Revision: 1.45 $ # $Revision: 1.46 $
# $Date: 2009-03-30 23:16:52 $ # $Date: 2009-03-31 06:25:18 $
# Author: Ferdi Franceschini # Author: Ferdi Franceschini
# Based on the examples in the hs_test.tcl sample configuration by Mark Lesha. # Based on the examples in the hs_test.tcl sample configuration by Mark Lesha.
# http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view # http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view
@@ -929,7 +929,8 @@ proc CAT_TABLE {args} {
# #
proc FAT_TABLE {args} { proc FAT_TABLE {args} {
if [ catch { if [ catch {
set attributes { FRAME_FREQUENCY SIZE_PERIOD COUNT_METHOD COUNT_SIZE READ_DATA_TYPE VIEW_MAG_X VIEW_MAG_Y} set attributes { FRAME_FREQUENCY SIZE_PERIOD NOS_PERIODS COUNT_METHOD COUNT_SIZE READ_DATA_TYPE VIEW_MAG_X VIEW_MAG_Y HISTO_STREAMING P7888_PLL_FREQ_CARD_X P7888_PLL_FREQ_CARD_Y P7888_CARD_MODE_X P7888_CARD_MODE_Y RAW_HISTO_XMIN RAW_HISTO_XMAX RAW_HISTO_YMIN RAW_HISTO_YMAX TEST_HISTO_1D_SIZES TEST_HISTO_2D_SIZES P7888_PLL_SYNC_METHOD }
set elements {{ }} set elements {{ }}
set tag FAT set tag FAT

View File

@@ -10,7 +10,7 @@
# forbid {0 10} for sphi whenall {schi in {10 15} sx {10 11} } # forbid {0 10} for sphi whenall {schi in {10 15} sx {10 11} }
for stth forbid {20 30} when mtth in {44 45} for stth forbid {20 30} when mtth in {40 44.5}
for stth forbid {-120 -100} when mtth in {99 100} for stth forbid {-120 -100} when mtth in {99 100}
for mtth forbid {90 100} when stth in {-120 -119} for mtth forbid {90 100} when stth in {-120 -119}
for mtth forbid {45 55} when stth in {29 30} for mtth forbid {40 44.5} when stth in {29 30}

View File

@@ -55,7 +55,7 @@
READ_DATA_ORDER_FLIP_Y="ENABLE" READ_DATA_ORDER_FLIP_Y="ENABLE"
VIEW_TYPE="TOTAL_HISTOGRAM_XY" VIEW_TYPE="TOTAL_HISTOGRAM_XY"
VIEW_COLOUR_TABLE="RAIN" VIEW_COLOUR_TABLE="RAIN"
VIEW_SCALING_TYPE="LOG" VIEW_SCALING_TYPE="LINEAR"
VIEW_LOG_SCALING_RANGE="2" VIEW_LOG_SCALING_RANGE="2"
VIEW_ROOT_SCALING_RANGE="2" VIEW_ROOT_SCALING_RANGE="2"
VIEW_ROI_XMIN="-1" VIEW_ROI_XMIN="-1"

View File

@@ -0,0 +1,95 @@
# Test script for multi period acquisition and saving.
set nos_periods 1
proc histmem_period_single { } {
# Because bugs may not yet have been corrected in hmm_configuration_common_1.tcl,
# apply the default settings before attempting del/clear.
global nos_periods
set nos_periods 1
FAT_TABLE -set NOS_PERIODS 1
FAT_TABLE -del NOS_PERIODS
BAT_TABLE -set PERIOD_INDICES { 0 } NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1 NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0
BAT_TABLE -clear
}
Publish histmem_period_single User
proc histmem_period_sequence { Np Nf } {
# Note - sequence needs to be at least 2 periods.
global nos_periods
set nos_periods $Np
FAT_TABLE -set NOS_PERIODS $Np
BAT_TABLE -set PERIOD_INDICES { 0 1 } NO_BAT_ENTRIES $Np NO_BAT_PERIODS $Np NO_REPEAT_ENTRY $Nf NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1
}
Publish histmem_period_sequence User
proc histmem_save_period_sequence { } {
global nos_periods
newfile HISTOGRAM_XYT
for { set i 0 } { $i < $nos_periods } { incr i } {
hmm configure read_data_period_number $i
save $i
}
}
Publish histmem_save_period_sequence User
proc histmem_period_strobo {Freq Bins} {
global nos_bins
set nos_bins $Bins
set bintime [expr int(1000000./($Freq*$Bins))]
histmem fsrce EXTERNAL
set oatstr "OAT_TABLE -set T {0 $bintime} NTC $Bins"
# OAT_TABLE -set T { 0 $bintime } NTC $Bins
eval $oatstr
histmem loadconf
}
Publish histmem_period_strobo User
proc histmem_strobo_off {} {
histmem fsrce INTERNAL
OAT_TABLE -set T { 0 200000 } NTC 1
histmem loadconf
}
Publish histmem_strobo_off User
proc histmem_acquire_period_sequence { Np Nf } {
newfile HISTOGRAM_XYT
histmem stop
histmem_period_sequence $Np $Nf
histmem loadconf
histmem start
set dlytime [ expr int( 1000 * $Nf / 50. ) ]
# clientput "Waiting for" $dlytime "ms..."
after $dlytime
# clientput "tc1 reading is: " [tc1 get]
global nos_periods
for { set i 0 } { $i < $nos_periods } { incr i } {
# after $dlytime
# set current_period -1
# while { $current_period < $i } {
# update
# after 500
# # hmm count
# # hmm init 2
# clientput [hmm configure current_period]
# set current_period [lindex [split [hmm configure current_period] " "] 2]
# clientput "i = " $i " and the current period is " $current_period
# }
hmm configure read_data_period_number $i
save [expr $i]
}
clientput "Acquisition completed."
}
Publish histmem_acquire_period_sequence User

View File

@@ -0,0 +1,74 @@
# Test script for multi period acquisition and saving.
set nos_periods 1
proc histmem_period_single { } {
# Because bugs may not yet have been corrected in hmm_configuration_common_1.tcl,
# apply the default settings before attempting del/clear.
global nos_periods
set nos_periods 1
FAT_TABLE -set NOS_PERIODS 1
FAT_TABLE -del NOS_PERIODS
BAT_TABLE -set PERIOD_INDICES { 0 } NO_BAT_ENTRIES 1 NO_BAT_PERIODS 1 NO_REPEAT_ENTRY 0 NO_REPEAT_TABLE 0 NO_EXECUTE_TABLE 0
BAT_TABLE -clear
}
Publish histmem_period_single User
proc histmem_period_sequence { Np Nf } {
# Note - sequence needs to be at least 2 periods.
global nos_periods
set nos_periods $Np
FAT_TABLE -set NOS_PERIODS $Np
BAT_TABLE -set PERIOD_INDICES { 0 1 } NO_BAT_ENTRIES $Np NO_BAT_PERIODS $Np NO_REPEAT_ENTRY $Nf NO_REPEAT_TABLE 1 NO_EXECUTE_TABLE 1
}
Publish histmem_period_sequence User
proc histmem_save_period_sequence { } {
global nos_periods
newfile HISTOGRAM_XYT
for { set i 0 } { $i < $nos_periods } { incr i } {
hmm configure read_data_period_number $i
save $i
}
}
Publish histmem_save_period_sequence User
proc histmem_acquire_period_sequence { Np Nf } {
newfile HISTOGRAM_XYT
histmem stop
histmem_period_sequence $Np $Nf
histmem loadconf
histmem start
set dlytime [ expr int( 1000 * $Nf / 50. ) ]
# clientput "Waiting for" $dlytime "ms..."
# after $dlytime
# clientput "tc1 reading is: " [tc1 get]
global nos_periods
for { set i 0 } { $i < $nos_periods } { incr i } {
after $dlytime
# set current_period -1
# while { $current_period < $i } {
# update
# after 500
# # hmm count
# # hmm init 2
# clientput [hmm configure current_period]
# set current_period [lindex [split [hmm configure current_period] " "] 2]
# clientput "i = " $i " and the current period is " $current_period
# }
hmm configure read_data_period_number $i
save [expr $i + 1]
}
clientput "Acquisition completed."
}
Publish histmem_acquire_period_sequence User

View File

@@ -99,8 +99,8 @@ set slit2HGroup second/horizontal
# hnotify messages to a reasonable level # hnotify messages to a reasonable level
set move_count 10 set move_count 10
#fileeval $cfPath(motors)/tilt_configuration.tcl fileeval $cfPath(motors)/tilt_configuration.tcl
fileeval $cfPath(motors)/euler_configuration.tcl #fileeval $cfPath(motors)/euler_configuration.tcl
############################ ############################
# Motor Controller 1 # Motor Controller 1
# Motor Controller 1 # Motor Controller 1
@@ -221,7 +221,7 @@ Motor mom $motor_driver_type [params \
axis E\ axis E\
units degrees\ units degrees\
hardlowerlim -5\ hardlowerlim -5\
hardupperlim 95\ hardupperlim 99\
maxSpeed 1\ maxSpeed 1\
maxAccel 1\ maxAccel 1\
maxDecel 1\ maxDecel 1\
@@ -288,7 +288,7 @@ Motor som $motor_driver_type [params \
absEnc 1\ absEnc 1\
absEncHome $som_Home\ absEncHome $som_Home\
cntsPerX 4096] cntsPerX 4096]
setHomeandRange -motor som -home 0 -lowrange 80 -uprange 60 setHomeandRange -motor som -home 0 -lowrange 80 -uprange 105
som speed 1 som speed 1
som precision 0.01 som precision 0.01
som part sample som part sample
@@ -324,9 +324,9 @@ Motor oct $motor_driver_type [params \
units degrees\ units degrees\
hardlowerlim -2\ hardlowerlim -2\
hardupperlim 2\ hardupperlim 2\
maxSpeed 0.5\ maxSpeed 1.0\
maxAccel 0.1\ maxAccel 1.0\
maxDecel 0.1\ maxDecel 1.0\
stepsPerX 56762\ stepsPerX 56762\
absEnc 1\ absEnc 1\
absEncHome $oct_Home\ absEncHome $oct_Home\
@@ -470,6 +470,12 @@ ss1d long_name bottom
############################ ############################
# #
# Slit 2, right
#set ss2flg true to use second slit
set ss2flg false
if {$ss2flg} {
# Slit 2, right # Slit 2, right
Motor ss2r $motor_driver_type [params \ Motor ss2r $motor_driver_type [params \
asyncqueue mc4\ asyncqueue mc4\
@@ -545,6 +551,7 @@ ss2d home 0
ss2d movecount $move_count ss2d movecount $move_count
ss2d part slits.second ss2d part slits.second
ss2d long_name bottom ss2d long_name bottom
}
proc mthGet {} { return [expr [SplitReply [mtth]]/2.0]} proc mthGet {} { return [expr [SplitReply [mtth]]/2.0]}
proc mthSet {val} { return "mtth=[SplitReply [mtth]]"} proc mthSet {val} { return "mtth=[SplitReply [mtth]]"}
@@ -570,9 +577,10 @@ sicslist setatt sth long_name half_azimuthal_angle
make_gap_motors ss1vg gap ss1vo offset ss1u ss1d mm $slit1VGroup make_gap_motors ss1vg gap ss1vo offset ss1u ss1d mm $slit1VGroup
make_gap_motors ss1hg gap ss1ho offset ss1r ss1l mm $slit1HGroup make_gap_motors ss1hg gap ss1ho offset ss1r ss1l mm $slit1HGroup
if {$ss2flg} {
make_gap_motors ss2vg gap ss2vo offset ss2u ss2d mm $slit2VGroup make_gap_motors ss2vg gap ss2vo offset ss2u ss2d mm $slit2VGroup
make_gap_motors ss2hg gap ss2ho offset ss2r ss2l mm $slit2HGroup make_gap_motors ss2hg gap ss2ho offset ss2r ss2l mm $slit2HGroup
}
proc motor_set_sobj_attributes {} { proc motor_set_sobj_attributes {} {
} }

View File

@@ -1,5 +1,5 @@
# $Revision: 1.29 $ # $Revision: 1.30 $
# $Date: 2008-10-27 04:55:43 $ # $Date: 2009-03-31 06:25:18 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au) # Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $ # Last revision by: $Author: ffr $
@@ -28,16 +28,18 @@ fileeval $cfPath(plc)/plc.tcl
fileeval $cfPath(counter)/counter.tcl fileeval $cfPath(counter)/counter.tcl
#TODO Provide method for choosing environment controller #TODO Provide method for choosing environment controller
fileeval $cfPath(environment)/temperature/lakeshore340.tcl fileeval $cfPath(environment)/temperature/lakeshore340.tcl
fileeval $cfPath(environment)/temperature/west400.tcl
fileeval $cfPath(hmm)/hmm_configuration.tcl fileeval $cfPath(hmm)/hmm_configuration.tcl
fileeval $cfPath(nexus)/nxscripts.tcl fileeval $cfPath(nexus)/nxscripts.tcl
fileeval $cfPath(scan)/scan.tcl fileeval $cfPath(scan)/scan.tcl
fileeval $cfPath(commands)/commands.tcl fileeval $cfPath(commands)/commands.tcl
fileeval $cfPath(anticollider)/anticollider.tcl fileeval $cfPath(anticollider)/anticollider.tcl
fileeval $cfPath(hmm)/hmm_rapid.tcl
source gumxml.tcl source gumxml.tcl
# ::environment::temperature::add_ls340 tc1 1 ::environment::temperature::add_ls340 tc1 1
# ::environment::temperature::add_ls340 tc2 2 ::environment::temperature::add_ls340 tc2 2
# ::environment::temperature::add_west400 #::environment::temperature::add_west400
server_init server_init
########################################### ###########################################
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly. # WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.

View File

@@ -11,7 +11,8 @@
for pcx forbid {80 130} for pcx forbid {80 130}
for pcr forbid {-inf inf} when mom in {45 50} for pcr forbid {3 176} when mom in {45 50}
#for pcr forbid {-inf inf} when mom in {45 50}
for stth forbid {160 167} when mtth in {87 88} for stth forbid {160 167} when mtth in {87 88}
#for stth forbid {0 15} when mtth in {139.5 140.5} #for stth forbid {0 15} when mtth in {139.5 140.5}
for mtth forbid {87 100} when stth in {166 167} for mtth forbid {87 100} when stth in {166 167}

View File

@@ -1,5 +1,5 @@
# $Revision: 1.34 $ # $Revision: 1.35 $
# $Date: 2009-03-30 23:16:53 $ # $Date: 2009-03-31 06:25:19 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au) # Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $ # Last revision by: $Author: ffr $
@@ -169,7 +169,9 @@ Motor mchi $motor_driver_type [params \
absEnc 1\ absEnc 1\
absEncHome $mchi_Home\ absEncHome $mchi_Home\
cntsPerX 8192] cntsPerX 8192]
setHomeandRange -motor mchi -home 90 -lowrange 2 -uprange 2 mchi 90.1
mchi softlowerlim 88
mchi softupperlim 92
mchi speed 1 mchi speed 1
mchi movecount $move_count mchi movecount $move_count
mchi precision 0.01 mchi precision 0.01
@@ -245,7 +247,7 @@ Motor mtth $motor_driver_type [params \
axis F\ axis F\
units degrees\ units degrees\
hardlowerlim 87\ hardlowerlim 87\
hardupperlim 140.2\ hardupperlim 155\
maxSpeed 0.2\ maxSpeed 0.2\
maxAccel 0.2\ maxAccel 0.2\
maxDecel 0.2\ maxDecel 0.2\
@@ -257,7 +259,8 @@ Motor mtth $motor_driver_type [params \
absEncHome $mtth_Home\ absEncHome $mtth_Home\
cntsPerX -93207] cntsPerX -93207]
mtth softlowerlim 87 mtth softlowerlim 87
mtth softupperlim 140.2 #mtth softupperlim 140.2
mtth softupperlim 155
mtth home 90 mtth home 90
mtth speed 0.2 mtth speed 0.2
mtth movecount $move_count mtth movecount $move_count
@@ -440,8 +443,8 @@ Motor stth $motor_driver_type [params \
axis F\ axis F\
units degrees\ units degrees\
hardlowerlim -156.75\ hardlowerlim -156.75\
hardupperlim 7.25\ hardupperlim 5.25\
maxSpeed 0.5\ maxSpeed 1.0\
maxAccel 0.1\ maxAccel 0.1\
maxDecel 0.1\ maxDecel 0.1\
stepsPerX 125000\ stepsPerX 125000\
@@ -449,7 +452,7 @@ Motor stth $motor_driver_type [params \
absEncHome $stth_Home\ absEncHome $stth_Home\
cntsPerX -93207] cntsPerX -93207]
stth softlowerlim -156.75 stth softlowerlim -156.75
stth softupperlim 7.25 stth softupperlim 5.25
stth home 0 stth home 0
stth speed 0.5 stth speed 0.5
stth movecount $move_count stth movecount $move_count
@@ -699,6 +702,14 @@ Motor msd ASIM [params\
msd part sample msd part sample
msd long_name mono_sample_mm msd long_name mono_sample_mm
Motor sc ASIM [params\
units mm\
hardlowerlim 0\
hardupperlim 1\
]
sc part sample
sc long_name secondary_collimator
proc mthGet {} { return [expr [SplitReply [mtth]]/2.0]} proc mthGet {} { return [expr [SplitReply [mtth]]/2.0]}
proc mthSet {val} { return "mtth=[SplitReply [mtth]]"} proc mthSet {val} { return "mtth=[SplitReply [mtth]]"}
publish mthSet user publish mthSet user

View File

@@ -1,5 +1,5 @@
# $Revision: 1.35 $ # $Revision: 1.36 $
# $Date: 2008-10-27 04:55:44 $ # $Date: 2009-03-31 06:25:19 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au) # Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $ # Last revision by: $Author: ffr $
@@ -28,16 +28,19 @@ fileeval $cfPath(plc)/plc.tcl
fileeval $cfPath(counter)/counter.tcl fileeval $cfPath(counter)/counter.tcl
#TODO Provide method for choosing environment controller #TODO Provide method for choosing environment controller
fileeval $cfPath(environment)/temperature/lakeshore340.tcl fileeval $cfPath(environment)/temperature/lakeshore340.tcl
fileeval $cfPath(environment)/temperature/west400.tcl
fileeval $cfPath(hmm)/hmm_configuration.tcl fileeval $cfPath(hmm)/hmm_configuration.tcl
fileeval $cfPath(nexus)/nxscripts.tcl fileeval $cfPath(nexus)/nxscripts.tcl
fileeval $cfPath(scan)/scan.tcl fileeval $cfPath(scan)/scan.tcl
fileeval $cfPath(commands)/commands.tcl fileeval $cfPath(commands)/commands.tcl
fileeval $cfPath(anticollider)/anticollider.tcl fileeval $cfPath(anticollider)/anticollider.tcl
fileeval $cfPath(environment)/robby_configuration.tcl
source gumxml.tcl source gumxml.tcl
# ::environment::temperature::add_ls340 tc1 1 # ::environment::temperature::add_ls340 tc1 1
# ::environment::temperature::add_ls340 tc2 2 # ::environment::temperature::add_ls340 tc2 2
# ::environment::temperature::add_west400 ::environment::temperature::add_west400
# ::robot::add_robby
server_init server_init
########################################### ###########################################
# WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly. # WARNING: Do not add any code below server_init, if you do SICS may fail to initialise properly.

View File

@@ -9,13 +9,13 @@ namespace eval beam {
command attenuator {text=in,out,osc pos} { command attenuator {text=in,out,osc pos} {
switch $pos { switch $pos {
"in" { "in" {
bat send POS=0 bat send oscd=0
} }
"out" { "out" {
bat send POS=-1 bat send oscd=-1
} }
"osc" { "osc" {
bat send POS=1 bat send oscd=1
} }
default { default {
return -code error "ERROR: valid values are in, out, osc" return -code error "ERROR: valid values are in, out, osc"
@@ -95,7 +95,7 @@ proc ::exp_mode::set_omega { arg } {
} }
if {$arg<0} { if {$arg<0} {
return -code error "omega must be greater than 1" return -code error "omega must be greater than 0"
} }
if {[catch {::exp_mode::set_guide_element $expmode} errMsg]} { if {[catch {::exp_mode::set_guide_element $expmode} errMsg]} {
@@ -104,8 +104,8 @@ proc ::exp_mode::set_omega { arg } {
set argrad [deg2rad $arg] ;#position in radians set argrad [deg2rad $arg] ;#position in radians
switch $expmode { switch $expmode {
SB { SB { ;#checked ARJN on 081231
if {[catch {::exp_mode::checkMotionAndDrive m1ro [expr $arg/2.]} errMsg]} {return -code error $errMsg} 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 d2 [expr [SplitReply [sample_distance]] - [SplitReply [guide1_distance]]]
@@ -113,26 +113,37 @@ proc ::exp_mode::set_omega { arg } {
set h2 [expr -1. * $d2 * tan($argrad)] set h2 [expr -1. * $d2 * tan($argrad)]
if {[catch {checkMotionAndDrive st3vt $h1} errMsg]} {return -code error $errMsg} if {[catch {checkMotionAndDrive st3vt $h1} errMsg]} {return -code error $errMsg}
if {[catch {checkMotionAndDrive sz $h2} errMsg]} {return -code error $errMsg} if {[catch {isszst4vtsafe sz $h2} errMsg]} {return -code error $errMsg}
if {[catch {checkMotionAndDrive sz $h2} errMsg]} {return -code error $errMsg}
} }
DB { DB { ;#checked ARJN on 081231
return -code error "ERROR: set_omega not yet defined for DB"
set temp [deg2rad 2.4] set temp [deg2rad 2.4]
set offset [expr 600*sin($temp)] ;#offset is the vertical drop from the beam centre onto the middle of the second compound mirror
;# each compound mirror is 600mm long
;# therefore the distance between the place where the beam hits the centre of both mirrors is
;# 2 * 300 * cos(1.2) = 599.868
;# guide2_distance is therefore the distance from the midpoint of the second compound mirror to chopper disc 1.
;# i.e. sample-> midpoint of compound mirror2 = 1546 + 300*cos3.6 = 1845.4
set offset [expr 599.868*sin($temp)]
set arg 4.8 ;#fixed angle set arg 4.8 ;#fixed angle
set d1 [expr [SplitReply [slit3_distance]] - [SplitReply [guide2_distance]]] set d1 [expr [SplitReply [slit3_distance]] - [SplitReply [guide2_distance]]]
set d2 [expr [SplitReply [sample_distance]] - [SplitReply [guide2_distance]]] set d2 [expr [SplitReply [sample_distance]] - [SplitReply [guide2_distance]]]
set h1 [expr -1. * $d1 * tan($argrad) - $offset] set h1 [expr -1. * $d1 * tan($argrad) - $offset]
set h2 [expr -1. * $d1 * tan($argrad) - $offset] set h2 [expr -1. * $d2 * tan($argrad) - $offset]
if { [catch {checkMotionAndDrive st3vt $h1} errMsg]} {return -code error $errMsg} if { [catch {checkMotionAndDrive st3vt $h1} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive sz $h2} errMsg]} {return -code error $errMsg} if { [catch {isszst4vtsafe sz $h2} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive sz $h2} errMsg]} {return -code error $errMsg}
} }
FOC { FOC {
if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg} if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg}
if {[catch {checkMotionAndDrive st3vt 0} errMsg]} {return -code error $errMsg}
} }
MT { MT {
if {[catch {checkMotionAndDrive st3vt 0} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg} if { [catch {checkMotionAndDrive sth $arg} errMsg]} {return -code error $errMsg}
} }
default { default {
@@ -159,18 +170,18 @@ proc ::exp_mode::set_two_theta { arg } {
return -code error "two_theta is less than 0" return -code error "two_theta is less than 0"
} }
set argrad [deg2rad $arg] ;#position in radians set argrad [deg2rad $arg] ;#2theta position in radians
set omegarad [deg2rad $expomega] set omegarad [deg2rad $expomega]
Clientput $expmode Clientput $expmode
switch $expmode { switch $expmode {
SB { SB { ;#checked ARJN 081231
set d1 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]] set d1 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [guide1_distance]]] set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [guide1_distance]]]
set h1 [expr -1. * $d2 * tan($omegarad)] set h1 [expr -1. * $d2 * tan($omegarad)] ;#distance if 2theta is zero, i.e. the direct beam
set b [expr $d1 / cos($omegarad)] set b [expr $d1 / cos($omegarad)]
set c [expr $d1 / cos($argrad-$omegarad)] set c [expr $d1 / cos($argrad-$omegarad)]
set h2 [expr sqrt(pow($b,2) + pow($c,2) - 2*$b*$c*cos($argrad))] set h2 [expr sqrt(pow($b,2) + pow($c,2) - 2*$b*$c*cos($argrad))] ;#cosine rule
set d3 [expr [SplitReply [dy]]] set d3 [expr [SplitReply [dy]]]
set d4 [expr [SplitReply [dy]] + [SplitReply [sample_distance]] - [SplitReply [guide1_distance]]] set d4 [expr [SplitReply [dy]] + [SplitReply [sample_distance]] - [SplitReply [guide1_distance]]]
@@ -178,13 +189,14 @@ proc ::exp_mode::set_two_theta { arg } {
set b [expr $d3 / cos($omegarad)] set b [expr $d3 / cos($omegarad)]
set c [expr $d3 / cos($argrad-$omegarad)] set c [expr $d3 / cos($argrad-$omegarad)]
set h4 [expr sqrt(pow($b,2) + pow($c,2) - 2*$b*$c*cos($argrad))] set h4 [expr sqrt(pow($b,2) + pow($c,2) - 2*$b*$c*cos($argrad))]
if { [catch {isszst4vtsafe st4vt [expr $h2 + $h1]} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive st4vt [expr $h2 + $h1]} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive dz [expr $h3 + $h4]} errMsg]} {return -code error $errMsg} if { [catch {checkMotionAndDrive dz [expr $h3 + $h4]} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive st4vt [expr $h2 + $h1]} errMsg]} {return -code error $errMsg}
} }
DB { DB { ;#checked ARJN 081231
return -code error "ERROR: set_omega not yet defined for DB"
set temp [deg2rad 2.4] set temp [deg2rad 2.4]
set offset [expr 600*sin($temp)] set offset [expr 599.868*sin($temp)]
set expomega 4.8 set expomega 4.8
set omegarad [deg2rad $expomega] set omegarad [deg2rad $expomega]
@@ -201,25 +213,27 @@ proc ::exp_mode::set_two_theta { arg } {
set b [expr $d3 / cos($omegarad)] set b [expr $d3 / cos($omegarad)]
set c [expr $d3 / cos($argrad-$omegarad)] set c [expr $d3 / cos($argrad-$omegarad)]
set h4 [expr sqrt(pow($b,2) + pow($c,2) - 2*$b*$c*cos($argrad))] set h4 [expr sqrt(pow($b,2) + pow($c,2) - 2*$b*$c*cos($argrad))]
if { [catch {isszst4vtsafe st4vt [expr $h2 + $h1]} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive st4vt [expr $h2 + $h1]} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive dz [expr $h3 + $h4]} errMsg]} {return -code error $errMsg} if { [catch {checkMotionAndDrive dz [expr $h3 + $h4]} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive st4vt [expr $h2 + $h1]} errMsg]} {return -code error $errMsg}
} }
FOC { FOC {
set d1 [SplitReply [dy]] set d1 [SplitReply [dy]]
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]] set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
set h1 [expr $d1 * tan($argrad)] set h1 [expr $d1 * tan($argrad)]
set h2 [expr $d2 * tan($argrad)] set h2 [expr $d2 * tan($argrad)]
if { [catch {checkMotionAndDrive dz $h1} errMsg]} {return -code error $errMsg} if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive 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}
} }
MT { MT {
set d1 [SplitReply [dy]] set d1 [SplitReply [dy]]
set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]] set d2 [expr [SplitReply [slit4_distance]] - [SplitReply [sample_distance]]]
set h1 [expr $d1 * tan($argrad)] set h1 [expr $d1 * tan($argrad)]
set h2 [expr $d2 * tan($argrad)] set h2 [expr $d2 * tan($argrad)]
if { [catch {checkMotionAndDrive dz $h1} errMsg]} {return -code error $errMsg} if { [catch {isszst4vtsafe st4vt $h2} errMsg]} {return -code error $errMsg}
if { [catch {checkMotionAndDrive 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}
} }
default { default {
return -code error "two_theta not defined for that mode: $expmode" return -code error "two_theta not defined for that mode: $expmode"
@@ -236,9 +250,14 @@ proc ::exp_mode::checkMotion { scan_variable target } {
if {[lsearch $motor_list $scan_variable]==-1} { if {[lsearch $motor_list $scan_variable]==-1} {
return -code error "you tried to drive a motor that doesn't exist" return -code error "you tried to drive a motor that doesn't exist"
} }
set softzero [SplitReply [$scan_variable softzero]]
set absoluteTarget [expr $softzero+$target]
if { [catch {isszst4vtsafe $scan_variable $target} errMsg]} {return -code error $errMsg}
if {[catch { if {[catch {
::scan::check_limit $scan_variable hardlowerlim $target ::scan::check_limit $scan_variable hardlowerlim $absoluteTarget
::scan::check_limit $scan_variable hardupperlim $target ::scan::check_limit $scan_variable hardupperlim $absoluteTarget
::scan::check_limit $scan_variable softlowerlim $target ::scan::check_limit $scan_variable softlowerlim $target
::scan::check_limit $scan_variable softupperlim $target ::scan::check_limit $scan_variable softupperlim $target
}]} { }]} {
@@ -272,6 +291,34 @@ proc ::exp_mode::checkMotionAndDrive { scan_variable target } {
} }
publish ::exp_mode::checkMotionAndDrive user publish ::exp_mode::checkMotionAndDrive user
proc ::exp_mode::isszst4vtsafe { scan_variable target } {
set szsoftzero [SplitReply [sz softzero]]
set st4vtsoftzero [SplitReply [st4vt softzero]]
set szPosition [expr [SplitReply [sz]] + $szsoftzero]
set st4vtPosition [expr [SplitReply [st4vt]] + $st4vtsoftzero]
set szHardUpperLim [SplitReply [sz hardupperlim]]
if { [string equal $scan_variable "sz"] || [string equal $scan_variable "st4vt"]} {
switch $scan_variable {
sz {
set szPosition [expr $target + $szsoftzero]
}
st4vt {
set st4vtPosition [expr $target + $st4vtsoftzero]
}
}
set distance [expr $szHardUpperLim - $szPosition + $st4vtPosition ]
if { $distance < 98. } {
return -code error "You would have a collision between st4vt and sz if you tried to move $scan_variable to $target"
}
}
return -code ok
}
publish ::exp_mode::isszst4vtsafe user
proc ::exp_mode::deg2rad { arg } { proc ::exp_mode::deg2rad { arg } {
set pi 3.1415926535897931 set pi 3.1415926535897931
return [expr $pi * $arg / 180.] return [expr $pi * $arg / 180.]

View File

@@ -37,8 +37,9 @@ set bz_home 8142000
set c1ht_home 8265000 set c1ht_home 8265000
set m1ro_home 134658 set m1ro_home 134658
set bat_home 8308518 set bat_home 8308518
set st3vt_home 8742250 set st3vt_home 5250496
set st4vt_home 8806900 #set st3vt_home 8742250 - victim of the encoder rearrangement
set st4vt_home 5806721
set sth_home 23541737 set sth_home 23541737
#set sphi_home 7548440 - victim of the NaN #set sphi_home 7548440 - victim of the NaN
set sphi_home 7450470 set sphi_home 7450470
@@ -46,7 +47,7 @@ set sx_home 8574000
set sy_home 7500000 set sy_home 7500000
set sz_home 8927484 set sz_home 8927484
set dy_home 8838649 set dy_home 8838649
set dz_home 7805000 set dz_home 7788617
#Measured or computed step rate for sz (Sample Raise) #Measured or computed step rate for sz (Sample Raise)
# Motor:25000/turn, gear:1/25, screw:5mm/turn # Motor:25000/turn, gear:1/25, screw:5mm/turn
@@ -331,7 +332,7 @@ Motor st3vt $motor_driver_type [params \
stepsPerX 25000\ stepsPerX 25000\
absEnc 1\ absEnc 1\
absEncHome $st3vt_home\ absEncHome $st3vt_home\
cntsPerX -8192] cntsPerX 8192]
st3vt part slits.$slit3VGroup st3vt part slits.$slit3VGroup
st3vt long_name st3vt st3vt long_name st3vt
st3vt softlowerlim 0 st3vt softlowerlim 0
@@ -355,7 +356,7 @@ Motor st4vt $motor_driver_type [params \
stepsPerX 25000\ stepsPerX 25000\
absEnc 1\ absEnc 1\
absEncHome $st4vt_home\ absEncHome $st4vt_home\
cntsPerX -8192] cntsPerX 8192]
st4vt part slits.$slit4VGroup st4vt part slits.$slit4VGroup
st4vt long_name st4vt st4vt long_name st4vt
st4vt softlowerlim 0 st4vt softlowerlim 0
@@ -527,7 +528,7 @@ Motor dz $motor_driver_type [params \
cntsPerX [expr -8192.0/5.0]] cntsPerX [expr -8192.0/5.0]]
dz part detector dz part detector
dz long_name vertical_translation dz long_name vertical_translation
dz softlowerlim 0 dz softlowerlim 1
dz softupperlim 1351 dz softupperlim 1351
dz home 0 dz home 0
dz speed 2 dz speed 2

View File

@@ -53,9 +53,9 @@ sample_distance 5129
sample_base 50 sample_base 50
slit3_distance 4808 slit3_distance 4808
slit3_base 20 slit3_base 20
guide1_distance 2979 guide1_distance 2900.4 ;# distance measured to axis of rotation
guide1_base guide1_base
guide2_distance 3279 guide2_distance 3200 ;# distance measured to midpoint of the 2nd compound mirror (i.e. closest to the sample)
guide2_base guide2_base
slit2_distance 1895 slit2_distance 1895
slit2_base 20 slit2_base 20

View File

@@ -58,8 +58,8 @@ proc ::histogram_memory::isc_initialize {} {
OAT_TABLE -init OAT_TABLE -init
FAT_TABLE -init FAT_TABLE -init
detector_active_height_mm 280 detector_active_height_mm 300
detector_active_width_mm 280 detector_active_width_mm 300
::histogram_memory::ic_initialize ::histogram_memory::ic_initialize

View File

@@ -0,0 +1,79 @@
# This must be loaded by motor_configuration.tcl
#
# Home value for Eulerian cradle
#
#
set eom_Home 23329261
set ephi_Home 6647676
set echi_Home 8919319
# Sample Tilt 1, euler omega stage -> exchange with ssw further down
Motor eom $motor_driver_type [params \
asyncqueue mc4\
axis F\
units degrees\
hardlowerlim -390\
hardupperlim 390\
maxSpeed 1\
maxAccel 1\
maxDecel 1\
stepsPerX -25000\
absEnc 1\
absEncHome $eom_Home\
cntsPerX 8192]
setHomeandRange -motor eom -home 0 -lowrange -390 -uprange 390
eom speed 1
eom movecount $move_count
eom precision 0.01
eom part sample
eom long_name eom
# Sample Tilt 2, euler chi stage -> EC1
Motor echi $motor_driver_type [params \
asyncqueue mc2\
axis G\
units degrees\
hardlowerlim -10\
hardupperlim 95\
maxSpeed 3\
maxAccel 1\
maxDecel 1\
stepsPerX -25000\
absEnc 1\
absEncHome $echi_Home\
cntsPerX 8192]
setHomeandRange -motor echi -home 0 -lowrange 10 -uprange 95
echi softlowerlim -10
echi softupperlim 90
echi home 0
echi speed 3
echi movecount $move_count
echi precision 0.01
echi part sample
echi long_name echi
# Sample Tilt 2, euler phi stage -> EC2
Motor ephi $motor_driver_type [params \
asyncqueue mc4\
axis G\
units degrees\
hardlowerlim -400\
hardupperlim 400\
maxSpeed 3\
maxAccel 1\
maxDecel 1\
stepsPerX [expr -25000.0/2.0]\
absEnc 1\
absEncHome $ephi_Home\
cntsPerX [expr -8192.0/2.0]]
setHomeandRange -motor ephi -home 0 -lowrange 400 -uprange 400
ephi softlowerlim -400
ephi softupperlim 400
ephi home 0
ephi speed 3
ephi movecount $move_count
ephi precision 0.01
ephi part sample
ephi long_name ephi

View File

@@ -5,6 +5,10 @@
# START MOTOR CONFIGURATION # START MOTOR CONFIGURATION
##########################################
# Set this to 1 to use the eulerian cradle
set use_euler 0
set animal kowari set animal kowari
set sim_mode [SplitReply [motor_simulation]] set sim_mode [SplitReply [motor_simulation]]
@@ -45,7 +49,8 @@ set mom_Home 28473827
set mtth_Home 11701800 set mtth_Home 11701800
#set sz_home 2147458067 #set sz_home 2147458067
#set sz_home 2147457556 #set sz_home 2147457556
set sz_home 2147457295 #set sz_home 2147457295
set sz_home 2147456656
# #
# set sx_Home 8405693 # set sx_Home 8405693
@@ -56,7 +61,13 @@ set sz_home 2147457295
# #
#set sx_Home 9065892 #set sx_Home 9065892
#set sx_Home 9067806 #set sx_Home 9067806
set sx_Home 9077566 #set sx_Home 9077566
#
# set new value after repoistioning of encoders after cable chain installation
# set sx_Home 9044450
set sx_Home 9041997
#set sy_Home 7230717 #set sy_Home 7230717
# set value from 7223739 to 7224686 after cor 5.12.07 # set value from 7223739 to 7224686 after cor 5.12.07
@@ -64,10 +75,20 @@ set sx_Home 9077566
#set sy_Home 7224686 #set sy_Home 7224686
#set sy_Home 18597074 #set sy_Home 18597074
#set sy_Home 18782188 #set sy_Home 18782188
set sy_Home 18773863 #set sy_Home 18773863
# set new value after repoistioning of encoders after cable chain installation
# set sy_Home 18785483
set sy_Home 18784175
# swapped sx with sy after rotation of vertical stage
set sx_pitch 4.9995324
set sy_pitch 5.0
#set som_Home 23164850 #set som_Home 23164850
set som_Home 25063452 #set som_Home 25063452
# changed from 25063452 to 25137535 on 20.11.2008
# changed from 25137535 to 25153657 on 31.03.2009
set som_Home 25153657
#set stth_Home 28686300 #set stth_Home 28686300
#set stth_Home 29446192 #set stth_Home 29446192
@@ -82,12 +103,11 @@ set psho_home 7576691
#set psp_home 2040518 #set psp_home 2040518
#set psp_home 3479157 #set psp_home 3479157
#set psp_home 3783500 #set psp_home 3783500
#
#set psp_home 3679100 #set psp_home 3679100
#
# set home value to be equal to front limit switch 03.06.2008 # set home value to be equal to front limit switch 03.06.2008
#
set psp_home 3977689 set psp_home 3977689
# set home value to be equal to front limit switch 28.01.2009, corr. to 50 mm distance to the stits front edge
set psp_home 4084134
#set psw_home 2040518 #set psw_home 2040518
set psw_home 7784698 set psw_home 7784698
@@ -98,19 +118,16 @@ set ssho_home 6877100
#set ssp_home 2043085 #set ssp_home 2043085
#set ssp_home 8701689 #set ssp_home 8701689
set ssp_home 8701400 set ssp_home 8701400
#set ssw_home 2043085
set ssw_home 8215625
set move_count 10 set move_count 10
############################################
# # SWAP BETWEEN EULER AND SSW CONFIGURATIONS
# Home value for Eulerian cradle if $use_euler {
# fileeval $cfPath(motors)/euler_configuration.tcl
# } else {
set ephi_Home 6647676 fileeval $cfPath(motors)/secondary_slit_configuration.tcl
set echi_Home 8919319 }
############################ ############################
# Motor Controller 1 # Motor Controller 1
@@ -301,12 +318,13 @@ Motor sz $motor_driver_type [params \
maxSpeed 2\ maxSpeed 2\
maxAccel 1\ maxAccel 1\
maxDecel 1\ maxDecel 1\
stepsPerX [expr -25000.0*(24.0/25.0)*50/10.840/1.0]\ stepsPerX [expr -25000.0*(24.0/25.0)*50/10.840/1.8]\
absenc 1\ absenc 1\
absenchome $sz_home\ absenchome $sz_home\
cntsPerX -[expr (1<<15)/260.165]] cntsPerX -[expr (1<<15)/260.165]]
setHomeandRange -motor sz -home 0 -lowrange 0 -uprange 350 setHomeandRange -motor sz -home 0 -lowrange 0 -uprange 350
sz speed 2 sz speed 1
sz softupperlim 600
sz part sample sz part sample
sz backlash_offset -1 sz backlash_offset -1
sz blockage_ratio 5 sz blockage_ratio 5
@@ -362,7 +380,7 @@ sz creep_offset 0.1
sz long_name sz sz long_name sz
} }
# Sample Trans 1, upper, x # Sample Trans 1, lower, x
# #
# values for pitch of screw changed from 5 # values for pitch of screw changed from 5
# to 4.994810 (vll 16.11.2007) # to 4.994810 (vll 16.11.2007)
@@ -371,7 +389,6 @@ sz long_name sz
# to 4.997291 (v14 05.12.2007) after realignement of x and y table # to 4.997291 (v14 05.12.2007) after realignement of x and y table
# to 4.99841687 (oki 06.12.2007) after bearing adjustment on x table # to 4.99841687 (oki 06.12.2007) after bearing adjustment on x table
# to 5.0 09.01.2008 # to 5.0 09.01.2008
set sx_pitch 5.0
Motor sx $motor_driver_type [params \ Motor sx $motor_driver_type [params \
asyncqueue mc2\ asyncqueue mc2\
axis C\ axis C\
@@ -381,10 +398,10 @@ Motor sx $motor_driver_type [params \
maxSpeed 10\ maxSpeed 10\
maxAccel 1\ maxAccel 1\
maxDecel 1\ maxDecel 1\
stepsPerX [expr -2.0*25000.0/$sx_pitch]\ stepsPerX [expr 2.0*25000.0/$sx_pitch]\
absEnc 1\ absEnc 1\
absEncHome $sx_Home\ absEncHome $sx_Home\
cntsPerX [expr 8192.0/$sx_pitch]] cntsPerX [expr -8192.0/$sx_pitch]]
setHomeandRange -motor sx -home 0 -lowrange 250 -uprange 250 setHomeandRange -motor sx -home 0 -lowrange 250 -uprange 250
sx speed 5 sx speed 5
sx accel 1.0 sx accel 1.0
@@ -393,10 +410,10 @@ sx movecount $move_count
sx precision 0.01 sx precision 0.01
sx part sample sx part sample
sx long_name sx sx long_name sx
sx backlash_offset -5 sx backlash_offset -1
sx creep_offset 0.5 sx creep_offset 0.5
# Sample Trans2, lower, y # Sample Trans2, upper, y
# #
# values for pitch of screw changed from 5 # values for pitch of screw changed from 5
# to 4.9976934 (oki 19.11.2007) # to 4.9976934 (oki 19.11.2007)
@@ -411,7 +428,7 @@ sx creep_offset 0.5
# #
# change hw limits temporarily from -250...250 to -215...285, 4.1.2007 # change hw limits temporarily from -250...250 to -215...285, 4.1.2007
# #
set sy_pitch 4.9995324
Motor sy $motor_driver_type [params \ Motor sy $motor_driver_type [params \
asyncqueue mc2\ asyncqueue mc2\
axis D\ axis D\
@@ -433,7 +450,7 @@ sy movecount $move_count
sy precision 0.01 sy precision 0.01
sy part sample sy part sample
sy long_name sy sy long_name sy
sy backlash_offset -5 sy backlash_offset -1
sy creep_offset 0.5 sy creep_offset 0.5
# Sample Omega, rotate # Sample Omega, rotate
@@ -443,7 +460,7 @@ Motor som $motor_driver_type [params \
units degrees\ units degrees\
hardlowerlim -180\ hardlowerlim -180\
hardupperlim 180\ hardupperlim 180\
maxSpeed 2\ maxSpeed 3\
maxAccel 5\ maxAccel 5\
maxDecel 5\ maxDecel 5\
stepsPerX [expr 25000.0*(383.0/360.0)]\ stepsPerX [expr 25000.0*(383.0/360.0)]\
@@ -451,8 +468,8 @@ Motor som $motor_driver_type [params \
absEncHome $som_Home\ absEncHome $som_Home\
cntsPerX [expr -8192.0*(383.0/360.0)]] cntsPerX [expr -8192.0*(383.0/360.0)]]
setHomeandRange -motor som -home 0 -lowrange 180 -uprange 180 setHomeandRange -motor som -home 0 -lowrange 180 -uprange 180
som backlash_offset 0.5 som Backlash_offset -0.5
som speed 1 som speed 2
som accel 0.1 som accel 0.1
som decel 0.1 som decel 0.1
som precision 0.01 som precision 0.01
@@ -473,9 +490,9 @@ Motor stth $motor_driver_type [params \
absEnc 1\ absEnc 1\
absEncHome $stth_Home\ absEncHome $stth_Home\
cntsPerX [expr -8192.0/$stth_pitch]] cntsPerX [expr -8192.0/$stth_pitch]]
stth softlowerlim 0 stth softlowerlim 40
stth softupperlim 120 stth softupperlim 119.6
stth home 40 stth home 0
stth speed 0.2 stth speed 0.2
stth motOffDelay 15000 stth motOffDelay 15000
stth movecount $move_count stth movecount $move_count
@@ -545,32 +562,6 @@ mf2 part monochromator.focus
mf2 long_name mf2 mf2 long_name mf2
mf2 creep_offset 1 mf2 creep_offset 1
## Eulerian-chi
#Motor echi $motor_driver_type [params \
# asyncqueue mc3\
# axis G\
# units degrees\
# maxSpeed 1\
# maxAccel 1\
# maxDecel 1\
# stepsPerX 25000]
#setHomeandRange -motor echi -home 0 -lowrange 0 -uprange 360
#echi speed 1
#echi precision 0.01
## Eulerian-phi
#Motor ephi $motor_driver_type [params \
# asyncqueue mc3\
# axis H\
# units degrees\
# maxSpeed 1\
# maxAccel 1\
# maxDecel 1\
# stepsPerX 25000]
#setHomeandRange -motor ephi -home 0 -lowrange 0 -uprange 360
#ephi speed 1
#ephi precision 0.01
############################ ############################
# Motor Controller 4 # Motor Controller 4
# Motor Controller 4 # Motor Controller 4
@@ -641,79 +632,6 @@ setHomeandRange -motor psw -home 0 -lowrange 0 -uprange 30
#-------------------------------------------------------- #--------------------------------------------------------
# Sample Tilt 1, euler omega stage
#Motor eom $motor_driver_type [params \
# asyncqueue mc2\
# axis A\
# units degrees\
# hardlowerlim -35\
# hardupperlim 55\
# maxSpeed 1\
# maxAccel 1\
# maxDecel 1\
# stepsPerX 25000\
# absEnc 1\
# absEncHome $eom_Home\
# cntsPerX -8192]
#setHomeandRange -motor eom -home 0 -lowrange 35 -uprange 55
#eom speed 1
#eom movecount $move_count
#eom precision 0.01
#eom part sample
#eom long_name eom
# Sample Tilt 2, euler chi stage
#Motor echi $motor_driver_type [params \
# asyncqueue mc4\
# axis D\
# units degrees\
# hardlowerlim -10\
# hardupperlim 95\
# maxSpeed 3\
# maxAccel 1\
# maxDecel 1\
# stepsPerX -25000\
# absEnc 1\
# absEncHome $echi_Home\
# cntsPerX 8192]
#setHomeandRange -motor echi -home 0 -lowrange 10 -uprange 95
#echi softlowerlim -10
#echi softupperlim 90
#echi home 0
#echi speed 3
#echi movecount $move_count
#echi precision 0.01
#echi part sample
#echi long_name echi
# Sample Tilt 2, euler phi stage
#Motor ephi $motor_driver_type [params \
# asyncqueue mc4\
# axis E\
# units degrees\
# hardlowerlim -400\
# hardupperlim 400\
# maxSpeed 3\
# maxAccel 1\
# maxDecel 1\
# stepsPerX [expr -25000.0/2.0]\
# absEnc 1\
# absEncHome $ephi_Home\
# cntsPerX [expr -8192.0/2.0]]
#setHomeandRange -motor ephi -home 0 -lowrange 400 -uprange 400
#ephi softlowerlim -400
#ephi softupperlim 400
#ephi home 0
#ehpi speed 3
#ephi movecount $move_count
#ephi precision 0.01
#ephi part sample
#ephi long_name ephi
# Secondary Slit, horizontal offset # Secondary Slit, horizontal offset
Motor ssho $motor_driver_type [params \ Motor ssho $motor_driver_type [params \
asyncqueue mc4\ asyncqueue mc4\
@@ -754,27 +672,7 @@ ssp part slits.secondary
ssp long_name ssp ssp long_name ssp
setHomeandRange -motor ssp -home 0 -lowrange 0 -uprange 150 setHomeandRange -motor ssp -home 0 -lowrange 0 -uprange 150
# Secondary Slit, width # Primary Slit, height, 0-30mm
Motor ssw $motor_driver_type [params \
asyncqueue mc4\
axis F\
units mm\
hardlowerlim 0\
hardupperlim 30\
maxSpeed 4\
maxAccel 1\
maxDecel 1\
stepsPerX 25000\
absenc 1\
absenchome $ssw_home\
cntsPerX -8192]
ssw speed 4
ssw Backlash_offset 0.3
ssw part slits.secondary
ssw long_name ssw
setHomeandRange -motor ssw -home 0 -lowrange 0 -uprange 30
## Primary Slit, height, 0-30mm
#Motor psh $motor_driver_type [params \ #Motor psh $motor_driver_type [params \
# asyncqueue mc4\ # asyncqueue mc4\
# axis D\ # axis D\

View File

@@ -0,0 +1,22 @@
#set ssw_home 2043085
set ssw_home 8215625
# Secondary Slit, width
Motor ssw $motor_driver_type [params \
asyncqueue mc4\
axis F\
units mm\
hardlowerlim 0\
hardupperlim 30\
maxSpeed 4\
maxAccel 1\
maxDecel 1\
stepsPerX 25000\
absenc 1\
absenchome $ssw_home\
cntsPerX -8192]
ssw speed 4
ssw Backlash_offset 0.3
ssw part slits.secondary
ssw long_name ssw
setHomeandRange -motor ssw -home 0 -lowrange 0 -uprange 30