Use the 'oscillate' subcommand on oct instead of oscmd

This commit is contained in:
Ferdi Franceschini
2014-07-01 13:44:11 +10:00
parent 132af9d225
commit d9255be951

View File

@@ -14,9 +14,13 @@ float time
float range float range
} { } {
catch { catch {
#ffr Changed 0.5 to 0.2 on 30/06/2014 because
# oct hits upper limit switch at about 1.27 degrees
# with new "oct oscillate" command.
oct oscillate_low [expr -abs($range/2.0) - 0.2]
oct oscillate_high [expr abs($range/2.0) + 0.2]
set spd [expr 2.0*$range / $time] set spd [expr 2.0*$range / $time]
oct softlowerlim [expr -abs($range/2.0) - 0.5]
oct softupperlim [expr abs($range/2.0) + 0.5]
oct maxretry 5 oct maxretry 5
oct accel 0.25 oct accel 0.25
oct speed 0.25 oct speed 0.25
@@ -73,11 +77,11 @@ int=1:inf reps
histmem mode unlimited histmem mode unlimited
newfile HISTOGRAM_XY newfile HISTOGRAM_XY
for {set i 0} {$i < $reps} {incr i} { for {set i 0} {$i < $reps} {incr i} {
oscmd start $oscno oct oscillate_count $oscno
oct oscillate start
hmm countblock hmm countblock
save $i save $i
} }
oscmd stop
# RadCollOff # RadCollOff
} }
# RadCollTimed # RadCollTimed
@@ -116,12 +120,12 @@ int=1:inf oscno
newfile HISTOGRAM_XY newfile HISTOGRAM_XY
for {set i 0} {$i < $numsteps} {incr i} { for {set i 0} {$i < $numsteps} {incr i} {
drive $motor [expr $i*$step+$start] drive $motor [expr $i*$step+$start]
oscmd start $oscno oct oscillate_count $oscno
oct oscillate start
hmm countblock hmm countblock
save $i save $i
} }
# RadCollOff # RadCollOff
oscmd stop
} }
} }
namespace import ::ajscmds::* namespace import ::ajscmds::*