Run/Step Hold/Resume Buttons

05 Aug 2020 15:31 #177394 by harindugamlath
Thanks BigJohnT

This code works like a charm. I'm using Probe basic and it updates the gui too which is nice. But I would like to add some info so this might be helpful to someone.

In the original code the following lines should be changed according to your physical buttons. I mean Normally Open or Closed.

For the feed hold button,

net pause-resume-btn and2.0.in0 and2.1.in0 <= hm2_5i20.0.gpio.027.in_not (this is your input)

For the cycle start button,

net run-step-btn and2.2.in0 and2.3.in0 <= hm2_5i20.0.gpio.026.in_not (this is your input)

as we can see mesa card input has been inverted in both. This almost crashed my machine (partly my error when testing the G-code with a bad preset z height)

in Short if you have Normally closed switches (if your input stays true and goes false when you press) use the inverted pin.
if you have normally open switches(if your input stays false and goes true when you press) use the mesa pin without inverting.

what happened was original feed hold button on my machine was a normally closed one and the cycle start was normally open. Real fun part started when I try to hit the stop button on the gui as I saw I was having a wrong Z height. It just went back to normal cycle run. Pressing the Stop button again and again didn't help it just went in to normal cycle and Estop saved the day. Hope this helps someone else to be a bit less stupid than me.

What I ended up with - for feed hold (NC switch)
net pause-resume-btn and2.0.in0 and2.1.in0 <= hm2_5i25.0.7i76.0.0.input-31-not

for cycle start (No switch)
net run-step-btn and2.2.in0 and2.3.in0 <= hm2_5i25.0.7i76.0.0.input-30

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

Time to create page: 0.065 seconds
Powered by Kunena Forum