RSLogix 500 Math Overflow Trap S5:0

harleymc100

Member
Join Date
Jan 2014
Location
london
Posts
21
PLC errorrr.jpgHi 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 = 32760),
Program 1 faults (math overflow) but the other doesnt, and seems to max out the 32000 number to prevent a fault.
Is there a tick box im missing?

My logic basically is a blower that runs an on / off cycle. 999 minutes on and 1 minute off. Is there a better way to do this?
 
Last edited:
The largest integer number that an SLC-500 can handle is 32,767 so it correctly sets the Overflow flag when it multiplies a number greater than 546 by 60.

Can you provide more details on the program that doesn't seem to fault ?

One possibility is that you can account for/ deal with the Overflow by setting the Overflow status bit (S:0/5) to False with an OTU instruction before the end of the program.

Your program that doesn't fault the SLC might have that instruction in it. Some programmers do it as a matter of course, but I argue against that because it can conceal unintended consequences of the overflow condition.
 
Ken, you're absolutely right.

OTU S:5/0

This was in the "non faulting program" - Thanks so much. This is such a great resource.

So for future reference/learning. What is the "correct" way to address this issue? If for example, i wanted the drive on for 999 minutes and off for 1 minute. Series a few timers?

TIm
 
Ken, you're absolutely right.

So for future reference/learning. What is the "correct" way to address this issue? If for example, i wanted the drive on for 999 minutes and off for 1 minute. Series a few timers?

TIm

yes, divide HMI input by 2 and multiply by 60 and move value into 2 timer presets. When Timer 1 done then start Timer 2 when Timer 2 done then HMI Preset value has been met.
 

Similar Topics

Hi my problem may have a simple solution but i cant work it out. I need to use the Divide function but it wont let me use a decimal point in...
Replies
3
Views
1,745
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,242
I am trying to use the CPT instruction and apparently I can't quit get it right. I am trying to accomplish this equation. (( N25:4 * 1000 ) +...
Replies
10
Views
2,923
Hello everybody I'm new to plc programming and i'm trying to program some simple math operations to convert some measurments for a project. The...
Replies
8
Views
5,597
Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
87
Back
Top Bottom