External E-Stop
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11419
- Thank you received: 3831
15 Jan 2019 20:59 #124266
by rodw
Replied by rodw on topic External E-Stop
I might as well post his here too. The docs and examples never show how you can create an estop chain that included multiple switches chained together in software. Its not always convenient to wire all functions that should trigger an estop to a single input. This example has a hardwired estop, an estop button on a pendant. Additionally, if the plasma torch breaks away, this triggers an estop too.
On estop, we turn on a red warning light and disable the stepper drives. (All stepper controller (dis)enable lines are tied to the one output.)
On estop, we turn on a red warning light and disable the stepper drives. (All stepper controller (dis)enable lines are tied to the one output.)
loadrt estop_latch count=3
addf estop-latch.0 servo-thread
addf estop-latch.1 servo-thread
addf estop-latch.2 servo-thread
# --- ESTOP CHAIN STARTS ---
net latch-reset iocontrol.0.user-request-enable
net latch-ok-in iocontrol.0.user-enable-out
net latch-ok-in => estop-latch.0.ok-in
net latch0-out <= estop-latch.0.ok-out
net latch0-out => estop-latch.1.ok-in
net latch1-out <= estop-latch.1.ok-out
net latch1-out => estop-latch.2.ok-in
net latch-reset => estop-latch.0.reset
net latch-reset => estop-latch.1.reset
net latch-reset => estop-latch.2.reset
net latch-out iocontrol.0.emc-enable-in <= estop-latch.2.ok-out
net estop-out estop-latch.2.fault-out
# --- EXTERNAL ESTOP SWITCH ---
net external-estop <= hm2_7i76e.0.7i76.0.0.input-00
net external-estop => estop-latch.0.fault-in
# --- PENDANT ESTOP SWITCH ---
net pendant-estop <= hm2_7i76e.0.7i76.0.0.input-26-not
net pendant-estop => estop-latch.1.fault-in
# --- TORCH BREAKAWAY E-STOP ---
net torch-breakaway <= hm2_7i76e.0.7i76.0.0.input-06
net torch-breakaway => estop-latch.2.fault-in
# --- E-STOP STEPPER DRIVE DISABLE ---
net estop-out hm2_7i76e.0.7i76.0.0.output-05
# --- E-STOP RED WARNING LIGHT ---
net estop-out hm2_7i76e.0.7i76.0.0.output-00
# --- ESTOP CHAIN ENDS ---
The following user(s) said Thank You: BigJohnT, ikkuh, thefabricator03, Sadmeatball, DoWerna, Unlogic
Please Log in or Create an account to join the conversation.
- pl7i92
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1872
- Thank you received: 358
02 Mar 2019 14:00 #127503
by pl7i92
Replied by pl7i92 on topic External E-Stop
Software E-stop is always good but as it is realy a need shout down the motor power by press not in Software
you can Home against the switches and restart at the nearest Clearenc hight at all time
you can Home against the switches and restart at the nearest Clearenc hight at all time
Please Log in or Create an account to join the conversation.
- MacKaye
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
22 Sep 2025 10:00 #335274
by MacKaye
Replied by MacKaye on topic External E-Stop
I have been running my machine in a kind of sketchy estop version, where LinuxCNC doesn´t really correlate with my physical estop hardware (which is running seperately).
Currently i am finally trying to implement feedback of my physical estop hardware (pilz estop relais that checks various inputs) into linuxCNC
Original hardware used two momentary switches connected to the main pilz relais to switch the main power on/-off. Once the machine is running i have a estop-ok signal 24V connected to my mesa inputs.
Currently i have serious problems to synchronize GUI interface, linuxCNC and the main hardware. I have tried so many different versions of estop routing i am now totally confused what would be the best approach and like to have some directions for a new setup from scratch.
I would love to have it work like that:
- i connect my machine to power and the PC and mesahardware boots up, Estop Hardware is supplied 24V (works perfectly)
- once GUI is loaded (Gmoccapy) i press machine-on (which is currently not available to be pressed because the GUI is in estop)
- machine-on sends a 24V oneshot through mesa outputs to pilz e-stop relais, which switches on the rest of the hardware. (legacy function from the original setup)
- after a few seconds the estop hardware delivers a e-stop ok signal to linuxCNC which finally pulls the GUI estop button. halui estop is activated -> false
Main problems i have encountered so far are:
- halui estop is always actived. No matter what kind of reset functionality i have used in my main hal.
- i can never use the GUI machine-is on button to actually start my machine. But i need to do so to recieve a estop ok signal from my hardware. So it needs to be usable before. Currently i use a jumper cable to start my machine and would love to get away with not have to implement a physical switch somewhere as the install with a big touchscreen doesn´t have anywhere to mount one.
Some direction would be much appreciated, thanks.
Currently i am finally trying to implement feedback of my physical estop hardware (pilz estop relais that checks various inputs) into linuxCNC
Original hardware used two momentary switches connected to the main pilz relais to switch the main power on/-off. Once the machine is running i have a estop-ok signal 24V connected to my mesa inputs.
Currently i have serious problems to synchronize GUI interface, linuxCNC and the main hardware. I have tried so many different versions of estop routing i am now totally confused what would be the best approach and like to have some directions for a new setup from scratch.
I would love to have it work like that:
- i connect my machine to power and the PC and mesahardware boots up, Estop Hardware is supplied 24V (works perfectly)
- once GUI is loaded (Gmoccapy) i press machine-on (which is currently not available to be pressed because the GUI is in estop)
- machine-on sends a 24V oneshot through mesa outputs to pilz e-stop relais, which switches on the rest of the hardware. (legacy function from the original setup)
- after a few seconds the estop hardware delivers a e-stop ok signal to linuxCNC which finally pulls the GUI estop button. halui estop is activated -> false
Main problems i have encountered so far are:
- halui estop is always actived. No matter what kind of reset functionality i have used in my main hal.
- i can never use the GUI machine-is on button to actually start my machine. But i need to do so to recieve a estop ok signal from my hardware. So it needs to be usable before. Currently i use a jumper cable to start my machine and would love to get away with not have to implement a physical switch somewhere as the install with a big touchscreen doesn´t have anywhere to mount one.
Some direction would be much appreciated, thanks.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11419
- Thank you received: 3831
23 Sep 2025 19:43 #335337
by rodw
Replied by rodw on topic External E-Stop
With a safety relay, usually you would implement a momentary latch button to enable the relay.
Then a pin on the relay should be connected to iocontrol.0.emc-enable-in to tell linuxcnc the machine is enabled.
You will still need to press the machine on button in axis.
Also, if you don't have the external latch button, you can use iocontrol.0.user-request-enable instead. COnnect to the pilz latch. It sends a momentary latch signal to the relay when you enable linuxcnc
Then a pin on the relay should be connected to iocontrol.0.emc-enable-in to tell linuxcnc the machine is enabled.
You will still need to press the machine on button in axis.
Also, if you don't have the external latch button, you can use iocontrol.0.user-request-enable instead. COnnect to the pilz latch. It sends a momentary latch signal to the relay when you enable linuxcnc
Please Log in or Create an account to join the conversation.
- MacKaye
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
29 Sep 2025 19:58 #335568
by MacKaye
Replied by MacKaye on topic External E-Stop
Thank you but i have seemingly stumbled upon an issue with estop i cannot resolve in any way. Even without any further hal functionality, just ini, configuring a basic gmoccapy and a base hal doing nothing but estop logic i can´t reset estop.
Current version i am trying. I can set external estop via halcmd to either states and try to reset estop with F1 GUI estop
I have built pretty elaborate estop logics with debouncing of external estop time delays and everything, but can´t get emc-task 3 (OFF but no estop) to show.
# base.hal – Minimalstart für Weiler XZ (V10)
# --- components ---
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT
loadrt hostmot2
loadrt hm2_pci config="num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=000XXXXX"
loadrt estop_latch count=1
# --- Motion in den Servo-Thread einhängen ---
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf hm2_5i25.0.read servo-thread
addf estop-latch.0 servo-thread
# --- Loopback pro Joint, damit Motion ohne Feedback auskommt ---
net joint-0-pos-loop joint.0.motor-pos-cmd => joint.0.motor-pos-fb
net joint-1-pos-loop joint.1.motor-pos-cmd => joint.1.motor-pos-fb
# Enable-Leitungen/Faults – aktuell ohne Verdrahtung (werden später ergänzt)
addf hm2_5i25.0.write servo-thread
# --- ESTOP CHAIN (single latch) ---
net latch-reset <= iocontrol.0.user-request-enable
net latch-ok-in <= iocontrol.0.user-enable-out
net latch-ok-in => estop-latch.0.ok-in
net latch-reset => estop-latch.0.reset
net latch-out iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-out estop-latch.0.fault-out
# External E-Stop input (single source)
# For testing: fix the external signal to TRUE (fault active)
net external-estop => estop-latch.0.fault-in
sets external-estop TRUE
# --- ESTOP CHAIN ENDS ---
# doormagnet and relay for 24V supply
setp hm2_5i25.0.7i84.0.2.output-02 TRUE
setp hm2_5i25.0.7i84.0.2.output-03 TRUE
Current version i am trying. I can set external estop via halcmd to either states and try to reset estop with F1 GUI estop
I have built pretty elaborate estop logics with debouncing of external estop time delays and everything, but can´t get emc-task 3 (OFF but no estop) to show.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11419
- Thank you received: 3831
03 Oct 2025 10:43 #335770
by rodw
Replied by rodw on topic External E-Stop
my recommendation is to get it working in axis and then convert to gmocappy cos it does some funny things. If your config breaks on conversion, raise it with gmocappy.
This is how I did it with a safety relay and an external latch button attached to the relay that
sends a signal to pin lcec.0.3.in-01 when the relay is enabled
this is inverted and sent to the drives estop input on all drives.
The estop button is attached to the safety relay
github.com/rodw-au/vmnmillqt/blob/main/VMNmillQT.hal#L146
In this case no estop-latch is used,
This is how I did it with a safety relay and an external latch button attached to the relay that
sends a signal to pin lcec.0.3.in-01 when the relay is enabled
this is inverted and sent to the drives estop input on all drives.
The estop button is attached to the safety relay
github.com/rodw-au/vmnmillqt/blob/main/VMNmillQT.hal#L146
In this case no estop-latch is used,
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4532
- Thank you received: 2015
03 Oct 2025 10:56 #335773
by Aciera
Replied by Aciera on topic External E-Stop
Have you checked that 'iocontrol.0.emc-enable-in' goes TRUE when you clear the external estop?
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds