Use lowercase for parameter names.

r1152 | ffr | 2006-10-16 09:37:29 +1000 (Mon, 16 Oct 2006) | 2 lines
This commit is contained in:
Ferdi Franceschini
2006-10-16 09:37:29 +10:00
committed by Douglas Clowes
parent 0587a8695f
commit 509ff8036c

View File

@@ -1,11 +1,11 @@
# $Revision: 1.1 $
# $Date: 2006-10-12 23:06:05 $
# $Revision: 1.2 $
# $Date: 2006-10-15 23:37:29 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
# Requires a configuration array for each axis that you want to simulate.
# eg
#array set B [list AC 25000 TP 7827107 TD 25000 PA 25000 stepsPerX 25000 cntsPerX 8192 DC 25000 SP 25000]
#array set B [list AC 25000 TP 7827107 TD 25000 PA 25000 stepsperx 25000 cntsperx 8192 DC 25000 SP 25000]
# The mkSimAxes.tcl script creates files with arrays like the example above.
# Substitutes position values for _TDx and _TPx
@@ -64,7 +64,7 @@ proc BG {_axis} {
every [expr round($timeStep * 1000)] "nextstep $_axis $step $target"
# set diff [expr $target - $axis(TD)];
# set mult [expr $axis(cntsPerX).0/$axis(stepsPerX)];
# set mult [expr $axis(cntsperx).0/$axis(stepsperx)];
# set axis(TP) [expr round($diff*$mult + $axis(TP))];
# set axis(TD) $target;
}
@@ -89,7 +89,7 @@ proc every {ms body} {
proc nextstep {paxis step target} {
upvar #0 $paxis axis;
set mult [expr $axis(cntsPerX).0/$axis(stepsPerX)];
set mult [expr $axis(cntsperx).0/$axis(stepsperx)];
set axis(TP) [expr $step * $mult + $axis(TP)];
set axis(TD) [expr $axis(TD) + $step];
if {[expr abs($axis(TD) - $target.0)] < 0.5} {