Boolean
Ladder Diagram
Address Instruction
S1
Trigger
S2
F345 FCMP, DT10, DT2010
R0
10
11
ST R 0
F345 (FCMP)
DT 10
DT 20
S1 Real number data (2 words) or lower 16-bit area of 32-bit data to be compared
S2 Real number data (2 words) or lower 16-bit area of 32-bit data to be compared
Operands
O
WX WY WR WL SV EV DT LD FL I K H f
modifier device
S1 A A A A A A A A A A A A A A* A
S2 A A A A A A A A A A A A A A* A
* Index modification of a real number is not possible.
Description
Compares the real number data (floating point data) specified by S1 with that specified by S2 when the trigger
turns on. The comparison result is stored in special internal relays R9009, and R900A to R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C), depending on the relative sizes of (S1+1, S1) and (S2+1, S2).
Comparison between
(S1+1, S1) and (S2+1, S2)
(S1+1, S1) < (S2+1, S2)
(S1+1, S1) = (S2+1, S2)
(S1+1, S1) > (S2+1, S2)
Flag
R900A
(> flag)
R900B
(= flag)
R900C
(< flag)
R9009
(carry flag)
off
off
on
off
on
off
on
off
off
off
“ ”: turns on or off according to the conditions
Specifying the integer device with [S1] and [S2], the integer data is internally converted to real numbers
before operations continue.
When the constant K is specified in S1 and S2, the operations are the same as when a integer device is
specified.
F345
P345
(PFCMP)
(FCMP)
Floating point real number data comparison