hipd/config/commands/commands.tcl Added some of the procedures in extraconfig.tcl as "commands" motors/sct_jogmotor_common.tcl Added stop command. Send SH, JG and BG commands on one line when jogging motor. fakeDMC dmc2280Server.tcl mkSimAxes.tcl simAxis.tcl Added jog command. exebuf.c Batch file executor now sends a BATCHEND event when there is an AbortBatch interrupt. This means we can now execute cleanup comands when a batch file terminates. r2764 | ffr | 2009-01-23 16:06:03 +1100 (Fri, 23 Jan 2009) | 17 lines
121 lines
2.1 KiB
Tcl
121 lines
2.1 KiB
Tcl
source $cfPath(commands)/commands_common.tcl
|
|
|
|
namespace eval motor {
|
|
# is_homing_list = comma separated list of motors which are safe to send "home"
|
|
variable is_homing_list ""
|
|
}
|
|
|
|
namespace eval ajscmds {
|
|
# SetRadColl
|
|
command SetRadColl {
|
|
float time
|
|
float range
|
|
} {
|
|
|
|
set spd [expr 2.0*$range / $time]
|
|
oct softlowerlim [expr -abs($range/2.0) - 0.5]
|
|
oct softupperlim [expr abs($range/2.0) + 0.5]
|
|
oct maxretry 5
|
|
oct accel 0.25
|
|
oct speed 0.25
|
|
drive oct [expr abs($range/2.0)]
|
|
oct speed $spd
|
|
oct accel $spd
|
|
oct maxretry 0
|
|
}
|
|
# SimpleRun
|
|
command SimpleRun {
|
|
float=0:inf steptime
|
|
int=1:inf numsteps
|
|
} {
|
|
|
|
RadCollOff
|
|
histmem mode time
|
|
histmem preset $steptime
|
|
newfile HISTOGRAM_XY
|
|
for {set i 0} {$i < $numsteps} {incr i} {
|
|
histmem start block
|
|
save $i
|
|
}
|
|
}
|
|
# SimpleScan
|
|
command SimpleScan {
|
|
text=drivable motor
|
|
float start
|
|
float step
|
|
int=1:inf numsteps
|
|
float=0:inf steptime
|
|
} {
|
|
|
|
RadCollOff
|
|
histmem mode time
|
|
histmem preset $steptime
|
|
newfile HISTOGRAM_XY
|
|
for {set i 0} {$i < $numsteps} {incr i} {
|
|
drive $motor [expr $i*$step+$start]
|
|
histmem start block
|
|
save $i
|
|
}
|
|
}
|
|
# RadCollRun
|
|
command RadCollRun {
|
|
int=1:inf oscno
|
|
int=1:inf reps
|
|
} {
|
|
|
|
RadCollOn $oscno
|
|
histmem mode unlimited
|
|
newfile HISTOGRAM_XY
|
|
for {set i 0} {$i < $reps} {incr i} {
|
|
histmem start block
|
|
save $i
|
|
}
|
|
RadCollOff
|
|
}
|
|
# RadCollTimed
|
|
command RadCollTimed {
|
|
int=1:inf oscno
|
|
float=0:inf time
|
|
} {
|
|
|
|
RadCollOn $oscno
|
|
set tim1 [clock seconds]
|
|
histmem mode unlimited
|
|
newfile HISTOGRAM_XY
|
|
set bool 0
|
|
set i 0
|
|
set timsecs [expr $time*60]
|
|
while {$bool == 0} {
|
|
histmem start block
|
|
save $i
|
|
incr i
|
|
set tim2 [expr [clock seconds] - $tim1]
|
|
if {$tim2 > $timsecs} {set bool 1}
|
|
}
|
|
RadCollOff
|
|
}
|
|
# RadCollScan
|
|
command RadCollScan {
|
|
text=drivable motor
|
|
float start
|
|
float step
|
|
int=1:inf numsteps
|
|
int=1:inf oscno
|
|
} {
|
|
|
|
RadCollOn $oscno
|
|
histmem mode unlimited
|
|
newfile HISTOGRAM_XY
|
|
for {set i 0} {$i < $numsteps} {incr i} {
|
|
drive $motor [expr $i*$step+$start]
|
|
histmem start block
|
|
save $i
|
|
}
|
|
RadCollOff
|
|
}
|
|
}
|
|
|
|
proc ::commands::isc_initialize {} {
|
|
::commands::ic_initialize
|
|
}
|