Inhibit spindle when door is open
02 Sep 2022 16:51 - 02 Sep 2022 16:54 #251026
by samp20
Inhibit spindle when door is open was created 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.
Last edit: 02 Sep 2022 16:54 by samp20. Reason: Fix flipflop reset
Please Log in or Create an account to join the conversation.
02 Sep 2022 16:58 #251028
by cmorley
Replied by cmorley on topic Inhibit spindle when door is open
There is also spindle.N.inhibit
Please Log in or Create an account to join the conversation.
03 Sep 2022 04:26 #251079
by rodw
Replied by rodw on topic Inhibit spindle when door is open
It really should be part of your safety relay circuit outside of linuxcnc
Please Log in or Create an account to join the conversation.
03 Sep 2022 08:44 #251087
by andypugh
Replied by andypugh on topic Inhibit spindle when door is open
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.
03 Sep 2022 11:18 #251096
by samp20
Replied by samp20 on topic Inhibit spindle when door is open
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.
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.
03 Sep 2022 17:07 #251109
by samp20
Replied by samp20 on topic Inhibit spindle when door is open
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?
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.081 seconds