Make sample stages configurable and add Oxford magnet sample stick motor as an option.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
set magmot "som"
|
||||
Motor $magmot $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
axis D\
|
||||
asyncqueue $magmot_aq\
|
||||
axis $magmot_axis\
|
||||
units degrees\
|
||||
hardlowerlim -1440\
|
||||
hardupperlim 1440\
|
@ -143,7 +143,10 @@ switch $axis_config {
|
||||
3 {
|
||||
# Rename the sample stage som to somss because
|
||||
# som now controls the magnet sample stick
|
||||
set sample_stage_rotate "somss"
|
||||
set sample_stage_rotate "som"
|
||||
set magmot "msom"
|
||||
set magmot_aq "mc2"
|
||||
set magmot_axis "D"
|
||||
fileeval $cfPath(motors)/magnet_configuration.tcl
|
||||
}
|
||||
}
|
||||
|
@ -134,9 +134,10 @@ switch $axis_config {
|
||||
fileeval $cfPath(motors)/small_omega_config.tcl
|
||||
}
|
||||
3 {
|
||||
# Rename the sample stage som to somss because
|
||||
# som now controls the magnet sample stick
|
||||
set sample_stage_rotate "somss"
|
||||
set sample_stage_rotate "som"
|
||||
set magmot "msom"
|
||||
set magmot_aq "mc2"
|
||||
set magmot_axis "D"
|
||||
fileeval $cfPath(motors)/magnet_configuration.tcl
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,91 @@
|
||||
# This must be loaded by motor_configuration.tcl
|
||||
|
||||
set sphi_Home 7937974
|
||||
set schi_Home 7585956
|
||||
set sy_Home 7557524
|
||||
set sx_Home 7557304
|
||||
|
||||
# Sample Tilt 1, upper, phi
|
||||
Motor sphi $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
axis A\
|
||||
units degrees\
|
||||
hardlowerlim -360\
|
||||
hardupperlim 360\
|
||||
maxSpeed 3\
|
||||
maxAccel 2\
|
||||
maxDecel 2\
|
||||
stepsPerX 25000\
|
||||
absEnc 0\
|
||||
absEncHome $sphi_Home\
|
||||
cntsPerX -8192]
|
||||
setHomeandRange -motor sphi -home 0 -lowrange -360 -uprange 360
|
||||
sphi speed 2
|
||||
sphi movecount $move_count
|
||||
sphi precision 0.02
|
||||
sphi part sample
|
||||
sphi long_name phi
|
||||
|
||||
# Sample Tilt 2, lower, chi
|
||||
Motor schi $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
axis B\
|
||||
units degrees\
|
||||
hardlowerlim 75\
|
||||
hardupperlim 105\
|
||||
maxSpeed 1\
|
||||
maxAccel 1\
|
||||
maxDecel 1\
|
||||
stepsPerX 25000\
|
||||
absEnc 1\
|
||||
absEncHome $schi_Home\
|
||||
cntsPerX 8192]
|
||||
setHomeandRange -motor schi -home 90 -lowrange 15 -uprange 15
|
||||
schi speed 1
|
||||
schi movecount $move_count
|
||||
schi precision 0.01
|
||||
schi part sample
|
||||
schi long_name chi
|
||||
|
||||
# Sample Trans 1, upper, y
|
||||
Motor sy $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
axis C\
|
||||
units mm\
|
||||
hardlowerlim -20\
|
||||
hardupperlim 20\
|
||||
maxSpeed 1\
|
||||
maxAccel 1\
|
||||
maxDecel 1\
|
||||
stepsPerX 25000\
|
||||
absEnc 1\
|
||||
absEncHome $sy_Home\
|
||||
cntsPerX 8192]
|
||||
setHomeandRange -motor sy -home 0 -lowrange 20 -uprange 20
|
||||
sy speed 1
|
||||
sy movecount $move_count
|
||||
sy precision 0.01
|
||||
sy part sample
|
||||
sy long_name translate_y
|
||||
|
||||
# Sample Trans2, lower, x
|
||||
Motor sx $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
axis D\
|
||||
units mm\
|
||||
hardlowerlim -20\
|
||||
hardupperlim 20\
|
||||
maxSpeed 1\
|
||||
maxAccel 1\
|
||||
maxDecel 1\
|
||||
stepsPerX -25000\
|
||||
absEnc 1\
|
||||
absEncHome $sx_Home\
|
||||
cntsPerX -8192]
|
||||
setHomeandRange -motor sx -home 0 -lowrange 20 -uprange 20
|
||||
sx speed 1
|
||||
sx movecount $move_count
|
||||
sx precision 0.01
|
||||
sx part sample
|
||||
sx long_name translate_x
|
||||
|
@ -67,6 +67,40 @@ set gv1_Shut 33221600
|
||||
# hnotify messages to a reasonable level
|
||||
set move_count 100
|
||||
|
||||
# CHOOSE HERE for sample stage configuration
|
||||
##########################################
|
||||
# Set axis_config as follows to use different axis configurations
|
||||
# 0: normal stage configuration
|
||||
# 1: Oxford magnet sample stick
|
||||
set axis_config 0
|
||||
|
||||
if { [ info exists ::config_dict ] } {
|
||||
if { [ dict exists $::config_dict sample_stage implementation ] } {
|
||||
set implementation [ dict get $::config_dict sample_stage implementation ]
|
||||
if {$implementation == "normal_sample_stage"} {
|
||||
set axis_config 0
|
||||
} elseif {$implementation == "12tmagnet_sample_insert"} {
|
||||
set axis_config 1
|
||||
} else {
|
||||
set axis_config 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch $axis_config {
|
||||
0 {
|
||||
set use_normal_config "true"
|
||||
}
|
||||
1 {
|
||||
set magmot "mscor"
|
||||
set magmot_aq "mc2"
|
||||
set magmot_axis "F"
|
||||
set use_normal_config "false"
|
||||
fileeval $cfPath(motors)/magnet_configuration.tcl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
############################
|
||||
# Motor Controller 1
|
||||
# Motor Controller 1
|
||||
@ -381,29 +415,31 @@ gom softlowerlim -15
|
||||
gom softupperlim 15
|
||||
gom home 0
|
||||
|
||||
if {$use_normal_config == "true"} {
|
||||
# mc2: Sample rotation correction - 10 deg rotation
|
||||
set scorStepRate [expr { 25000.0 * 100.0 / 360.0 }]
|
||||
set scorStepRate [expr { 25000.0 * 100.0 / 360.0 }]
|
||||
|
||||
Motor scor $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
host mc2-pelican\
|
||||
port pmc2-pelican\
|
||||
axis F\
|
||||
units degrees\
|
||||
hardlowerlim 0\
|
||||
hardupperlim 360\
|
||||
maxSpeed [expr 25000.0/$scorStepRate]\
|
||||
maxAccel [expr 25000.0/$scorStepRate]\
|
||||
maxDecel [expr 25000.0/$scorStepRate]\
|
||||
stepsPerX $scorStepRate\
|
||||
absEnc 1\
|
||||
absEncHome $scor_Home\
|
||||
cntsPerX -[expr { 8192.0 * 100.0 / 360.0 }]]
|
||||
scor part sample
|
||||
scor long_name scor
|
||||
scor softlowerlim 0
|
||||
scor softupperlim 360
|
||||
scor home 180
|
||||
Motor scor $motor_driver_type [params \
|
||||
asyncqueue mc2\
|
||||
host mc2-pelican\
|
||||
port pmc2-pelican\
|
||||
axis F\
|
||||
units degrees\
|
||||
hardlowerlim 0\
|
||||
hardupperlim 360\
|
||||
maxSpeed [expr 25000.0/$scorStepRate]\
|
||||
maxAccel [expr 25000.0/$scorStepRate]\
|
||||
maxDecel [expr 25000.0/$scorStepRate]\
|
||||
stepsPerX $scorStepRate\
|
||||
absEnc 1\
|
||||
absEncHome $scor_Home\
|
||||
cntsPerX -[expr { 8192.0 * 100.0 / 360.0 }]]
|
||||
scor part sample
|
||||
scor long_name scor
|
||||
scor softlowerlim 0
|
||||
scor softupperlim 360
|
||||
scor home 180
|
||||
}
|
||||
|
||||
############################
|
||||
# Motor Controller 3
|
||||
|
Reference in New Issue
Block a user