6.1 Comparison Operation Instructions
6.1.3 Floating-point data comparison (single precision)
6-9
6
BA
S
IC
INSTRUCTIONS
E=,
E<>,
E
<=,
E<,
E>=,
E>
E=,
E<>,
E<=,
E<,
E>=,
E>
(2) The results of the comparison operations for each instruction are as follows.
Note that when using the
E= instruction, the values of operation result may not
be equal depending on the error.
O
p
erat
i
on
E
rror
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The value of the specified device is 0. *
1
(For High Performance model QCPU only)
(Error code: 4100)
*1: There are CPU modules that do not result in any operation error when 0 is specified. For details, refer to
• The value of the specified device is outside the following range. (For Universal model
QCPU only)
0, 2
-
126
| value of the specified device | < 2
128
(Error code: 4140)
• The value of the specified device is
-
0, unnormalized number, nonnumeric or
±
∞
.
(For Universal model QCPU only)
(Error code: 4140)
Program
E
xam
pl
e
(1) In the following program, the value in Var_D0 is compared with the value in Var_D3 and Y33
turns ON when the value in Var_D0 and the value in Var_D3 are matched.
[Structured ladder]
Instruction
symbol in
Condition
Comparison result
Instruction
symbol in
Condition
Comparison result
E=
=
Conduction state
E=
Non-conduction
state
E<>
E<>
=
E<=
E<=
>
E<
<
E<
E>=
E>=
<
E>
>
E>
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
s
1
s
2
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......