Yes, I know. This topic seems to be beat to death, but usually the answer is "just don't". I have a situation where we're checking to see if a weight is within tolerance in the PLC, then sending the weight and the pass/fail to a database. Since the pass/fail check is performed on the PLC, we need to round the weight to the tenths decimal place (xxx.y) before we perform the check. I want the result to follow "normal" rounding, not half to even. My plan is this:
ADD .055 to Weight
MUL Weight by 10
TRN Weight
DIV Weight by 10
Am I missing any edge cases where this won't work? Thanks for your input.
ADD .055 to Weight
MUL Weight by 10
TRN Weight
DIV Weight by 10
Am I missing any edge cases where this won't work? Thanks for your input.