12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

640 Common AttributesREAL to an integerTo convert a REAL value to an integer value, the controller rounds thefractional part and truncates the upper portion of the non-fractionalpart. If data is lost, the controller sets the overflow status flag.Numbers round as follows:• Numbers other than x.5 round to the nearest whole number.• X.5 rounds to the nearest even number.The following example show the result of converting REAL values toDINT values.EXAMPLEConversion of REAL values to DINT valuesThis REAL ValueConverts To This DINT Value-2.5 -2-1.6 -2-1.5 -2-1.4 -11.4 11.5 21.6 22.5 2IMPORTANTThe arithmetic status flags are set based on the value beingstored. <strong>Instructions</strong> that normally do not affect arithmeticstatus keywords might appear to do so if type conversionoccurs because of mixed data types for the instructionparameters. The type conversion process sets the arithmeticstatus keywords.Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!