![FATEK FBs Series Manual Download Page 296](http://html1.mh-extra.com/html/fatek/fbs-series/fbs-series_manual_3764826296.webp)
Advanced Function Instruction
7 -1 3 2
FUN 206
P
FCMP
FLOATING POINT NUMBER COMPARE
FUN 206
P
FCMP
Sa: The register to be compared
Sb: The register to be compared
Sa, Sb may combine with V, Z, P0~P9 to serve
indirect addressing.
HR
ROR
DR
K
XR
Range
Operand
R0
∣
R383
9
R5000
∣
R8071
D0
∣
D4095
Floating
point
number
V
、
Z
P0
~
P9
Sa
○
○
○
○
○
Sb
○
○
○
○
○
Description
z
The format of floating point number of Fatek-PLC follows the IEEE-754 standard. For detail explanation of
the format please refer to 5.3 (Numbering System) page 5 - 9.
z
Compares the data of Sa and Sb when the compare control input "EN" =1 or "EN
↑
" (
P
instruction) from 0
to 1. If the data of Sa is equal to Sb, then set FO0 to 1. If the data of Sa>Sb, then set FO1 to 1. If the data
of Sa<Sb, then set FO2 to 1. If the data of Sa < Sb, then set the FO2 to 1.
X0
EN
Sa :
Sb :
a>b
Y0
a<b
a=b
206P.FCMP
R0
R2
z
From the above example, we first assume the data of DR0 is 200.1 and DR2 is 200.2, and then compare the
data by executing the CMP instruction. The FO0 and FO1 are set to 0 and FO2 (a<b) is set to 1 since a<b.
z
If you want to have the compound results, such as
≧、≦、
< > etc., please send =
、
< and > results to relay first
and then combine the result from the relays.