temporary addition of separate sample Z motors

r2598 | dcl | 2008-05-29 14:56:27 +1000 (Thu, 29 May 2008) | 2 lines
This commit is contained in:
Douglas Clowes
2008-05-29 14:56:27 +10:00
parent be033cddcd
commit 4b81f0836b

View File

@ -0,0 +1,75 @@
sz fixed 1
sz send GRB=0
Motor sz1 $motor_driver_type [params \
asyncqueue mc2\
axis A\
units mm\
hardlowerlim 0\
hardupperlim 750\
maxSpeed 5\
maxAccel 1\
maxDecel 1\
stepsPerX [expr -25000.0*(24.0/25.0)*50/11.0]\
absenc 1\
absenchome $sz_home\
cntsPerX -[expr (1<<15)/260.09]]
setHomeandRange -motor sz1 -home 0 -lowrange 0 -uprange 750
sz1 speed 5
sz1 part sample
sz1 backlash_offset -1
sz1 blockage_ratio 5
sz1 precision 0.025
sz1 creep_offset 0.1
sz1 creep_precision 0.01
sz1 long_name translate_z1
Motor sz2 $motor_driver_type [params \
asyncqueue mc2\
axis B\
encoderAxis A\
units mm\
hardlowerlim 0\
hardupperlim 750\
maxSpeed 5\
maxAccel 1\
maxDecel 1\
stepsPerX [expr -25000.0*(24.0/25.0)*50/11.0]\
absenc 1\
absenchome $sz_home\
cntsPerX -[expr (1<<15)/260.09]]
setHomeandRange -motor sz2 -home 0 -lowrange 0 -uprange 750
sz2 speed 5
sz2 part sample
sz2 backlash_offset -1
sz2 blockage_ratio 5
sz2 precision 0.025
sz2 creep_offset 0.1
sz2 creep_precision 0.01
sz2 long_name translate_z2
fileeval vmotors.tcl
proc home_z {} {
sz send GRB=0
sz1 send sh`
sz2 send sh`
sz1 send jg`=-25000
sz2 send jg`=-25000
sz1 send bg`
sz2 send bg`
set running 1
while { $running > 0 } {
set running 0
set line [sz1 send MG _bg`]
set line [string trimright $line ":"]
set sw [expr int([string trimleft $line " 0"])]
if { $sw > 0 } { set running 1 }
set line [sz2 send MG _bg`]
set line [string trimright $line ":"]
set sw [expr int([string trimleft $line " 0"])]
if { $sw > 0 } { set running 1 }
}
sz1 send mo`
sz2 send mo`
}