halui toggle button
- vre
- Offline
- Platinum Member
-
Less
More
- Posts: 607
- Thank you received: 16
10 Mar 2025 01:56 #323588
by vre
halui toggle button was created by vre
I have an external momentary button and i want to toggle between halui.flood.on and halui.flood.off
How can do this config ?
Also i have an output pin that activates lubrication pump and an output pin that activates a solenoid hydraulic valve that releases spindle tool clamp
where in hal must connect it in iocontrol v2 ?
How can do this config ?
Also i have an output pin that activates lubrication pump and an output pin that activates a solenoid hydraulic valve that releases spindle tool clamp
where in hal must connect it in iocontrol v2 ?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4979
- Thank you received: 1450
10 Mar 2025 14:19 #323607
by Todd Zuercher
Replied by Todd Zuercher on topic halui toggle button
For your coolant flood, you would use the "toggle2nist" component.
It has 4 hal pins:
toggle2nist.N.in Would connect to the output signal from your button input.
toggle2nist.N.is-on Would connect to the output signal from the hal pin "halui.flood.is-on".
toggle2nist.N.on Would connect to the input signal to the hal pin "halui.flood.on".
toggle2nist.N.off Would connect to the input signal to the hal pin "halui.flood.off".
There is not any pre defined pins designated for lube or spindle release. You must build your own logic to handle these functions.
Often machine integrators will set up custom M-codes (M100-199) that turn the required hal pins on or off. Then implement special logic (Hal or PLC) to prevent or enable the states as necessary. Such as preventing the tool from being released if the spindle is running.
It has 4 hal pins:
toggle2nist.N.in Would connect to the output signal from your button input.
toggle2nist.N.is-on Would connect to the output signal from the hal pin "halui.flood.is-on".
toggle2nist.N.on Would connect to the input signal to the hal pin "halui.flood.on".
toggle2nist.N.off Would connect to the input signal to the hal pin "halui.flood.off".
There is not any pre defined pins designated for lube or spindle release. You must build your own logic to handle these functions.
Often machine integrators will set up custom M-codes (M100-199) that turn the required hal pins on or off. Then implement special logic (Hal or PLC) to prevent or enable the states as necessary. Such as preventing the tool from being released if the spindle is running.
The following user(s) said Thank You: vre
Please Log in or Create an account to join the conversation.
- vre
- Offline
- Platinum Member
-
Less
More
- Posts: 607
- Thank you received: 16
11 Mar 2025 11:45 #323669
by vre
Replied by vre on topic halui toggle button
Here linuxcnc.org/docs/html/config/iov2.html
shows pins relevant to lube and tool change
also halui linuxcnc.org/docs/html/man/man1/halui.1.html#Lube
has pins for lube.
How can use these pins ?
shows pins relevant to lube and tool change
also halui linuxcnc.org/docs/html/man/man1/halui.1.html#Lube
has pins for lube.
How can use these pins ?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4979
- Thank you received: 1450
11 Mar 2025 14:20 #323681
by Todd Zuercher
Replied by Todd Zuercher on topic halui toggle button
I'm sorry I am not as familiar with iocontrol v2, and missed that. I'm not sure what exactly the lube related pins do other than exactly what it says in the man page. As far as I know the pins will only be true if the machine is out of estop and the halui pin "halui.lube.on" is true. So it might be a rather toothless addition that doesn't really do much of anything, and you will still need to create appropriate logic to control it. I could be completely wrong, but I'm not seeing documentation to say otherwise.
Please Log in or Create an account to join the conversation.
- vre
- Offline
- Platinum Member
-
Less
More
- Posts: 607
- Thank you received: 16
11 Mar 2025 23:53 #323716
by vre
Replied by vre on topic halui toggle button
iov2 seems to removed from master..
I have manual tool change that is connected to an output pin that releases the tool(hydraulic) so spindle must inhibited from running when this is activated
also when spindle runs tool change must inhibited
Both inhibitions must be done for safety reasons.
How to do this ?
I have manual tool change that is connected to an output pin that releases the tool(hydraulic) so spindle must inhibited from running when this is activated
also when spindle runs tool change must inhibited
Both inhibitions must be done for safety reasons.
How to do this ?
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4233
- Thank you received: 1865
12 Mar 2025 07:33 #323731
by Aciera
Replied by Aciera on topic halui toggle button
Yes, iov2 has been removed in master.
Simple cases (like yours seems to be) can be handled by a ngc remap for M6 while more complex situations can be handled by a python remap of M6 and or T.
If you just need a safety interlock you might be able to simply add some hal logic that inhibits the relevant output pins until certain conditions are met.
Simple cases (like yours seems to be) can be handled by a ngc remap for M6 while more complex situations can be handled by a python remap of M6 and or T.
If you just need a safety interlock you might be able to simply add some hal logic that inhibits the relevant output pins until certain conditions are met.
The following user(s) said Thank You: vre
Please Log in or Create an account to join the conversation.
- bevins
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1942
- Thank you received: 336
20 Mar 2025 00:24 #324332
by bevins
Replied by bevins on topic halui toggle button
You can do it like this.
loadrt toggle count=5
addf toggle.0 servo-thread
setp toggle.0.debounce 50
net flood-toggle toggle.0.in <= hm2_5i25.0.7i77.0.0.input-29
net flood-control toggle.0.out => hm2_5i25.0.7i77.0.0.output-02
loadrt toggle count=5
addf toggle.0 servo-thread
setp toggle.0.debounce 50
net flood-toggle toggle.0.in <= hm2_5i25.0.7i77.0.0.input-29
net flood-control toggle.0.out => hm2_5i25.0.7i77.0.0.output-02
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 19842
- Thank you received: 6716
20 Mar 2025 01:44 #324333
by tommylight
Replied by tommylight on topic halui toggle button
If you need only one toggle, do not use "count=5" as that creates 5 toggles, so that would also need all the addf and setp and inputs and outputs in hal, for all 5, from 0 to 4.You can do it like this.
loadrt toggle count=5
addf toggle.0 servo-thread
setp toggle.0.debounce 50
net flood-toggle toggle.0.in <= hm2_5i25.0.7i77.0.0.input-29
net flood-control toggle.0.out => hm2_5i25.0.7i77.0.0.output-02
Please Log in or Create an account to join the conversation.
Time to create page: 0.113 seconds