Publication 1763-RM001C-EN-P - October 2009
192
Math Instructions
Programming Floating Point Values
The following table shows items to consider when using floating point
data.
Format
Explanation
Ff:e
F
Floating Point file
f
File number
The valid file number range is from 8 (default) to 255.
:
Element delimiter
e
Element number The valid element number range is from 0 to 255.
Examples:
F8:2
F10:36
Floating Point File 8, Element 2
Floating Point File 10, Element 36
IMPORTANT
These rules do not apply to the SCP instruction. See page
198 for the rules for that instruction.
Considerations When Using Floating Point Data
When at least one of the operands is a Floating Data Point value:
•
If either Source is NAN, then the result is NAN.
•
All overflows result in infinity with the correct sign.
•
All underflows result in plus zero.
•
All denormalized Source values are treated as plus zero.
•
Results are always rounded using the Round to Even rule.
•
If Destination is an integer and the result is NAN or infinity, a saturated result (-32768 or
+32767 for word or -2,147,836,648 or +2,147,836,647 for long word) is stored in
Destination and the Math Overflow Selection Bit is ignored.
•
If Destination is an integer, the rounded result is stored. If an overflow occurs after rounding, a
saturated result is stored in Destination and the Math Overflow Selection Bit is ignored.
The saturated results are:
–
If Destination is an integer and the result is positive, overflow Destination is +32767
(word) or +2,147,483, 648 (long word).
–
If Destination is an integer and the result is negative, overflow Destination is -32767
(word) or -2,147,483, 648 (long word).
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive