EasyManuals Logo
Home>Allen-Bradley>Controller>Logix5000

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #653 background imageLoading...
Page #653 background image
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 653
Common Attributes Appendix A
REAL to an Integer
To convert a REAL value to an integer value, the controller rounds the fractional
part and truncates the upper portion of the non-fractional part. If data is lost, the
controller sets the overflow status flag. Numbers round as in the following
examples.
• Numbers other than x.5 round to the nearest whole number.
• X.5 rounds to the nearest even number.
The following example shows the result of converting REAL values to DINT
values.
EXAMPLE
Conversion of REAL values to DINT values
EXAMPLE
The arithmetic status flags are set based on the value being
stored. Instructions that normally do not affect arithmetic
status keywords might appear to do so if type conversion
occurs because of mixed data types for the instruction
parameters. The type conversion process sets the arithmetic
status keywords.
This REAL value Converts to this DINT value
-2.5 -2
-1.6 -2
-1.5 -2
-1.4 -1
1.4 1
1.5 2
1.6 2
2.5 2

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals