Logix500 overflow trap

technolog

Lifetime Supporting Member
Join Date
May 2015
Location
Ohio
Posts
318
I'm re-writing some Logix500 code in Logix5000.

The original programmer is unconditionally unlatching the S2:5/0 Overflow Trap flag in the Main routine.
SOR OTU S:5/0 EOR


If it's possible, how do I replicate this in Logix5000?


* I tried to post as ladder by wrapping the copied rung in ladder quotes but it didn't seem to work. How do I post ladder?
 
Is the author also using the overflow trap in an HMI or other indicator ? If not, that's bad programming practice.

The good news is that a math overflow doesn't stop the ControlLogix with a Major Fault; it just logs a Minor Fault into the log. You can safely ignore that rung.

There's a detailed programming note that addresses Major and Minor faults and how to program their detection and logging.

Logix 5000 Controllers Major, Minor, and I/O Fault Programming, 1756-PM014
 
I see a lot of SLC programs with several S:x bits unlatched at the end of the program. I remember there was a tech note many years ago that said to do this when you have a badly handled math instruction set a major fault, so the resolution was to unlatch all those bits. Those programmers then added those to every program they wrote. Then it just kept multiplying like a virus.

Ken is right though. If you write the program correctly you wont need to do any unlatching of the bits.
 
I tried to post as ladder by wrapping the copied rung in ladder quotes but it didn't seem to work. How do I post ladder?

Two ways I've done it:

1. (on a Windows system) do a print screen; open Paint; select Paste, which will load the image saved in step 1; you can save the image as is and attach it to your post in the 'post reply' window, or, if only the ladder is pertinent, crop the unneeded portion and save the remaining and attach as above. Be sure to zoom the image large enough that others can distinguish things like element addresses in the final image.

b. print the ladder using report options and select a pdf file as the output device. You can probably omit the header, file list, etc. Attach the resulting file in your post reply.

You can also attach a zipped version of the file and attach that to your post. This method narrows the number of people who can view your ladder.
 
It might be a good program practice with a little modification. You might miss some possible way of having an overflow, so the answer to best practice becomes: Is it better to unlatch the bit and keep running or shut down a messy process and make a bunch of back-work and waste?

If I do unlatch the overflow bit in a SLC or Micrologix, I first latch my own copy of that bit which is tied to a SCADA or HMI so at least there is evidence that at least once, somewhere some math must have went afoul.

Reason: There was a case where we were moving floats to and from integers across a message block where somehow the message either did not complete or the data was corrupted and still succeeded in getting partially across. My theory at the time was that the MSG happen to complete and alter the data in the middle of the COP instruction, but I thought I had coded to prevent that. I also thought I had all my math ducks in a row throughout the medium sized PLC program, but when I copied two ints into a float, the CPU did not like the resulting bit pattern, shut down the line and made several operators unhappy with me.

As Ken said, though, you need not fret this in the Logix5000 world.
 
Last edited:

Similar Topics

I've got a Micrologix 1100 with ethernet and I'm trying to configure communications to a Fanuc R30iB controller. I'm pretty sure you have to set...
Replies
0
Views
99
So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
537
Hello, I'm new to programming. I'm using RSLogix500 to modify an existing program for a SLC500. My plan was to use one of the existing inputs...
Replies
26
Views
1,974
Hi Newbie here :yeah: Can one of you experts help me with setting up a simple BTR and BTW to just test 4 analogue inputs 4-20ma (1974-if4i)...
Replies
11
Views
995
So i have an allen bradley rack (2080-LC50-24QWB), i have it connected through ethernet. I dont have an offline program so im trying to upload...
Replies
6
Views
674
Back
Top Bottom