Implementing stall protection with closed loop steppers

More
10 Nov 2019 11:33 #150050 by minimax
Hi all,

I am into the adventure of building a DIY wood router for my workshop, it is already running nicely although I have still plenty to do to bring it into full operation state. In particular, since I have two synchronous motors on the gantry, I badly need to implement a stall protection which would disable all motors in case any of them would stall. Electronics is clearly my weak spot in this project, so I am pretty unsure about my judgment when it comes to wiring's.

In a nutshell, here is my machine setup:
> 3 axis mill with a synchronized gantry (XYYZ joints)
> 4x closed loop steppers and dedicated drivers.
> LinuxCNC controller
> For now I am playing with a cheap BOB, but as soon as I feel ready for it I will switch to a MESA 7i76e.
> PNP proximity switches for homing and limits.

As said above my target is basically to stop all operations if ever one motor stalls. Probably I can use the closed loop encoder signal, but I really don't know what is the "best practice" way to do it. For instance would it be better to relay an error signal to the BOB and trigger an emergency stop, or to wire somehow the four drivers together such that they all share a same "error state"?

I should mention that the drivers have an [alarm+,alarm-] output which is active when in following error state (+ other errors), and a [pending+,pending-] output which is active when "actual position equals command position". There is also an [enable+,enable-] input which is said to be an "NPN control signal", enable is active when high (and when disconnected).

Would it maybe be enough to wire in parallel somehow all drivers [enable] inputs with all [pending] outputs ? Although I am not sure how to do this well...

Thanks in advance for your help,
Cheers

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

More
10 Nov 2019 12:09 #150053 by tommylight
It looks like the error outputs are optocouplers, so most probably they can be wired in parallel and still function properly, but you loose the ability to know what axis caused the error, for that they do need separate inputs.
Enable inputs can be wired to the same output. Leave the :pending: unconnected as i have no idea what it does.

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

More
10 Nov 2019 12:43 #150056 by minimax
If i understand well, the pending output is a logical "not in following error" signal, while :alarm has a wider error scope. Anyway it makes indeed more sens to use the alarm output as a blocking signal.

Still I am not sure how to proceed with the wiring setup since alarm is active high but enable must be pulled down for the driver to be disabled. Should I use a diode circuitry ?

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

More
10 Nov 2019 12:54 #150057 by tommylight
Pending seems to be like "not yet in position".
Yes, use the alarm output.
You can use the invert function in Linuxcnc for enable, but that leaves it active until Linuxcnc is started. Using a transistor and resistor in inverter mode is much better, but that will complicate things a bit.

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

More
11 Nov 2019 15:30 #150127 by andypugh
LinuxCNC has an "amp-fault" pin for each axis.

joint.N.amp−fault−in

linuxcnc.org/docs/2.8/html/man/man9/motion.9.html

This is the place to connect the fault outputs from the drive.
(if you are short of pins, then you can parallel them all in to one input, but then you won't know which joint has stalled)

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

More
13 May 2020 07:45 #167616 by theshade
Reading this thread, I was asking what this pending or arrival signal was to a closed loop server driver manufacturer and the answer was:

PEND- PEND+
"Arrival output signal: When the difference between the position of pulse command which output from the upper controller and the current position of stepper servo motor is less than the setting data, the arrival signal will be outputted. Then the upper controller receive this signal to confirm the completion of the in position."

How and why would one need these in linuxCNC.. would it be able to impact on the g-command execution or be used in anotherway. or is it just not useable in linuxCNC?

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

More
13 May 2020 07:56 #167617 by tommylight
Most probably that is for use with PLC.
PLC sends the command to move to a preprogramed position and the drive sends back the signal that it arrived at that position, so the PLC has to wait till that signal is in, after that the other stuff can be controlled from PLC.
Just a stab in the dark, so do not take this as the ultimate answer.
The following user(s) said Thank You: theshade

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

More
13 May 2020 08:04 #167621 by rodw
I agree with Tommy. There are many more motors used in industry than in CNC so many controllers have features to run in an industrial sense but the motion control features are not used with Linuxcnc becasue Linuxcnc IS THE MOTION CONTROLLER
The following user(s) said Thank You: tommylight, theshade

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

Time to create page: 0.173 seconds
Powered by Kunena Forum