Secondary Spindle HAL integration

More
15 Oct 2018 04:28 #118818 by dberndt
I've recently stuck a router spindle on my Mill to provide some higher spindle speeds when running tiny tools. Seems to work well. Looking for ways to integrate it more fully into HAL. I've got it on a relay controlled circuit, and have an amp meter wired in, my thought is to use the current draw as some indication that the spindle is on/spinning and therefore "at speed".

But more importantly I'd like to get the logic for which spindle to turn on in place. I'm thinking currently of basing it on tool number, say tools > 100 = use subspindle. I'd also like to inhibit the main spindle in this scenario, the main spindle doesn't appreciate being spun up accidentally without a tool in it, and it scares the crap out of me every time...

I don't really have enough HAL experience to understand if that's a reasonable idea or a bad idea instead of trying to get the new master versions that seem to have some sort of multi spindle support. Open to any suggestions.

I guess if it's a tool based approach, or even just an a custom M code? it'd have to do something like re-net: motion.spindle-forward, motion.spindle.reverse, motion-spindle-on, motion-spindle-at-speed, motion.spindle-speed.out, maybe a few others of the same type and that'd be about it?

Thanks,

Dave

Please Log in or Create an account to join the conversation.

More
15 Oct 2018 14:50 #118834 by Todd Zuercher
On the multi spindle routers I've set up I've always done it with custom M-codes to choose which spindle(s) receive the run command signals. I'll post an example config if you'd like to see how I implemented it.

Please Log in or Create an account to join the conversation.

More
15 Oct 2018 20:12 #118842 by cmorley
In master now there is builtin support for multiple spindles.
The bugs are still being squeezed out but Thanks to Andy eventually this will be much easier.

Chris M

Please Log in or Create an account to join the conversation.

More
17 Oct 2018 12:58 #118939 by andypugh
linuxcnc.org/docs/devel/html/man/man9/motion.9.html

Lists the new spindle pin layout. But needs to be edited to add the new num_spindles parameter to the motion module.

I need to update the G-code docs to reflect the new syntax.

Any existing programs will work as before without modification.

Basically S100 or S100 $0 will set the speed of spindle 0
S100 $1 sets the speed of spindle 1

M3 starts all spindles at their set speed
M3 $3 starts only spindle 3]
M5 stops all spindles
M5 $2 stops only spindle 2.

G76 ..... $1 does lathe threading synched to the spindle.1.revs HAL pin.
The following user(s) said Thank You: kentavv

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum