6.1 Comparison Operation Instructions
6.1.5 Character string data comparison
6-17
6
BA
S
IC
INSTRUCTIONS
$=,
$<>,
$<=,
$<,
$>=,
$>
$=,
$<>,
$<=,
$<,
$>=,
$>
Program
E
xam
pl
e
(1) In the following program, the character string data stored in Var_D0 and the following
devices are compared with the character string data stored in Var_D10 and the following
devices, and Y33 turns ON when they are matched.
[Structured ladder]
(2) In the following program, the character string "ABCDEF" is compared with the character
string data stored in Var_D10 and the following devices and when M3 is ON, and Y33 turns
ON when the character string data stored in Var_D10 and the following devices are other
than "ABCDEF".
[Structured ladder]
(3) In the following program, the character string data stored in Var_D0 and the following
devices are compared with the character string data stored in Var_D10 and the following
devices when M3 is ON, and Y33 turns ON when the character string data stored in
Var_D10 and the following devices are equal to or shorter than the character string data
stored in Var_D0 and the following devices, or when M8 is ON.
[Structured ladder]
(4) In the following program, the character string data stored in Var_D0 and the following
devices are compared with the character string "12345", and Y33 turns ON when "12345" is
equal to or longer than the character string data stored in Var_D0 and the following devices
devices 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: ......