The issue about rounding "differences" in Logix5000 will only come into effect if the math has been performed to float precision, rounding only ever occurs if a float value has to be stored in an integer destination. Integer math does not suffer from the (some people think strange) rounding method....
Let me explain....
If
ALL of the operands of a math instruction (and that includes calculations within square brackets for indirection) are of an integer data-type, then the processor will use the fast integer math internal routines to determine the result, which will
ALWAYS return a truncated result. Integer math has no concept of fractional results - hence 5/2 = 2, 10/6 = 1
If
ANY ONE OR MORE of the operands, source or destination, of a math instruction (and that includes calculations within square brackets for indirection) are of REAL data-type, then all of the operands are internally converted to REAL, and the slower float math internal routines are used. The result will be a float value. Then the instruction that invoked the math will determine what to do with the float result, and if it needs to be converted back to an integer, to be stored in an integer type tag
or to be used as an indirect address, then the processor will invoke its "banker's" or "round-to-even" algorithm. The following shows the effects of this rounding method
Code:
DIV, 7, 2 = 3.5 ; destination is a REAL
DIV, 7, 2 = 3 ; destination is an xINT
DIV, 7.0, 2 = 4 ; destination is an xINT
DIV, 9, 2 = 4.5 ; destination is a REAL
DIV, 9, 2 = 4 ; destination is an xINT
DIV, 9.0, 2 = 4 ; destination is an xINT