
Originally Posted by
Neale
It all gets just a bit more complicated than this. One issue is that you have your stepper drivers powered on by the safety relay. That means that the fault outputs on the drivers are the equivalent of open circuit, as they are unpowered until you have energised the safety relay. However, if you wire the fault outputs in series with the e-stop switches (p9 in the CSMIO manual shows this) then you can't activate the safety relay as it thinks that an e-stop condition exists (via the driver fault outputs) but you can't turn those on until you have put power on the drivers. Catch-22.
I have virtually the same setup as yours - Pilz safety relay (different model, but that's not important), CSMIO, digital drivers (mine are EM806 not AM882 but again no practical difference for this purpose) and power to stepper driver PSU controlled by relay controlled by safety relay. What I have done is:
safety relay uses three contacts - two of the N/O and one N/C. One N/O contact switches 24V to pin 1 on CSMIO, configured as "e-stop". This puts the CSMIO into e-stop mode when the safety relay is off. One N/O contact switches 24V to the stepper driver PSU relay (like you have done). So, no power to motors unless safety relay is on. The N/C contact switches 5V to the enable inputs on the drivers. With the relay off, this disables the drivers. Once the relay is energised, 5V is removed and the drives are enabled. So, when you hit e-stop, you remove power from the steppers, tell the CSMIO to go into e-stop, and disable the drivers.
To get round the problems with the fault signal from the drivers, I take these in parallel directly to the CSMIO, pin 2, configured as "Drive Fault". The CSMIO monitors this input specifically for this kind of situation and processes the signal without needing to talk to Mach3. I do this by taking 24V to the + side of the fault connections (all in parallel) and the - sides to the CSMIO, so when a fault occurs the internal "switch" closes, puts 24V on the CSMIO pin. The corresponding CSMIO pin 15 is taken to ground.
All I can say is, it all works! On a stall signal, the CSMIO stops the machine immediately via its own firmware. However, the safety relay is still energised. To get the driver(s) out of the fault condition, I hit e-stop which removes power, then hit reset to re-energise the relay and hence everything else. After a stall, you are going to need to rehome anyway, which is what Mach3 makes you do after an e-stop.
I did consider reprogramming the EM806 (and you can do the same with the AM882, I believe) to change the sense of the fault output, so in effect the "switches" on the fault output were closed for normal operation instead of open. However, you still have the problem that you have to keep the drivers powered because otherwise the fault outputs look like open switches. I took the easy route of keeping them programmed as the default, so they "close" on a fault. I have them wired in parallel so any fault output takes the CSMIO pin to 24V. At the cost of more complication, I could run the fault signals into the safety relay and in principle this would be slightly more fault-tolerant, but I accept the compromise.
My main power switch operates on all power coming in to the box. I turn that on at the start of a session and don't touch it again. I have reset and e-stop switches on the box, plus two e-stops around the machine. The safety relay does the job of resetting the drivers via the driver PSU, as explained above. I don't have a separate power switch for the driver PSU.
Bookmarks