Estop addf order with external Estop??

More
19 Jul 2020 09:17 #175127 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.

File Attachment:

File Name: HALExcerpt.txt
File Size:2 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
19 Jul 2020 09:48 #175129 by tommylight
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:
Input
# --- ESTOP-EXT ---
net estop-ext     <=  hm2_7i92.0.7i77.0.0.input-04-not
Output
# --- ESTOP-OUT ---
net estop-out hm2_7i92.0.7i77.0.0.output-02
E-stop latch is only required when there is something else in hal that needs to put the machine in E-stop.
The following user(s) said Thank You: Nitram

Please Log in or Create an account to join the conversation.

More
19 Jul 2020 10:32 #175134 by rodw
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.

Warning: Spoiler!
The following user(s) said Thank You: Nitram, ikkuh

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum