Emergency Stop For A Stepper Motor During Timer Stop


adamc

Recommended Posts

Hi all,

 

I am driving a stepper motor by a user defined number of pulses with a U3-HV using FreqOut and Timerstop. All is working well, except I would like to know if there is any way to interrupt the timerstop sequence in response to an emergency stop button being pushed, i.e. is there a way to interrupt the pulsetrain immediately rather than waiting for it to finish the timerstop number of pulses?

 

Thanks in advance,

Clayton

Link to comment
Share on other sites

E-stops should never go through logic.  That means they shouldn't be wired into a PLC or PC and then that device stops your system.  They should instead be hardwired into the system and either cut power or the pulse train directly (less good).  The best way is to cut power to the steppers (and probably other parts of your system).  Then you are sure that nothing is going to move anymore, plus you lose the holding power of the steppers, thus avoiding continued pressure into whatever you didn't want to happen.  Having the estop tell DAQFactory to stop the LabJack from generating more pulses is a bad design through and through because there is no way that will be 100% reliable.  99% maybe, but not 100%

 

To give an example, I just setup a CNC router for the local science museum.  It had 3 steppers for the CNC, plus the 3 phase 2.2kw spindle.  There were three e-stops littered around the machine.  The power for the spindle and the steppers was all run through a e-stop certified relay of appropriate size (note this is not a standard relay, but designed for estops).  It had 4 NO contacts, and 2 NC contacts.  The power ran through the 4 NO contacts (3 for 3 phases, 1 for the stepper).  The relay was powered by a 24VAC power supply, but that power ran through each of the three e-stops in series, so that if any of the estops were pressed, the 24VAC was cut and the relay would lose power.  The NO contacts would open and the power to the steppers and spindle would be cut.   If one of the EStop wires was accidently cut, the power would be cut.  And most importantly, even if the PC that was driving the CNC (not using DAQFactory) hung, one could still press any estop and it would work properly.  The NC contacts were wired into a digital input on the PC to tell the software that the estop was triggered, but the estop DID NOT rely on the PC to function.  (the second NC simply connected to a light to tell the operator that one of the estops was triggered).

 

I needed the relay because of the power requirements for the spindle.  If I was, say, doing a CNC vinyl cutter and so only had to stop the steppers, I could probably just run the power for the CNCs through the estop switches directly since the switches could handle the current.

 

Note that what I described was the solution for my particular application and may not be appropriate for yours.  I am not giving you advice on how your system should be setup and can't be responsible for it.  If you don't feel comfortable with doing your estop, get professional help from someone local who can actually see your system, don't just rely on information from the Internet.  (sorry for the legal disclaimer  :)

 

The one thing you should get out of this post is that you NEVER, EVER run emergency stops through logic systems, which includes PLCs.  If said professional tells you otherwise, fire them!  If no one could get hurt, or no property damaged by the failure of the stop, then its not really an emergency stop and shouldn't be called such. 

Link to comment
Share on other sites

Thanks for your quick response. My application is a micro tensile tester which fits on a microscope stage and is driven by a 2400:1 geared stepper. The tests performed are all under displacement control, and typically involve total displacements of 3mm at very slow rates (10mm/min maximum). Maximum forces are less than 100N. So in this application the e-stop is not an emergency stop in the sense of there being any danger to humans, but in the sense of wanting to stop the test prior to the end of the pulse sequence in case of specimen breakage, grip slippage, etc.

Implementing such an interrupt via software is obviously not acceptable when the emergency stop is a safety feature as you said.

Perhaps I should not have used the term 'emergency' stop as it is not a safety feature in my application. However the question remains, is it possible to interrupt a timer stop pulse sequence?

Thanks again for the rapid response.

Link to comment
Share on other sites

Sorry, when someone says "emergency stop" I feel a responsibility to give the lecture I gave you.  That said, most everyone I give the lecture to already has the proper safeties in place, but occasionally someone hasn't thought through it or doesn't have the experience and is glad I brought it up.

 

As to the question of interupting the timer pulse train, we'll have to let the LabJack guys answer that one as its a device issue.

Link to comment
Share on other sites

One way to stop the pulse output on demand is to disable the timer.  So if you have previously set LJ_chNUMBER_TIMERS_ENABLED=1, then when you want to stop to output set LJ_chNUMBER_TIMERS_ENABLED=0.

 

Now what if you have LJ_chNUMBER_TIMERS_ENABLED=2, and you only want to stop Timer0 without causing Timer1 to move its location?  In that case, I suggest you change the mode of Timer0 to some input mode such as LJ_tmSYSTIMERLOW.

 

http://labjack.com/support/u3/users-guide/4.3.6

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.