Math Overflow Fault

John ...

I just got a chance to skim through your program ...

bad_math.JPG


this rung might be your problem ... if it isn't, at least this is a good example of what the real culprit will look like ...

basic idea: the box N9:112 is already "FULL UP" at 32767 ... when the ADD instruction tries to increase the value by adding another 1, an "overflow" condition is created ...

note that you could also create a problem by trying to subtract another 1 from a value such as -32768 ...
 
Last edited:
Yes, there are several places where N's are 32767 or -32768... Those are out of range!! That rung above, plus those mentioned in post 9.

What are those things counting?? If you'll reset those or put a "GEQ N9:112 32766 MOV 32766 N9:112" (for rung 131) to limit those values to legitimate values, your problem will be resolved.

But what are they counting? Are they things that are truly interesting to count? Or merely "information"? If you don't need those values, get rid of them. If you just reset them now, they'll just come back again.
 
yes, as OZEE mentioned, it looks like back in post #9 Keith had already pointed out the same rung that I came up with - and some others ... sorry that I didn’t catch that earlier ... I’m just browsing through the forum while doing some paying projects ... sorry for any repetition ...

and of course OZEE is right ... you need to track down those "overflowed" values and find out what (if anything) they are actually used for ...
 
A real big thanks to all who responded. I get so used to just working on things that I write when I get something like this it kinda overwhelms me for a bit. With you guys help I feel like I have a good handle on it now.

Thanks

John
 
John, we've all been there. And there's lots of good experience here and lots of people willing to help.

Welcome aboard!!
 
When I first uploaded the program I did a holy cow what is this mess... I hope you have the disk. I got a deer in the headlights look from the new maintance manager/production manager...

Thanks again for the help.

John
 
Generally math errors are generated by counters/RTO's that have exceeded their PRE values. Check the data tables and see if any of the accumulated values exceed their preset values.
 

Similar Topics

Hi I need help solving this Fault Code 20h (Math Overflow Trap S5:0). I download the code into the ML 1400 PLC. When choosing RUN it gives me a...
Replies
22
Views
17,282
I have Logix v21 running in Emulate. I am getting runtime faults at random times, typically it takes anywhere from 30 seconds to 5 minutes for...
Replies
7
Views
2,136
Hi Gurus I have an issue with 2 similar programs. One faults and the other doesnt. When i enter a number on the HMI larger than 546 ( MUL x 60 =...
Replies
3
Views
3,420
Hey guys, I have MLX LOGIX1400 running fine except that it faults sometimes on math over flow. I examined the program and spotted a...
Replies
8
Views
2,327
We are getting a fault...... Math Overflow Trap S:5/0 = 1 Apparently we are getting a value greater than 32767 or less than -32766. If...
Replies
6
Views
7,838
Back
Top Bottom