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:
committed by
Douglas Clowes
parent
37164369ab
commit
ec671134af
@@ -1,13 +1,21 @@
|
|||||||
#!/usr/bin/tclsh
|
#!/usr/bin/tclsh
|
||||||
|
|
||||||
# $Revision: 1.2 $
|
# $Revision: 1.3 $
|
||||||
# $Date: 2006-10-15 23:38:34 $
|
# $Date: 2006-11-12 23:19:36 $
|
||||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||||
# Last revision by: $Author: ffr $
|
# Last revision by: $Author: ffr $
|
||||||
|
|
||||||
# Creates fake DMC configuration files based on the instrument
|
# Creates fake DMC configuration files based on the instrument
|
||||||
# configuration file.
|
# 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 {} {
|
proc usage {} {
|
||||||
puts "mkSimAxes.tcl INSTNAME";
|
puts "mkSimAxes.tcl INSTNAME";
|
||||||
puts "INSTNAME is the instrument name (eg wombat, echidna)"
|
puts "INSTNAME is the instrument name (eg wombat, echidna)"
|
||||||
@@ -80,6 +88,6 @@ proc main {args} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {$tcl_interactive==0} {
|
if {$tcl_interactive==0} {
|
||||||
main ${argv}_configuration.tcl;
|
main motor_configuration.tcl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user