Page 1 of 1

Door Switch

PostPosted: Mon Apr 29, 2024 3:34 am
by Delco
I am trying to impliment a door switch for a mill in a school enviroment.

I have a npn sensor on the door and have added a input trigger to activate when the door is open and the signal goes low by assigning stop gcode execution to that pin port setup.

It all works to stop gcode and the spindle BUT if the spindle command is executed with the door open then spindle will ramp up to speed. If I assign it to estop that works but the machine cant be jogged with the door open .

How can I assign a input trigger to ensure the spindle cannot be turned on but the machine can still be jogged so they can set zero with a piece of paper ?

Re: Door Switch

PostPosted: Mon Apr 29, 2024 10:35 am
by ger21
The proper way to do it is with a safety relay that kills all power when the door is open.

Re: Door Switch

PostPosted: Tue Apr 30, 2024 3:41 am
by cncdrive
You could write a macroloop, read your door switch input and check if the M3 is active then call the M5 button code, that will kill the M3 command before it could actually do the M3 switching.