Wait for spindle-halt signal before reversing spindle direction

More
01 Jul 2025 06:38 #331058 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.

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

More
01 Jul 2025 13:08 #331065 by Aciera


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.

More
01 Jul 2025 16:17 #331068 by PCW
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 

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

More
01 Jul 2025 19:15 #331073 by workshop54
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.

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

More
02 Jul 2025 17:15 - 02 Jul 2025 17:16 #331114 by langdons
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)
Attachments:
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.

Time to create page: 0.090 seconds
Powered by Kunena Forum