Background:
Currently, there's an e-stop switch on the cabinet but it's not actually connected up. It's also nowhere near accessible, least of all if I were shitting myself and needing to shut stuff down toot sweet. Time to do something about that - if commissioning time isn't a time for a functioning e-stop, I don't know when is.
Obvs I have loads of spare inputs left on the 7i76 - I've only used 7 of the available 32 inputs. All that is required is for me to get off my fat arse and wire it up. And figure out how to modify the HAL file to make the correct logical connections.
The preferred arrangement is to have a loop of normally closed e-stop switches holding an input in the high state. That way, if the e-stop switch is opened or if the e-stop loop is damaged open circuit or short to ground, the system will be inhibited. It's not completely failsafe but this gets you a long way towards it.
Not surprisingly, there's a page on the website: the e-stop latch page along with some examples on the forum. Looks pretty simple.
Implementation:
My input #7 (it's the 8th, as numbering starts at zero) is hm2_5i25.0.7i76.0.0.input-07 and in this instance I need to invert it so that it's only active when the input goes low. So I need to use hm2_5i25.0.7i76.0.0.input-07-not which is the inverted version of the signal.
First, some related comments from the documentation page:
# ---digital in / out signals---
# ---estop signals---
# from http://www.linuxcnc.org/docs/html/man/man9/estop_latch.9.html
# iocontrol.0.user-enable-out (Bit, Out) FALSE when an internal estop condition exists
# iocontrol.0.emc-enable-in (Bit, In) Should be driven FALSE when an external estop condition exists.
# iocontrol.0.user-request-enable (Bit, Out) TRUE when the user has requested that estop be cleared
Then make the changes:
# comment out these legacy net connections:
# net estop-out <= iocontrol.0.user-enable-out
# net estop-out => iocontrol.0.emc-enable-in
# ---estop signals---
# config from BigJohn#:
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_5i25.0.7i76.0.0.input-07-not
Finally, actually wire up the damned things and test with HAL meter, then check it actually trips the e-stop in gmoccapy (top right of screen.
This works, so now I have a couple of e-stop switches - one on the cabinet and one on a pendant. That should avoid buttock strain when testing out new moves for real. Good result.
No comments:
Post a Comment