Enable / Disable Output when Spindle is ON /OFF
- tsaG
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 4
05 Aug 2025 20:34 - 05 Aug 2025 20:35 #332921
by tsaG
Enable / Disable Output when Spindle is ON /OFF was created by tsaG
Hi,
I do have a ATC spindle that requires bearing air. For this, I can enable the solenoid via M64 P05 and disable it via M65 P05. How can I automate it so that it activates the air when the spindle is active (as I understood, every time the M3 command is run)?
My first idea is remapping the M3 command and add the M64 in it but I do not know how to enable the spindle then in the remapped M3...
I do have a ATC spindle that requires bearing air. For this, I can enable the solenoid via M64 P05 and disable it via M65 P05. How can I automate it so that it activates the air when the spindle is active (as I understood, every time the M3 command is run)?
My first idea is remapping the M3 command and add the M64 in it but I do not know how to enable the spindle then in the remapped M3...
Last edit: 05 Aug 2025 20:35 by tsaG.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18998
- Thank you received: 5247
05 Aug 2025 20:52 #332922
by PCW
Replied by PCW on topic Enable / Disable Output when Spindle is ON /OFF
If it only needs to be on when the spindle is on,
you could do it all in hal with single statement:
net spindle-air spindle.0.on air-solenoid-drive
(with names other than spindle.0.on changed as desired)
you could do it all in hal with single statement:
net spindle-air spindle.0.on air-solenoid-drive
(with names other than spindle.0.on changed as desired)
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20513
- Thank you received: 6981
05 Aug 2025 20:55 #332923
by tommylight
Replied by tommylight on topic Enable / Disable Output when Spindle is ON /OFF
In hal, add the air output pin to spindle-on signal
No remap required.
No remap required.
Please Log in or Create an account to join the conversation.
- tsaG
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 4
05 Aug 2025 21:53 #332927
by tsaG
Replied by tsaG on topic Enable / Disable Output when Spindle is ON /OFF
Ah, even easier. Thanks!
Like so ( I would also like to use manually using code, thus mapped to motion pin)?
net solenoid-bearing_air spindle.0.on hm2_7i76e.0.7i76.0.0.output-11 <= motion.digital-out-05
Like so ( I would also like to use manually using code, thus mapped to motion pin)?
net solenoid-bearing_air spindle.0.on hm2_7i76e.0.7i76.0.0.output-11 <= motion.digital-out-05
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20513
- Thank you received: 6981
05 Aug 2025 22:09 #332929
by tommylight
Replied by tommylight on topic Enable / Disable Output when Spindle is ON /OFF
Pretty sure this is all you need
net spindle.0.on hm2_7i76e.0.7i76.0.0.output-11
or this
net solenoid-bearing_air spindle.0.on hm2_7i76e.0.7i76.0.0.output-11
net spindle.0.on hm2_7i76e.0.7i76.0.0.output-11
or this
net solenoid-bearing_air spindle.0.on hm2_7i76e.0.7i76.0.0.output-11
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11324
- Thank you received: 3801
06 Aug 2025 08:44 #332945
by rodw
Replied by rodw on topic Enable / Disable Output when Spindle is ON /OFF
Sometimes you might need to use a timedelay on the spindle.0.on to ensure the air circuit gets up to pressure before the spindle actually spins.
Please Log in or Create an account to join the conversation.
- tsaG
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 4
06 Aug 2025 09:49 #332951
by tsaG
Replied by tsaG on topic Enable / Disable Output when Spindle is ON /OFF
Thanks for the tips!
I applied it to my setup and realized that thenet pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on"
"net pdnt.spindle.is-on => hm2_7i76e.0.7i76.0.0.output-11"
In my Hal file. Everything is working now. Thanks!
I applied it to my setup and realized that the
xhc-whb04b-6 Hal code already used the spindle valve signal.
"
After fiddling for some time, I came up with
In my Hal file. Everything is working now. Thanks!

The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds