- Posts: 301
- Thank you received: 0
Locking latching Button for Machine ON / OFF
i have ordered couple of buttons, some are momentary type button the others locking buttons. I want to have a physical locking button for Machine On/Off and later also for coolant if needed.
With the below code the machine goes on when pushing the button, but when i release it it stays on, i have to push the button again to power off the machine:
net btn-pwr toggle.0.in <= hm2_7i76e.0.7i76.0.0.input-04
net pwr-btn toggle2nist.0.in <= toggle.0.out
net tog-on toggle2nist.0.is-on <= halui.machine.is-on
net pwr-on halui.machine.on <= toggle2nist.0.on
net pwr-off halui.machine.off <= toggle2nist.0.off
I am not sure which commands i need to power off the machine when the button is released. On the Toggle2nist doc page i have read that the command is for a momentary button, so i am wondering if there is a command for a locking button?
Thanks in advance.
Please Log in to join the conversation.
.The button gives 24v output when pressed - when released 0V.
There has to be a way to get it to work, but i cant find any information about a similar situation here in the forum.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22012
- Thank you received: 4
Give me some time to think it over.denhen89 wrote: Hello guys,
i have ordered couple of buttons, some are momentary type button the others locking buttons. I want to have a physical locking button for Machine On/Off and later also for coolant if needed.
With the below code the machine goes on when pushing the button, but when i release it it stays on, i have to push the button again to power off the machine:
net btn-pwr toggle.0.in <= hm2_7i76e.0.7i76.0.0.input-04
net pwr-btn toggle2nist.0.in <= toggle.0.out
net tog-on toggle2nist.0.is-on <= halui.machine.is-on
net pwr-on halui.machine.on <= toggle2nist.0.on
net pwr-off halui.machine.off <= toggle2nist.0.off
I am not sure which commands i need to power off the machine when the button is released. On the Toggle2nist doc page i have read that the command is for a momentary button, so i am wondering if there is a command for a locking button?
Thanks in advance.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22012
- Thank you received: 4
Seems that would do what you need.
And then there is also edge component.
Between the two, that should work.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22012
- Thank you received: 4
Please Log in to join the conversation.
Just about 15min ago i found the oneshot command but i wasnt sure if that will work.
I will give my best to get it to work by my self, because i would like to understand and not just paste and copy.
Thanks for your time!
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22012
- Thank you received: 4
Please Log in to join the conversation.

I have found this interesting thread: forum.linuxcnc.org/24-hal-components/352...-oneshot-won-t-shoot
I do not believe that i will get it done without any help. That does not mean that i will not try - i have spent already about 6 hours to get it done
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22012
- Thank you received: 4
You are at the same point i was a few (quite a few) years back, getting to know Linuxcnc (EMC2 back then) when i bumped into the components page and got shocked by how much stuff can be done with those small components! Was a huge and pleasant surprise that opened a door to new possibilities.
On the main page of LinuxCNC is the section named "Community", so helping each other is "enabled by default"
Please Log in to join the conversation.
linuxcnc.org/docs/devel/html/man/man9/toggle.9.html
Please Log in to join the conversation.
