
Rockwell Automation Publication 1756-RM100F-EN-P - October 2018
133
Instruction Execution
Chapter 6
Store NAN in an Integer
When writing/propagating NAN values 5580 and 5380 controllers offer
standardized results.
This implementation affects all instructions that can produce a Floating Point
value and store in an integer location.
Mitigation
Revise your application if it was checking for the special value of '-1' to indicate
a '-NAN' result.
Compare NAN Values
NAN does not compare true with ANY value (even another NAN). Any
EQU, GEQ, GRT, LEQ, or LES comparison with at least one NAN input is
always false, and any NEQ input with at least one NAN input is always true.
Now offers standardized results when you use NAN in comparisons.
This implementation affects these instructions: CMP, EQU, GEQ, GRT,
LEQ, LES, NEQ.
Mitigation
Revise any logic that relies on the old, non-standard result from an NAN
comparison. Also, it is now easier to test for a NAN result. This value is the
only value that provides a true result for a 'NEQ TagA TagA' comparison.
Language
Affected
Ladder Logic (RLL)
Yes
Structured Text (ST)
Yes
Function Blocks (FBD)
Yes
Sequential Function Chart (SFC) Yes
(1)
(1) Only affects the embedded Structured Text.
5580/5380 Controllers
5570/5370 Controllers
W/- NAN to an integer always results in the
value 0 be stored.
Writing NAN to an integer results in either -1 or 0
depending on the sign bit for NAN.
Language
Affected
Ladder Logic (RLL)
Yes
Structured Text (ST)
No
Function Blocks (FBD)
Yes
Sequential Function Chart (SFC) No
5580/5380 Controllers
5570/5370 Controllers
All compares with NAN are false except for NEQ.
NAN values compare as equals and their signs are
accounted for.
Содержание Studio 5000 Logix Emulate
Страница 8: ...8 Rockwell Automation Publication 1756 RM100F EN P October 2018 Table of Contents Notes...
Страница 16: ...16 Rockwell Automation Publication 1756 RM100F EN P October 2018 Chapter 1 BeforeYou Begin a Migration Notes...
Страница 170: ...170 Rockwell Automation Publication 1756 RM100F EN P October 2018 Index Notes...
Страница 171: ......