Why can't I come out of estop? and, parallel port debugger
- Subject: Why can't I come out of estop? and, parallel port debugger
- From: Fred Proctor <proctor-at-cme.nist.gov>
- Date: Fri, 03 Mar 2000 10:02:14 -0500
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- Reply-To: frederick.proctor-at-nist.gov
EMC users,
I had that frustrating "why can't I come out of estop" problem
yesterday, and after I ran through all permutions of
ESTOP_SENSE_POLARITY and ESTOP_WRITE_POLARITY I discovered that I had
the wrong address for the parallel port (I clobbered my .ini file and
had to redo it from scratch). In doing this I rediscovered just how many
things affect estop. Aside from stupid things like wrong parallel port
or motion board addresses, they are:
input from amp fault
input from positive hardware limit switch
input from negative hardware limit switch
positive software limit
negative software limit
input from estop sense
Only the pos/neg hard/soft limits turn the position digits red. Amp
fault never shows up anywhere, so if you have this set wrong in your
.ini file, you'll never know it.
The tcl interface to the EMC (emc/src/emctask/emcsh.cc) has a status
command, "emc_joint_limit", that returns "ok", "minsoft", "minhard",
"maxsoft", or "maxhard". Currently the digits are colored red only when
it's not "ok". It would be better if there were some indication of what
wasn't "ok". On the fossilized terminal-graphics GUI "keystick", the
axis labels were bracketed by characters, like this:
-*X-- --Y*- --Z**
where "*" meant "limit exceeded," and the characters indicated
negative-hard, negative-soft, axis, positive-soft, positive-hard. In the
above example, X is at a negative soft limit, Y is at a positive soft
limit, and Z is at both positive soft and hard limits.
On the TkEMC it could be done similarly.
Anyone on the GUI committee want to try this? You simply need to use the
"minsoft", etc. values explicitly to get the status.
Amp fault is not part of the emcsh.cc Tcl interface to the EMC. I will
add this.
Regarding estop sense, the "ESTOP" label will still show "ESTOP" when
you release the physical estop, since the controller has to acknowledge
this. It would be nice if there were a label or light or something that
showed the raw estop sense value directly. Then, when you reset the
estop (pulled up on the estop button), the "ESTOP" label would still
show "ESTOP", but the raw label or light would show that the button was
released. This would be nice for debugging.
Right now the raw estop isn't part of the status anywhere: not in NML,
not in the Tcl interface. I will add this.
Regarding parallel port debugging, there is a text-based utility for
this in the EMC distribution, called "testppt". It's compiled from
emc/src/emcnml/parport.c, when MAIN is defined. Use it like this:
testppt -addr 0x378
Then type:
help/? print this help
s <#> set bit #
c <#> clear bit #
k check outputs
ENTER print inputs
q quit
I also wrote a little Tk script that uses iosh to pop up green or red
circles for the inputs. It's not in the EMC distribution yet, but it's
appended here.
--Fred
---------------ioshow.tcl-------------
#!/bin/sh
# the next line restarts using iosh \
exec /usr/local/nist/emc/plat/linux_2_0_36/bin/iosh "$0" "$-at-"
# creates a canvas of 12 dots for output, 5 dots for input, lit green
and red
set c [canvas .canvas]
pack $c
for {set i 0} {$i < 12} {incr i 1} {
$c create oval 5 [expr $i * 15 + 5] 15 [expr $i * 15 + 15] -fill
green
}
for {set i 0} {$i < 5} {incr i 1} {
$c create oval 45 [expr $i * 15 + 5] 55 [expr $i * 15 + 15] -fill
green
}
for {set i 0} {$i < 12} {incr i 1} {
$c create text 25 [expr $i * 15 + 10] -text $i
}
for {set i 0} {$i < 5} {incr i 1} {
$c create text 65 [expr $i * 15 + 10] -text $i
}
# 'update' updates the dynamic value repeatedly
proc update {} {
global c
set value1 [inb 0x378]
set value2 [inb 0x37A]
set value3 [inb 0x379]
set value3 [expr $value3 >> 3]
for {set i 1} {$i <= 8} {incr i 1} {
if {$value1 % 2} {
$c itemconfigure $i -fill red
} else {
$c itemconfigure $i -fill green
}
set value1 [expr $value1 / 2]
}
for {set i 9} {$i <= 12} {incr i 1} {
if {$value2 % 2} {
$c itemconfigure $i -fill red
} else {
$c itemconfigure $i -fill green
}
set value2 [expr $value2 / 2]
}
for {set i 13} {$i <= 17} {incr i 1} {
if {$value3 % 2} {
$c itemconfigure $i -fill red
} else {
$c itemconfigure $i -fill green
}
set value3 [expr $value3 / 2]
}
# schedule this again
after 100 update
}
# start it
update
--------------cut here--------------
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact