External E-Stop
# estop
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 <= parport.0.pin-in10-not
The typical estop loopback looks like this so either comment it out or remove it.
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
Please Log in or Create an account to join the conversation.
Well, if you are going to post hardware-specific code, I have to match that with theBigJohnT wrote: This method uses the ESTOP_LATCH component to connect up an external physical E-Stop to LinuxCNC.
net remote-estop estop-latch.0.fault-in <= hm2_5i20.0.gpio.025.in_not
code that I use with my hardware.
# connect e-stop write/sense to I/O controller
# and ppmc's fault with estop's output, so estop FF is reset, but
# prevent continued estop signal from ppmc from holding FF cleared
newsig ppmcEstop bit
linksp ppmcEstop ppmc.0.din.estop.in
linksp ppmcEstop and2.0.in0
newsig EstopOkIn bit
linksp EstopOkIn estop-latch.0.fault-in
linksp EstopOkIn and2.0.out
newsig EstopOkOut bit
#linksp EstopOkOut ppmc.0.dout.07.out
linksp EstopOkOut ppmc.0.dout.Estop.out
linksp EstopOkOut iocontrol.0.emc-enable-in
linksp EstopOkOut estop-latch.0.ok-out
linksp EstopOkOut and2.0.in1
newsig emc-estop-out bit
linksp emc-estop-out iocontrol.0.user-enable-out
linksp emc-estop-out estop-latch.0.ok-in
newsig emc-estop-reset bit
linksp emc-estop-reset iocontrol.0.user-request-enable
linksp emc-estop-reset estop-latch.0.reset
This links up a hardware Estop sense circuit and estop latch
with a software one in LinuxCNC. Anthing that breaks the
Estop sense loop in the hardware, or a software command
to go to E-stop will cause both hard and soft E-stop latches
to go to E-stop. Only when the hardware Estop chain is
closed and the software command is given to come out of E-stop
will it do so. The hardware also has a watchdog timer to cause
an E-stop if LinuxCNC stops controlling it.
The timing of these functions is critical, as handled
by the order of addf's in the ppmc_load.hal file.
addf motion-command-handler servo-thread
addf and2.0 servo-thread
addf estop-latch.0 servo-thread
addf motion-controller servo-thread
Since there is a delay of one servo cycle between sending a command to
the hardware and reading back the status, these operations have to be
done in the right order.
Jon
Please Log in or Create an account to join the conversation.
jmelson wrote: Well, if you are going to post hardware-specific code
That was not my intention I just quickly copied and pasted the example I had at hand.
John
Please Log in or Create an account to join the conversation.
Just a little ribbing, I should have thrown in one of thoseBigJohnT wrote:
jmelson wrote: Well, if you are going to post hardware-specific code
That was not my intention I just quickly copied and pasted the example I had at hand.
John

emoticons!
Jon
Please Log in or Create an account to join the conversation.
net remote-estop estop-latch.0.fault-in <= parport.0.pin-in10-not
should be
net remote-estop estop-latch.0.fault-in <= parport.0.pin-10-in-not
I also wondered what the line 'addf estop-latch.0 servo-thread' does - I don't have servos, I have stepper motors??
Regards
Chris
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
- Posts: 9969
- Karma: 69
- Thank you received: 3272
Yes it should.cparsons wrote: I am trying to get my estop to work - and saw your example, I am going to do some experimenting but wondered if the line
net remote-estop estop-latch.0.fault-in <= parport.0.pin-in10-not
should be
net remote-estop estop-latch.0.fault-in <= parport.0.pin-10-in-not
I also wondered what the line 'addf estop-latch.0 servo-thread' does - I don't have servos, I have stepper motors??
Regards
Chris
Tom
Please Log in or Create an account to join the conversation.
cparsons wrote: I am trying to get my estop to work - and saw your example, I am going to do some experimenting but wondered if the line
net remote-estop estop-latch.0.fault-in <= parport.0.pin-in10-not
should be
net remote-estop estop-latch.0.fault-in <= parport.0.pin-10-in-not
I also wondered what the line 'addf estop-latch.0 servo-thread' does - I don't have servos, I have stepper motors??
Regards
Chris
If you don't have normally closed estop then yes you need to change the input.
The "servo-thread" is for some reason unknown to me means the slower thread with math and has nothing to do with the drives you may be using.
JT
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
- Posts: 9969
- Karma: 69
- Thank you received: 3272
regards,
Tom
Please Log in or Create an account to join the conversation.
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 <= parport.0.pin-in10-not
Thanks for posting this. My E-stop circuit is now improved.
I'd like to add my limits to the estop circuit through software if necessary. As physically wired, I can't run the limits in series with the estop. What is your opinion on this? This would protect the machine only from a drive failure. I'm using DMM servo drives in step mode and I don't know how they would react if an encoder wiring would fail down the road. Runaway? Or is it safe enough to rely on a drive enable signal to disable the drive? Linking the limit signal to disable the drives?
Please Log in or Create an account to join the conversation.
- LinfieldGarage
-
- Offline
- Fresh Boarder
-
- Posts: 17
- Thank you received: 5
Here is a working config from my system running Master branch 2.8 and a Mesa 7i96 board. My estop button is N/C and is a 24 volt input to GPIO 010 on the Mesa board. Just change the last line for your particular board and GPIO pin.
# ---estop signals---
# create a signal for the estop loopback
#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_[HOSTMOT2](BOARD).0.gpio.010.in_not
Please Log in or Create an account to join the conversation.