Additional hardware-button for coolant
- TripleM
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
22 Oct 2025 12:50 #336874
by TripleM
Additional hardware-button for coolant was created by TripleM
Hello,
I would like to add a hardware button for cooling, for example.
Currently, my *.hal entry looks like this:
This allows me to switch the coolant on and off via the GUI.
How can I add the hardware button (push button)?
I want to be able to continue switching it on and off in the GUI and see that the cooling is switched on.
Thanks
I would like to add a hardware button for cooling, for example.
Currently, my *.hal entry looks like this:
net coolant-flood <= iocontrol.0.coolant-flood => hm2_7i96s.0.7i84.0.0.output-11
This allows me to switch the coolant on and off via the GUI.
How can I add the hardware button (push button)?
I want to be able to continue switching it on and off in the GUI and see that the cooling is switched on.
Thanks
Please Log in or Create an account to join the conversation.
- zz912
-
- Offline
- Platinum Member
-
Less
More
- Posts: 573
- Thank you received: 89
22 Oct 2025 13:01 #336875
by zz912
Replied by zz912 on topic Additional hardware-button for coolant
Mayby this could help
forum.linuxcnc.org/24-hal-components/53990-button-toggle
forum.linuxcnc.org/24-hal-components/53990-button-toggle
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19654
- Thank you received: 4544
22 Oct 2025 13:20 - 22 Oct 2025 13:24 #336876
by andypugh
Replied by andypugh on topic Additional hardware-button for coolant
On my lathe I fitted a 3-position switch, labelled with "on - auto - off". This allows me to override the G-code if required, to either on or off.
The HAL to do this looks like this:
Possibly not the simplest way, I suppose that it could have been done with simple AND and NOT components
coolant-out = (coolant _flood OR coolant_on) AND (NOT coolant_off)
Or even LUT5.
Truth-table for LUT5
The HAL to do this looks like this:
net coolant-off hm2_7i84.008a.input-25
net coolant-on hm2_7i84.008a.input-26
loadrt mux_generic config="bb4"
addf mux-gen.00 servo-thread
net coolant-off mux-gen.00.sel-bit-00
net coolant-on mux-gen.00.sel-bit-01
net coolant-flood mux-gen.00.out-bit => hm2_7i84.008a.output-08
net coolant-auto iocontrol.0.coolant-flood mux-gen.00.in-bit-00
setp mux-gen.00.in-bit-01 0
setp mux-gen.00.in-bit-02 1
setp mux-gen.00.in-bit-03 0
Possibly not the simplest way, I suppose that it could have been done with simple AND and NOT components
coolant-out = (coolant _flood OR coolant_on) AND (NOT coolant_off)
Or even LUT5.
Truth-table for LUT5
coolant_flood | 0 1 0 1 0 1 0 1
coolant_on | 0 0 1 1 0 0 1 1
coolant_off | 0 0 0 0 1 1 1 1
coolant_out | 0 1 1 1 0 0 0 0
LUT5 Mask = 14 (0x0E)
Last edit: 22 Oct 2025 13:24 by andypugh.
Please Log in or Create an account to join the conversation.
- newbynobi
-
- Away
- Moderator
-
Less
More
- Posts: 1928
- Thank you received: 392
22 Oct 2025 13:26 #336877
by newbynobi
Replied by newbynobi on topic Additional hardware-button for coolant
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.065 seconds