Added params convenience function for the Motor proc

r1279 | ffr | 2006-11-13 10:19:36 +1100 (Mon, 13 Nov 2006) | 2 lines
This commit is contained in:
Ferdi Franceschini
2006-11-13 10:19:36 +11:00
committed by Douglas Clowes
parent 37164369ab
commit ec671134af

View File

@@ -1,13 +1,21 @@
#!/usr/bin/tclsh
# $Revision: 1.2 $
# $Date: 2006-10-15 23:38:34 $
# $Revision: 1.3 $
# $Date: 2006-11-12 23:19:36 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
# Creates fake DMC configuration files based on the instrument
# configuration file.
# Use this to create an array of named parameters to initialise motors.
proc params {args} {
upvar 1 "" x;
if [info exists x] {unset x}
foreach {k v} $args {set x([string tolower $k]) $v}
}
proc usage {} {
puts "mkSimAxes.tcl INSTNAME";
puts "INSTNAME is the instrument name (eg wombat, echidna)"
@@ -80,6 +88,6 @@ proc main {args} {
}
if {$tcl_interactive==0} {
main ${argv}_configuration.tcl;
main motor_configuration.tcl;
}