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
This commit is contained in:
Ferdi Franceschini
2009-01-23 16:06:03 +11:00
committed by Douglas Clowes
parent fb817f2aa8
commit b134c901c5
6 changed files with 251 additions and 63 deletions

View File

@@ -58,16 +58,18 @@ namespace eval ::scobj::jogmotor {
set cmd DOWN
set dirn -1
}
"stop" {
$sct_controller send "ST${axis}"
return getACK
}
default {
set cmd UNKNOWN
}
}]
if {$cmd != "UNKNOWN"} {
set jogspeed [expr $dirn * [hval [hsibPath "speed"] ]]
$sct_controller send "JG${axis}=$jogspeed"
$sct_controller send "SH${axis}"
sct send "BG${axis}"
# set jogspeed [expr $dirn * [hval [hsibPath "speed"] ]]
set jogspeed [expr $dirn * [sct jogspeed]]
$sct_controller send "ST${axis};JG${axis}=$jogspeed;SH${axis};BG${axis}"
return getACK
} else {
return idle
@@ -125,7 +127,7 @@ proc updatestatus {} {
# middle n2 "inbetween"
# lower n3 "down"
#}
proc mk_sct_jogmotor {sct_controller axis jogmotor {initcmd_table {UP "up" DOWN "down"}}} {
proc mk_sct_jogmotor {sct_controller axis jogmotor jogspeed {initcmd_table {UP "up" DOWN "down"}}} {
variable cmd_table
foreach {cmd name} $initcmd_table {
set cmd_table($cmd) [string tolower $name]
@@ -145,6 +147,7 @@ proc updatestatus {} {
hfactory $jog_hpath/command plain user text
hsetprop $jog_hpath/command write ${ns}::jogCmd $sct_controller $axis
hsetprop $jog_hpath/command getACK ${ns}::getACK $sct_controller
hsetprop $jog_hpath/command jogspeed $jogspeed
hfactory $jog_hpath/status plain spy text
hsetprop $jog_hpath/status read ${ns}::status $axis