Common attributes for Motion instructions
668 Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018
Conversion Result
larger integer to smaller integer The controller truncates the upper portion of the larger integer and generates an overflow.
For example:
Decimal Binary
DINT 65,665 0000_0000_0000_0001_0000_0000_1000_0001
INT 129 0000_0000_1000_0001
SINT -127 1000_0001
SINT or INT to REAL No data precision is lost
DINT to REAL Data precision could be lost. Both data types store data in 32 bits, but the REAL type uses some of its 32 bits to store
the exponent value. If precision is lost, the controller takes it from the least-significant portion of the DINT.
REAL to integer 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.
Rounding is to the nearest whole number:
less than 0.5, round down; equal to 0.5, round to nearest even integer; greater than 0.5, round up
For example:
REAL (source) DINT (result)
1.6 2
-1.6 -2
1.5 2
-1.5 -2
1.4 1
-1.4 -1
2.5 2
-2.5 -2
You cannot convert data to or from the BOOL data type.
Important: The math status flags are set based on the value being stored. Instructions that normally do not affect math 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 math status keywords.
Safety Data Types
The Logix Designer application prevents the modification of a User Defined or
Add-On Defined type that would cause an invalid data type for User Defined or
Add-On Defined types that are referenced directly or indirectly by a Safety tag.
(This includes nested structures.)
The invalid data types are as follows.