Redundant instruction
This is a redundant instruction. It is replaced by: EQ
Compares the real number data (floating point data) specified by s1 with that specified by s2. The comparison result is stored in special internal flags R9009, and R900A to R900C.
Input
Real number data to which s2 is compared
Real number data compared to s1
F345_FCMP cannot be programmed in the interrupt program.
Instead of using F345_FCMP , you can use variables of the type REAL with the more flexible and specific instructions GT, GE, EQ, LE, LT orNE.
The following table lists the states of the flags, depending on the relative sizes of s1 and s2.
Comparison between s1 and s2 |
Flags |
|||
---|---|---|---|---|
sys_bIsGreaterThan (>flag) | sys_bIsEqual (=flag) | sys_bIsLessThan (<flag) | sys_bIsCarry (carry-flag) | |
s1 < s2 |
off |
off |
on |
* |
s1 = s2 |
off |
on |
off |
off |
s1 > s2 |
on |
off |
off |
* |
*Turns on or off depending on conditions.
if data other than real number data is specified in s1 and s2.
if data other than real number data is specified in s1 and s2.