Merging release 2.0 branch with CVS trunk
r2601 | ffr | 2008-05-30 10:26:57 +1000 (Fri, 30 May 2008) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4a937e1608
commit
0749b0effa
@@ -1,7 +1,7 @@
|
||||
# $Revision: 1.7 $
|
||||
# $Date: 2008-05-12 01:08:15 $
|
||||
# $Revision: 1.8 $
|
||||
# $Date: 2008-05-30 00:26:54 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: dcl $
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
# Requires a configuration array for each axis that you want to simulate.
|
||||
# eg
|
||||
@@ -87,7 +87,9 @@ proc BG {_axis} {
|
||||
proc MG {args} {
|
||||
# Skip formatting
|
||||
if {[string index [lindex $args 0] 0] == "F"} {
|
||||
set msg [lrange $args 1 end]
|
||||
set msg [lrange $args 1 end]
|
||||
} else {
|
||||
set msg $args
|
||||
}
|
||||
# If msg starts with _ then return val for axis
|
||||
if {[string index $msg 0] == "_"} {
|
||||
@@ -111,7 +113,7 @@ proc nextstep {paxis step target} {
|
||||
set axis(TP) [expr int($step * $mult + $axis(TP))];
|
||||
set TD_POS [expr int($axis(TD) + $step)];
|
||||
set axis(TD) [expr int($TD_POS)];
|
||||
if {$axis(ST) == 1 || [expr abs($TD_POS - double($target))] < 0.5} {
|
||||
if {$axis(ST) == 1} {
|
||||
set axis(TS) 44; # Stopped, limit switches open
|
||||
set axis(BG) 0; # motor has stopped
|
||||
set axis(ST) 0; # make sure stop flag is unset
|
||||
|
||||
Reference in New Issue
Block a user