Estop addf order with external Estop??
19 Jul 2020 09:17 #175127
by Nitram
Estop addf order with external Estop?? was created by Nitram
Hi.
I have lathe which has interesting behavior on start up. It is also set up with an external Estop button on the machine itself.
When I start the machine, then mouse click the Estop button on the GUI screen (gmochapy), sometimes it will come out of estop immediately and cleanly, whereas sometimes, one can hear the main relay cycle quickly once or twice... accompanied with a "Cannot change state, estop active" message(s). The number of messages coincides with the number of times the relay cycles.
Again, this behavior is random in nature. After doing some reading, I wonder whether there is an issue with the order of the addf section of HAL, in that, with the external Estop switch and therefore additional estop_latch functions, the signal to unlatch and bring the machine out of estop may be one cycle late, hence causing the cycling until the latched signal is cleared one or two cycles later.
This post refers:
forum.linuxcnc.org/47-hal-examples/25861-external-e-stop
specifically from the second reply:
"The timing of these functions is critical, as handled
by the order of addf's in the ppmc_load.hal file."
I have attached the appropriate section of the HAL file and for clarity, the machine has two SSR's in series to the main relay, one controlled by the external estop, the other by the GUI estop. They control power to the main relay and therefore the machine.
By way of explanation, the SSR associated with the physical lathe estop switch is is output-15 (estop-latch.1.ok-out)
the SSR associated with the LCNC GUI estop is output-14 (iocontrol.0.emc-enable-in).
The physical estop button is input-31-not (estop-latch.0.fault-in)
Now that I think of it, I don't know what the physical serial order is of those SSR's and whether that has any bearing on the order necessary for the addf of the estop-latch functions.
By the way, the fact that "hm2_7i76e.0.write" is not dead last in the addf list, is that an issue in this case (or indeed good practice to place it dead last)??
I wonder if someone could have a glance at the HAL file excerpt (which includes the addf order and the Estop section) and let me know if I am on the right track here by investigating the addf order of the estop functions to resolve this random behavior, or whether it has no bearing and I should look elsewhere.
Really appreciate your help!
Kind regards,
Marty.
I have lathe which has interesting behavior on start up. It is also set up with an external Estop button on the machine itself.
When I start the machine, then mouse click the Estop button on the GUI screen (gmochapy), sometimes it will come out of estop immediately and cleanly, whereas sometimes, one can hear the main relay cycle quickly once or twice... accompanied with a "Cannot change state, estop active" message(s). The number of messages coincides with the number of times the relay cycles.
Again, this behavior is random in nature. After doing some reading, I wonder whether there is an issue with the order of the addf section of HAL, in that, with the external Estop switch and therefore additional estop_latch functions, the signal to unlatch and bring the machine out of estop may be one cycle late, hence causing the cycling until the latched signal is cleared one or two cycles later.
This post refers:
forum.linuxcnc.org/47-hal-examples/25861-external-e-stop
specifically from the second reply:
"The timing of these functions is critical, as handled
by the order of addf's in the ppmc_load.hal file."
I have attached the appropriate section of the HAL file and for clarity, the machine has two SSR's in series to the main relay, one controlled by the external estop, the other by the GUI estop. They control power to the main relay and therefore the machine.
By way of explanation, the SSR associated with the physical lathe estop switch is is output-15 (estop-latch.1.ok-out)
the SSR associated with the LCNC GUI estop is output-14 (iocontrol.0.emc-enable-in).
The physical estop button is input-31-not (estop-latch.0.fault-in)
Now that I think of it, I don't know what the physical serial order is of those SSR's and whether that has any bearing on the order necessary for the addf of the estop-latch functions.
By the way, the fact that "hm2_7i76e.0.write" is not dead last in the addf list, is that an issue in this case (or indeed good practice to place it dead last)??
I wonder if someone could have a glance at the HAL file excerpt (which includes the addf order and the Estop section) and let me know if I am on the right track here by investigating the addf order of the estop functions to resolve this random behavior, or whether it has no bearing and I should look elsewhere.
Really appreciate your help!
Kind regards,
Marty.
Attachments:
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
19 Jul 2020 09:48 #175129
by tommylight
Replied by tommylight on topic Estop addf order with external Estop??
If i understood correctly, you have two separate outputs controlled by two functions in hal, so that will not work as the e-stop is one single function, it is on or off.
The way i set it is
- input from the switch or switches set as a single input in hal,
- output or outputs set as a single output in hal
- when the physical e-stop is pushed, LinuxCNC can not get out of e-stop by pressing F1,
- when the physical e-stop is released, so does the e-stop in LinuxCNC so there is no need to press F1.
For that to work:
InputOutputE-stop latch is only required when there is something else in hal that needs to put the machine in E-stop.
The way i set it is
- input from the switch or switches set as a single input in hal,
- output or outputs set as a single output in hal
- when the physical e-stop is pushed, LinuxCNC can not get out of e-stop by pressing F1,
- when the physical e-stop is released, so does the e-stop in LinuxCNC so there is no need to press F1.
For that to work:
Input
# --- ESTOP-EXT ---
net estop-ext <= hm2_7i92.0.7i77.0.0.input-04-not
# --- ESTOP-OUT ---
net estop-out hm2_7i92.0.7i77.0.0.output-02
The following user(s) said Thank You: Nitram
Please Log in or Create an account to join the conversation.
19 Jul 2020 10:32 #175134
by rodw
Replied by rodw on topic Estop addf order with external Estop??
Not sure if this helps but here is a more complex example of using estop-latch I use.
There is a simple 1 switch example in the forum under hal examples I followed.
There is a simple 1 switch example in the forum under hal examples I followed.
Warning: Spoiler!
# --- 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 latch2-out <= estop-latch.2.ok-out
net latch2-out => estop-latch.3.ok-in
#net latch3-out <= estop-latch.3.ok-out
#net latch3-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-reset => estop-latch.3.reset
net latch-out iocontrol.0.emc-enable-in <= estop-latch.3.ok-out
net estop-out estop-latch.3.fault-out
# --- EXTERNAL ESTOP SWITCH - CONTROL BOX---
net external-estop <= hm2_7i76e.0.7i76.0.0.input-00
net external-estop => estop-latch.0.fault-in
# --- EXTERNAL ESTOP SWITCH - CONSOLE ---
net console-estop <= hm2_7i76e.0.7i76.0.0.input-31-not
net console-estop => estop-latch.3.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
net estop-out hm2_7i76e.0.7i76.0.0.output-10
# --- ESTOP CHAIN ENDS ---
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds