Enable / Disable Output when Spindle is ON /OFF

More
1 year 2 months ago #332921 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...

Please Log in to join the conversation.

More
1 year 2 months ago #332922 by PCW
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)


 

Please Log in to join the conversation.

More
1 year 2 months ago #332923 by tommylight
In hal, add the air output pin to spindle-on signal
No remap required.

Please Log in to join the conversation.

More
1 year 2 months ago #332927 by tsaG
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

Please Log in to join the conversation.

More
1 year 2 months ago #332929 by tommylight
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

Please Log in to join the conversation.

More
1 year 2 months ago #332945 by rodw
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 to join the conversation.

More
1 year 2 months ago #332951 by tsaG
Thanks for the tips! 

I applied it to my setup and realized that the 
Code:
xhc-whb04b-6 Hal code already used the spindle valve signal. "
net pdnt.spindle.is-on whb.halui.spindle.is-on spindle.0.on"
Code:
After fiddling for some time, I came up with 
"net pdnt.spindle.is-on => hm2_7i76e.0.7i76.0.0.output-11" 

In my Hal file. Everything is working now. Thanks! :)

Please Log in to join the conversation.

Time to create page: 0.106 seconds
Powered by Kunena Forum