- Studio 5000 Logix Designer
- Tasks, programs, and routines
- Add-On Instructions
- Controller Organizer
- Logical Organizer
- Alarms
- Tag-based alarms
- Tag Editor and Data Monitor
- Configure settings for Tag Editor and Data Monitor
- Equipment phases
- Equipment Sequences
- Equipment Sequence Diagrams
- Ladder Editor
- Structured Text Editor
- Sequential Function Chart Editor
- Define the steps of an SFC process
- PlantPAx instruction properties
- Controller Properties
- Editing Controller Properties
- Controller Security
- Source Protection
- License Source Protection for Routines and Add-On Instructions
- Module Information
- 1756 ControlLogix I/O Modules
- Instruction Set
REAL to 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 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 to DINT values.
For example, the conversion of REAL values to DINT values:
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 |
Important: | 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. |
Provide Feedback