lamboom

Using the NJ to stop motion if Error or Fault

11 posts in this topic

I’m using a Omron NJ to manage a LinMot linear motor .. all is going very well; however, there have been a few times during this development phase when the actuator, or programming creates a fault, perhaps from a following error, or exceeding a limit.  The result is sometimes scary.  The actuator might accelerate into a hard stop.  Not a big deal, the ends are protected with Sorbothane, so it isn’t a big problem .. yet.  Once the system is correctly programmed, it shouldn’t ever accelerate an actuator into the hard stops.

In spite of my newbie-ness  to Omron programming I’m aware of the need to employ error & fault action that will stop a run-away actuator in closed-loop control, rather quickly. Just how to do that.. has evaded my research.

I’ve noticed:  “FaultHandler”  in the W507 & W508 Manuals. And, been quite frustrated to not find any reference to FaultHandler or FaultHandeler()  .. which kinda suggests it’s a program?… and also expected to get some clues in the "NJ Programming Best Practices V1.1”  

so far… no luck.

Perhaps I’m going about this all wrong..  The LinMot Driver Controller might be the way to go.. An error message from the NJ to the LinMot drive would quickly shut down movement in closed loop .. instead of turning the motor into a rail gun… :-)

Any suggestions at how to do it with the NJ,  would be greatly appreciated.. Thanks Regards, Michael

PS: here’s the progress so far, thanks to many out there, and on this forum ...

https://www.youtube.com/embed/B0UGm9JTw3U?rel=0

 

Share this post


Link to post
Share on other sites

They are referring to FaultHandler() as a program that you (the programmer) would create.

In my case, I've created a Faults section at the end of each axis program that will either MC_Stop, (where you can specify a deceleration), or an MC_ImmediateStop, (where you can specify and auto reset or disable). Their example shows a Function Block. I don't see the difference really unless it were programmed as an interrupt.

I do find their examples a bit confusing.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for the reply IO

Duh!  I get it!    I'm just too used to the machine providing all the programming, and i just select the little blocks and paste them into ladder diagrams ... (actually, I have quite a bit os ST in my wave tank programs.   Now that you mention it ... it should have been obvious.  There must be a "Best Practices in programming" somewhere in their thousands of pages, and hundreds of manuals ... I think they did a good job for the beginnings of programs, but not so good for ending them.    For the moment, I'll assume I just missed it.  Thanks again for the wise solution.. :-)    Regards, Michael

Share this post


Link to post
Share on other sites

This looks like the only Omron source of info on this subject: Pages 10-19 to 10-22 of Omron manual W507 CPU Unit ..Chapter 10, Sample programming: Stopping an axis during single axis operation:

5a5698ecc74a2_AdobeReaderScreenSnapz008.

You can see the 'FaultHandler" Program at the top .. activated by MC_Axis000.MFaultLvl.Active  (which is TRUE when there's a minor fault level for axis 0)

As IO_Rack says .. It's a user program .. you just do whatever you want when there's a fault ..  But, it's not what is at the bottom of this example program .. which is more what IO_Rack is talking about, only the use of MC_Stop and MC_ImmediateStop is still involved at this program's end .. and is separate from the "FaultHandler" line.   (which is "Device" related)

Because I already use MC_Stop in my programs,  I find this example very confusing because MC_ImmediateStop is shown linked to MC_Stop's "Stp_Err" and "Stp_Ca"

OK..unless someone says otherwise, I will just connect MC_Axis000.MFaultLvl.Active  to the Execute input of IMD_STP .. that will be my "FaultHandler"

I just got a similar suggestion from LinMot support, with the additional consideration of Axis settings: "Other Operation" and "Limit Settings" need some attention.     Thanks all... Regards, Michael

Edited by lamboom

Share this post


Link to post
Share on other sites
13 hours ago, lamboom said:

This looks like the only Omron source of info on this subject: Pages 10-19 to 10-22 of Omron manual W507 CPU Unit ..Chapter 10, Sample programming: Stopping an axis during single axis operation:

Sorry, I meant to post that so you wouldn't have to search for it.

 

13 hours ago, lamboom said:

Because I already use MC_Stop in my programs,  I find this example very confusing because MC_ImmediateStop is shown linked to MC_Stop's "Stp_Err" and "Stp_Ca"

This was the confusion I was eluding to. I forget what happens if the MC_Stop instruction fails. There may be good reason to issue the MC_ImmediateStop in this case. I'll have to revisit this when I get time.

In many years of working with Omron equipment, I've found it is very typical of them to give us (the programmers) the flexibility to control things as we wish. Meaning there are few easy buttons that will run a series of events. There may be an event that don't wish to happen. Fault handling can be very touchy sometimes. It's always been a very important subject in any programming language. This is why I chose the 'catch all' and just stopped the drives. I'll use the associated bits and words to display the particular reason and to choose how to proceed.

 

1 person likes this

Share this post


Link to post
Share on other sites

IO  ...Thanks again    I had to search to figure out why I didn't find it the first time.  So much of the Omron manuals provide information in a minimal, intuitive nature.  I understand .. when you have a 1700 page manual, fewer words can be beneficial if you are going to print the thing; however, today it really doesn't matter how large the manual is.  17,000 pages if fine, a computer doesn't care .. and you have a "search" routine to find anything fast.

The "problem" is me .. I'm not an automation engineer, but I play one in my lab ... and with the help of good, understanding people on this forum, and others, I will soon complete a project that took several years to optimize.

so, the solution is simply this?:

MC_ImmediateStop.jpg.e8c541973f237965d8f

Perhaps I'll add those "Stp_Err" and "Stp_Ca" .. thanks to your latest explanation, can't hurt.    My machine will be run by humans, nothing automatic about it .. what could go wrong!

Edited by lamboom

Share this post


Link to post
Share on other sites

MC_Stop includes deceleration, and is your normal method to stop an axis.  I have never seen a case where that function block creates and error.

MC_ImmediateStop does not include deceleration.  It's an instant hard stop.  And MC_ImmediateStop will always place the axis in error when done, to prevent further operation until MC_Reset is issued.  It can also be configured to turn the servo off or reset following error when it completes.  

That's all in the programming manual details for the function blocks.

I can't think of a single reason to have the output from the stop block trigger the immediate stop block.  That example seems fairly stupid.  Keep in mind too that when an axis shows an error, it likely is already stopped or being stopped.  They don't run with a minor fault, but can with an observation.

1 person likes this

Share this post


Link to post
Share on other sites

Hay  Crossbow .. always nice to get your take on things.    I started this thread because I wasn't getting proper stops when errors occurred .. what I got was an attempt to fire the LinMot slider into the next county!     I'm going to try this with the MC_Stop errors included .. what could go wrong.. :-)

MC_ImmediateStop_002.jpg.a38c5bbbda96320

 

Share this post


Link to post
Share on other sites

I don't think it will cause a problem.  I recall you said the LinMot acted strangely.  I'm curious what the results will be, but can't imagine it would hurt anything.  With the immediate stop, try using the immediate stop and servo off, that should prevent any motion once it decels to a stop.

Share this post


Link to post
Share on other sites

It seems to be working fine ... sort-of  

However It isn't stopping the actuator when there's a following error.. and the servo is being turned off too when there's a fault.  That might be the problem.. Ya gotta have the servo on in order to stop the slider.  Then turn it off "only" if the slider is stopped.  It should take only a millisecond to stop the thing.   As of this time.. problem is not resolved.

  There might be good support at LinMot now that there is an Omron Automation engineer there.  He gave me the same solution IO did about a day after IO posted his reply.

I didn't expect a solution from LinMot, and was quite surprised .. I believed this was a Omron NJ problem... or, a problem with my program, and the communication between the LinMot drive and the NJ.   

So far, following errors are tending to slam the slider into the hard stop, as a solution to an error.   That doesn't happen with the Delta Motion,  motion controller... it just stops the slider instantly, when there's an important error.

Will get back to you & IO when I figure out what's going on... thanks.

One more thing.. sometimes the  MC_ImmediateFault is activated and the LinMot Drive is left ON!  So much for stopping the Drive.

I'm thinking this Function Block has no effect on the LinMot drive..the only thing that is stopping the drive is when there is the eventual error caused by a programming error in the  NJ, and the result being the slider slamming into the hard stop.. now you have a "drive error"... and the drive shuts off.

Edited by lamboom
To add more info...

Share this post


Link to post
Share on other sites

Here's some Axis Settings .. in case anyone out there has worked with LinMot5a594ecc7a5e3_AxisSettings001.jpg.dc7b3f:

5a594eda6624b_AxisSettings_002.jpg.25668

5a594eebdd3ac_AxisSettings_003.jpg.5b5da

5a594ef9c8f79_AxisSettings_004.jpg.54d0e

Have been getting too many following errors .. so the limits are high.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now