34 lines
981 B
Tcl
Executable File
34 lines
981 B
Tcl
Executable File
#!/usr/bin/tclsh
|
|
array set args $argv
|
|
|
|
puts "# !!- AUTOGENERATED FROM $args(-f) -!!"
|
|
puts "# !!- DO NOT MODIFY -!!"
|
|
puts "# [clock format [clock seconds] -format %c]\n"
|
|
|
|
# Use 'unknown' to suppress commands which refer to ansto specfic
|
|
# motor parameters.
|
|
proc unknown {args} {
|
|
set param [lindex $args 1];
|
|
set nonsim_motpars [list speed home hardlowerlim hardupperlim accel decel maxSpeed minSpeed maxAccel minDecel blockage_check_interval]
|
|
if { [ lsearch -exact $nonsim_motpars $param ] == -1 } {
|
|
puts $args;
|
|
}
|
|
}
|
|
source ../util/utility.tcl
|
|
|
|
# Duplicate any proc definitions
|
|
proc my_proc {args} {puts "proc $args"}
|
|
|
|
# Generate a SIM motor definition a DMC2280 motor definition.
|
|
proc Motor {name type par} {
|
|
global motors
|
|
upvar #0 $par arr
|
|
upvar #0 $name param_arr
|
|
array set param_arr [array get arr]
|
|
lappend motors $name
|
|
puts "Motor $name SIM $param_arr(hardlowerlim) $param_arr(hardupperlim) -1.0"
|
|
}
|
|
rename proc _proc_
|
|
rename my_proc proc
|
|
source $args(-f)
|