- Configuring LinuxCNC
- Basic Configuration
- Wait for spindle-halt signal before reversing spindle direction
Wait for spindle-halt signal before reversing spindle direction
- workshop54
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 3
01 Jul 2025 06:38 #331058
by workshop54
Wait for spindle-halt signal before reversing spindle direction was created by workshop54
Hi all,
I have a setup where the spindle drive provides a spindle-halt signal when the spindle has fully stopped. I’d like to make sure LinuxCNC does not reverse the spindle direction (i.e. switch between M3 and M4) until this spindle-halt signal is true.
Is there a built-in way in LinuxCNC to delay or block a direction change until this signal becomes active? Or do I need to handle this myself, for example using HAL logic or some custom component?
Curious to hear how others have tackled this.
Thanks in advance.
I have a setup where the spindle drive provides a spindle-halt signal when the spindle has fully stopped. I’d like to make sure LinuxCNC does not reverse the spindle direction (i.e. switch between M3 and M4) until this spindle-halt signal is true.
Is there a built-in way in LinuxCNC to delay or block a direction change until this signal becomes active? Or do I need to handle this myself, for example using HAL logic or some custom component?
Curious to hear how others have tackled this.
Thanks in advance.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4433
- Thank you received: 1975
01 Jul 2025 13:08 #331065
by Aciera
I'm not aware of a built in solution but this could certainly be handled using HAL logic (or a custom component)
Replied by Aciera on topic Wait for spindle-halt signal before reversing spindle direction
Is there a built-in way in LinuxCNC to delay or block a direction change until this signal becomes active? Or do I need to handle this myself, for example using HAL logic or some custom component?
I'm not aware of a built in solution but this could certainly be handled using HAL logic (or a custom component)
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18845
- Thank you received: 5203
01 Jul 2025 16:17 #331068
by PCW
Replied by PCW on topic Wait for spindle-halt signal before reversing spindle direction
Do you have a spindle encoder?
(it might be a bit easier in hal knowing the velocity)
Also maybe this could be done in the g code with
m5 m66
(it might be a bit easier in hal knowing the velocity)
Also maybe this could be done in the g code with
m5 m66
Please Log in or Create an account to join the conversation.
- workshop54
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 3
01 Jul 2025 19:15 #331073
by workshop54
Replied by workshop54 on topic Wait for spindle-halt signal before reversing spindle direction
In that case it seems like writing a custom component is the best choice.
I'm just getting into writing custom realtime components, so this might be a nice exersize.
I can post the link here when I'm done with it if you guys are interested.
I'm just getting into writing custom realtime components, so this might be a nice exersize.
I can post the link here when I'm done with it if you guys are interested.
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Platinum Member
-
Less
More
- Posts: 489
- Thank you received: 50
02 Jul 2025 17:15 - 02 Jul 2025 17:16 #331114
by langdons
Replied by langdons on topic Wait for spindle-halt signal before reversing spindle direction
This circuit will prevent the spindle direction from changing so long as the spindle is not stopped:
www3.langdonstaab.ca/Spindle%20direction%20circuit.png
(Just an idea)
www3.langdonstaab.ca/Spindle%20direction%20circuit.png
(Just an idea)
Last edit: 02 Jul 2025 17:16 by langdons. Reason: remov\ed accidental random backslash\
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Basic Configuration
- Wait for spindle-halt signal before reversing spindle direction
Time to create page: 0.090 seconds