Recommended way to implement spindle enable conditions?
- TripleM
- Offline
- Junior Member
-
Less
More
- Posts: 27
- Thank you received: 3
10 Jul 2026 11:26 #347658
by TripleM
Recommended way to implement spindle enable conditions? was created by TripleM
Hi everyone,I'd like to add some safety conditions for enabling the spindle on my lathe.The spindle should only be allowed to start if all required conditions are met, for example:
components and use the result as the spindle enable signal.Something along the lines of:Is this the usual way to implement this in LinuxCNC, or is there a better or more recommended approach?How have you implemented spindle interlocks on your machines?Thanks!
- The auxiliary drives are enabled.
- The chuck is clamped (clamping pressure is present).
- (I may add more conditions later.)
and2net spindle-enable-request ...
net aux-drives-on ...
net chuck-clamped ...
and2.0.in0 <= spindle-enable-request
and2.0.in1 <= aux-drives-on
...Please Log in or Create an account to join the conversation.
- spumco
- Away
- Platinum Member
-
Less
More
- Posts: 2125
- Thank you received: 882
10 Jul 2026 14:05 #347661
by spumco
Replied by spumco on topic Recommended way to implement spindle enable conditions?
If you have a long string of conditional pins/signals, the logic component is a little less messy in HAL than a bunch of nested/sequential and2 components.
linuxcnc.org/docs/stable/html/man/man9/logic.9.html
If you just want some interlocks to prohibit starting the spindle while chuck is open, or opening the chuck while spindle is turning, and2 or logic work fine.
However, I prefer using Classic Ladder for my spindle(s) and drawbar(s). My lathe has two spindles, each with a pneumatic drawbar. I control the drawbars with either physical buttons OR via M-codes. M-code control is necessary for automated bar-feed operations.
I also want to be able to open the collet closer while the spindle is running, although at a low maximum speed. Also need ability to orient spindle while the closer is open (hex/square stock).
Given the complexity of my particular config, I found ladder be be more intuitive and easier to configure (and test).
linuxcnc.org/docs/stable/html/man/man9/logic.9.html
If you just want some interlocks to prohibit starting the spindle while chuck is open, or opening the chuck while spindle is turning, and2 or logic work fine.
However, I prefer using Classic Ladder for my spindle(s) and drawbar(s). My lathe has two spindles, each with a pneumatic drawbar. I control the drawbars with either physical buttons OR via M-codes. M-code control is necessary for automated bar-feed operations.
I also want to be able to open the collet closer while the spindle is running, although at a low maximum speed. Also need ability to orient spindle while the closer is open (hex/square stock).
Given the complexity of my particular config, I found ladder be be more intuitive and easier to configure (and test).
Please Log in or Create an account to join the conversation.
Time to create page: 0.107 seconds