High−level Instructions
3 − 743
Outline Compares one real number data item with the data band specified by
two other real number data items.
Program example
Boolean
Ladder Diagram
Address Instruction
S1
Trigger
S2
F346 FWIN, DT10, DT20, DT3010
R0
S3
10
11
ST R 0
F346 (FWIN)
DT 10
DT 20
DT 30
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 for lower limit
S3 Real number data (2 words) or lower 16-bit area of 32-bit data for upper limit
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
S3 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 floating point real number data specified by S1 with the data band specified by S2 and S3,
when the trigger turns on. This instruction checks whether S1 is in the data band between S2 (lower limit) and
S3 (upper limit), larger than S3, or smaller than S2. The comparison result is stored in special internal relays
R900A, R900B, and R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C).
(S1+1, S1) (S3+1, S3) and
(S2+1, S2) (S1+1, S1)
(S3+1, S3) < (S1+1, S1)
off
R900A
(> flag)
Flag
(S1+1, S1) < (S2+1, S2)
Comparison between
(S1+1, S1), (S2+1, S2)
and (S3+1, S3)
off
R900B
(= flag)
R900C
(< flag)
off
on
off
on
off
on
off
R9009
(Carry
flag)
X
X
X
“X”: Not changed
F346
P346
(PFWIN)
(FWIN)
Floating point real number data band comparison