181
$=, $<>, $>, $<=, $<, $>=
1
2
3
4
6
7
8
6.1
C
ompar
ison Operat
ion In
str
uctions
6.1.5
$=, $<>, $>, $<=
, $<
,
$>
=
The character string data comparison instruction checks the device range while comparing the designated character string
data. For this reason, if the "00
H
" code does not exist in the relevant device range, the instruction outputs the comparison
result instead of returning an operation error when no match of characters is detected.
If
and
data are as shown above, the second character of
does not match with that of
, and the comparison
result is expressed as
(the operation result is "non-conductive"). Though the "00
H
" code is not included within the
device range, no operation error is returned, because the no-match is detected at D12287, which is within the device
range.
Program Example
(1) The following program compares character strings stored following D0 and characters following D10.
[Ladder Mode]
[List Mode]
(2) The following program compares the character string "ABCDEF" with the character string stored following D10.
[Ladder Mode]
[List Mode]
(3) The following program compares the character string stored following D10 with the character string stored following
D100.
[Ladder Mode]
[List Mode]
(4) The following program compares the character string stored following D200 with the character string "12345".
[Ladder Mode]
[List Mode]
M0
D10
D12287
$
B
A
D12287
C
00
H
Z
A
D11
C
00
H
W
0
D10
Data
of
Data
of
E
xamp
l
e
S1
S2
S1
S2
S1
S2
S1
S2
S1
S2
S1
Step
Instruction
Device
Step
Instruction
Device
Step
Instruction
Device
Step
Instruction
Device