Allen-Bradley LOGIX 5000 Reference Manual page 543

Controllers advanced process control and drives and equipment phase and sequence instructions
Hide thumbs Also See for LOGIX 5000:
Table of Contents

Advertisement

Common Attributes for Advanced Process Control and Drives Instructions
Important:
Mixing an INT tag with an immediate value
Since remote_rack_1:I.Data[0] is an INT tag, the value to check it against
first moves into int_0, also an INT tag. The EQU instruction then compares
both tags.
Convert Integer to REAL
The controller stores REAL values in IEEE single-precision, floating-point
number format. It uses one bit for the sign of the value, 23 bits for the base value,
and eight bits for the exponent (32 bits total). If you mix an integer tag (SINT,
INT, or DINT) and a REAL tag as inputs in the same instruction, the controller
converts the integer value to a REAL value before the instruction executes.
A SINT or INT value always converts to the same REAL value.
A DINT value may not convert to the same REAL value:
A REAL value uses up to 24 bits for the base value (23 stored bits plus a
'hidden' bit).
A DINT value uses up to 32 bits for the value (one for the sign and 31 for
the value).
If the DINT value requires more than 24 significant bits, it might not convert to
the same REAL value. If it will not, the controller stores the uppermost 24 bits
rounded to the nearest even value.
Convert DINT to SINT or INT
To convert a DINT value to a SINT or INT value, the controller truncates the
upper portion of the DINT and stores the lower bits that fit in the data type. If the
value is too large the conversion generates an overflow.
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Chapter 11
543

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents