Help with math overflow

rejoe.koshy

Member
Join Date
Dec 2011
Location
kolkata
Posts
195
Hey guys,
I have MLX LOGIX1400 running fine except that it faults sometimes on math over flow. I examined the program and spotted a counter and timer whose .PRE value was set to 32767 and subsequently deactivated the rung using a AFI bit but the fault seems to reappear .

I pretty sure that the program does not have any other issues..Just one thing .... some of the integer and binary data files read 32767 depending on the state of the individual bits...For example the data file B3:4 file has a decimal value of 32768 because the B3:4/15 is 1 and the rest is 0

Will this cause math overflow and fault the PLC ??...Moreover I wan to move the fault code when fault happens to a data file to compile a fault log in SCADA ..how can I achieve that??
 
Regarding including an unlatch instruction for the overflow bit in your program...... one company I know of that sends machines all over the world also includes an OTU instruction for the "Major Error Halted" bit at the end of the main program.
 
Regarding including an unlatch instruction for the overflow bit in your program...... one company I know of that sends machines all over the world also includes an OTU instruction for the "Major Error Halted" bit at the end of the main program.


Have ALWAYS done that!
Right or wrong it makes sure other programmers don't screw up my original programs. (y)
 
If you OTU the major error halted bit, do you effectively prevent the controller from faulting? At the downside of possibly making the program go haywire?
 
The only reason for the unlatch of the major error is to allow operational time to track down the source of the overflow errors. Determine the cause of each and modify the code to prevent them. If from an outside source modify that source to prevent this or redirect them to a separate address which can be examined and modified as need before being applied to the normal target location.


Be careful to understand the code. A customer of ours brought in an Allen Bradley 'expert' who viewed my code, saw a couple of N registers with negative values and decided that these couldn't be right. He zeroed them out bringing the machine to a halt. He didn't bother discovering that they were speed targets for normal reverse movement, in the servo we were using, during part of the machine operation.
 
As i mentioned earlier I need to know the error code due to which PLC faulted.I have some under-qualified technicians who just rest the PLC but cannot provide a feedback regarding the exact fault code..


Is there any way to move the code to a data file to be viewed later?
 
As i mentioned earlier I need to know the error code due to which PLC faulted.I have some under-qualified technicians who just rest the PLC but cannot provide a feedback regarding the exact fault code..


Is there any way to move the code to a data file to be viewed later?

I got some very good help along the same lines from the guys here. Takes quite a while to track it down. here is a link to the thread
http://www.plctalk.net/qanda/showthread.php?t=103129
 
Last edited:

Similar Topics

This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,362
Hello - you folks were kind in helping me the other day so I'm back for more... My program is finished however the end customer hasn't provided...
Replies
4
Views
1,933
Hey guys, I'm programming this stepper motor to go back and forth at two set angles. After programming, I realized that my program only works when...
Replies
8
Views
2,277
Hello all, I am trying to synchronize the speed of two motors so that once an operator sets them both where they want they can push a button that...
Replies
4
Views
2,711
I am taking a Simple SP which is in BCD and adding to that, When doing so I have noticed if the value is < 8 it works out fine, but if > 8 it...
Replies
4
Views
2,489
Back
Top Bottom