Make sample stages configurable and add Oxford magnet sample stick motor as an option.

This commit is contained in:
Ferdi Franceschini
2014-08-05 13:49:10 +10:00
parent 7b6b11eef2
commit 2c753a3f18
5 changed files with 158 additions and 28 deletions

View File

@@ -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