Hello Guest it is October 25, 2021, 09:46:05 AM

Author Topic: Customisation of E-Stop / Reset button actions (Spindle Relays)  (Read 1091 times)

0 Members and 1 Guest are viewing this topic.

Hi there,
Is it possible to customise what happens when Mach3 is E-stopped / reset, either via software button or via hardware input pin/switch?

I think currently when it is pressed all outputs are disabled in one go. This would normally be fine, however the reason I ask is because of how my spindle reverse is implemented.
Currently... I have 0-10V analog output to a VSD via a PWM speed output from Mach. Then I have two relays... one SGR // Spindle Go Relay, to enable power to the motor. Then a second relay SRR // Spindle Reverse Relay (a DPDT motor reversing relay) to determine the direction of rotation.

I've written M3, M4 and M5 macros to correctly handle the changeover from CW to CCW under all conditions safety. i.e. the logic and delays for spin up / spin down, and direction selection. Any wrong combination = bad news for the spindle drive.

This all works perfectly for now.
However when E-stop I have identified a potentially problem.
If the spindle is going CW // M3, and e-stop is pressed... Mach3 kills the outputs to all pins, the SGR is disengaged and the spindle stops / disabled.
HOWEVER... if the spindle is going CCW // M4 and the e-stop is pressed... Mach3 again kills all outputs (even the SRR relay). Which will case the relay to change over its poles and try and dump the energy stored in the running spindle.
This is obviously really bad.

So the question:
How can I get Mach3 to do it's e-stop / reset thing as normal with the exception of ignoring the state of one output?

OR... do I rip out the current spindle relay setup and try and implement the Mach3 spindle logic in timers and relays to make it "foolproof"?

All the best,

Offline Tweakie.CNC

  • *
  •  8,835 8,835
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Customisation of E-Stop / Reset button actions (Spindle Relays)
« Reply #1 on: July 05, 2018, 07:21:27 AM »
Hi Dan,

I am not sure there is a way so to be safe, if it was me, I would modify the current relay configuration to make it 'foolproof'.


Re: Customisation of E-Stop / Reset button actions (Spindle Relays)
« Reply #2 on: July 05, 2018, 04:52:59 PM »
No problem - thanks anyway.

I think fitting an Off Delay relay inline with the reversing relay signal will sort it.

All the best,
Re: Customisation of E-Stop / Reset button actions (Spindle Relays)
« Reply #3 on: July 12, 2018, 08:11:17 AM »
I'd go down the foolproofed route with M3 and M4 controlling each side of a properly interlocked motor reversing contactor. That way the problem you describe is impossible - You can have either or neither, never both. pop this between the drive and the motor and you should be good.

I much prefer hardware solutions. They're easy to troubleshoot and they rarely if ever crap themselves and go mad.