6-12
6.1 Comparison Operation Instructions
6.1.4 Floating-point data comparison (double precision)
ED=,
ED<>,
ED<=,
ED<,
ED>=,
ED>
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 specified value is not within the following range.
(Error code: 4140)
0, 2
-1022
| value of the specified device | 2
1024
• The value of the specified device is 0.
(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_D4, and Y33
turns ON when the value in Var_D0 and the value in Var_D4 are matched.
[Structured ladder]
(2) In the following program, the floating-point real number 1.23 is compared with the value in
Var_D4 when M3 is ON, and Y33 turns ON when the value in Var_D4 is other than 1.23.
[Structured ladder]
(3) In the following program, the value in Var_D00 is compared with the value in Var_D4, and
Y33 turns ON when the value in Var_D4 is smaller than the value in Var_D0 or when M8 is
ON.
[Structured ladder]
(4) In the following program, the value in Var_D0 is compared with the floating-point real
number 1.23, and Y33 turns ON when 1.23 is equal to or greater than the value in Var_D0 or
when both M3 and M8 are ON.
[Structured ladder]
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: ......