Inhibit spindle when door is open

More
02 Sep 2022 16:51 - 02 Sep 2022 16:54 #251026 by samp20
I'm currently retrofitting an ICP 4030 CNC mill with LinuxCNC. One of its features is a door with a switch that opens when the door is opened. I'd like to use this to ensure the spindle cannot be spun up while the door is open. I have a plan which I think will work, although I'd like to check there isn't anything I've overlooked:
  • Ensure the door switch electrically inhibits the run signal to the VFD. This'll stop the spindle regardless of what the software does.
  • In addition wire this switch to another GPIO pin. I'll likely do this with two optocouplers, one for the VFD and another for LinuxCNC.
  • In software wire this to the reset pin of a flipflop and the out-not pin to motion.feed-inhibit.
  • Wire the spindle at-speed pin ORd with the inverted run signal to the set pin of the flipflop. This'll ensure the inhibit is reset when the spindle reaches speed, or when LinuxCNC doesn't intend to use the spindle anyway.
I think the above is enough to stop the spindle and motion while the door is open, and prevent the program/MDI command from continuing until the spindle is back up to speed. From what I understand feed-inhibit doesn't affect manual jogging so you can still move the axes around

 
Last edit: 02 Sep 2022 16:54 by samp20. Reason: Fix flipflop reset

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

More
02 Sep 2022 16:58 #251028 by cmorley
There is also spindle.N.inhibit

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

More
03 Sep 2022 04:26 #251079 by rodw
It really should be part of your safety relay circuit outside of linuxcnc

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

More
03 Sep 2022 08:44 #251087 by andypugh
Are you 100% sure that you never want the spindle to turn with the door open? It will depend on your use of the machine, but if this is a home shop environment you might want to polish / file work in the spindle by hand. In that case you might want to inhibit G-code but allow the spindle to be operated manually.

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

More
03 Sep 2022 11:18 #251096 by samp20
I did consider connecting it to the E-Stop circuit outside of LinuxCNC. I do still want the ability to open the door in the middle of a program to do a tool change for example. The door does have a solenoid latch too (power to release), so I could lock the door when a program is running and use the switch to trip the VFD contactor. It'll become a full E-Stop instead of a temporary pause as the lock would have obviously been bypassed.

As for wanting the spindle running when the door is open, absolutely not. This is going to be in a hackspace environment, so I want to take all reasonable steps towards making it as safe as possible.

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

More
03 Sep 2022 17:07 #251109 by samp20
I went with wiring the door switch electrically in series with the run signal for now as this ensures the VFD decelerates the spindle quickly. In the future I probably will add a time delayed safety relay to kill the VFD power too. The feed inhibit logic is also doing its job, ensuring the spindle is back up to speed before resuming the program (I'm not so worried about this being software based as the axes aren't particularly powerful).

This is a nice-to-have, but is it possible to disable any run commands using the HAL? Something similar to the errors "Can't run a program/issue MDI command when not homed". At the moment a user could queue up multiple MDI commands by accident and have them all run at once as soon as the door is closed. If this doesn't exist then would a pull-request for this feature be worthwhile?

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

Time to create page: 0.158 seconds
Powered by Kunena Forum