Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 545

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Floating-point Math Instructions
Flags
Precautions
3-14-21 Single-precision Floating-point Comparison Instructions
Purpose
Ladder Symbol
Variations
Applicable Program Areas
512
For example, when the base words (B+1 and B) contain 3.1 and the exponent
words (E+1 and E) contain 3, the result is 3.1
If the absolute value of the result is greater than the maximum value that can
be expressed as floating-point data, the Overflow Flag will turn ON.
If the absolute value of the result is less than the minimum value that can be
expressed as floating-point data, the Underflow Flag will turn ON.
Name
Label
Error Flag
ER
Equals Flag
=
Overflow Flag
OF
Underflow Flag
UF
Negative Flag
N
The base (B+1 and B) and the exponent (E+1 and E) must be in IEEE754
floating-point data format.
These input comparison instructions compare two single-precision floating
point values (32-bit IEEE754 constants and/or the contents of specified
words) and create an ON execution condition when the comparison condition
is true.
Symbol & options
S
1
S
2
Variations
Creates ON Each Cycle Comparison is True
Immediate Refreshing Specification
Block program areas
OK
OK
3
or 29.791.
Operation
ON if the base (B+1 and B) or exponent (E+1 and E) is
not recognized as floating-point data.
ON if the base (B+1 and B) or exponent (E+1 and E) is
not a number (NaN).
ON if the base (B+1 and B) is 0 and the exponent (E+1
and E) is less than 0. (Division by 0)
ON if the base (B+1 and B) is negative and the exponent
(E+1 and E) is non-integer. (Root of a negative number)
OFF in all other cases.
ON if both the exponent and mantissa of the result are 0.
OFF in all other cases.
ON if the absolute value of the result is too large to be
expressed as a 32-bit floating-point value.
ON if the absolute value of the result is too small to be
expressed as a 32-bit floating-point value.
ON if the result is negative.
OFF in all other cases.
S
: Comparison data 1
1
S
: Comparison data 2
2
Step program areas
Subroutines
OK
Section 3-14
Input compari-
son instruction
Not supported
Interrupt tasks
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents