Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L

Скачать
Страница из 1086
6  BASIC INSTRUCTIONS
6.1  Comparison Operation Instructions
197
6
Character string data comparisons
LD$, AND$, OR$
Processing details
 • Compares the character string data designated by (S1) with the character string data designated by (S2) as a normally-
open contact.
 • A comparison operation involves the character-by-character comparison of the ASCII code of the first character in the 
character string.
 • The character string data of (S1) and (S2) for comparison refers to the data stored at the range from the designated device 
number to the device number where "00H" code is stored.
(S1), (S2):  Data for comparison or head number of the devices where the data for comparison is stored (character string)
Setting 
data
Internal device
R, ZR
J\
U\G
Zn
Constant
$
Others
Bit
Word
Bit
Word
(S1)
(S2)
• If all character strings match, the comparison result will be matched.
Instruction symbol
Comparison operation result
Instruction symbol
Comparison operation result
$=
Continuity
$<=
Continuity
$<>
Non-continuity
$<
Non-continuity
$>
Non-continuity
$>=
Continuity
• If the character strings are different, the character string with the larger character code will be the larger.
Instruction symbol
Comparison operation result
Instruction symbol
Comparison operation result
$=
Non-continuity
$<=
Non-continuity
$<>
Continuity
$<
Non-continuity
$>
Continuity
$>=
Continuity
Process
High
performance
Redundant Universal
LCPU
Basic
LD
AND
OR
S1
S1
S2
S1
S2
S2
$
$
$
$
$
$
/
/
/
/
/
Command
Command
Command
indicates an instruction symbol of                                                           .
42H
b15
b8
41H
b7
b0
43H
44H
45H
00H
"ABCDE"
(S1)+2
42H
b15
b8
41H
b7
b0
43H
44H
45H
00H
"ABCDE"
(S1)+1
(S1)
(S2)+2
(S2)+1
(S2)
(B)
(D)
(A)
(C)
(E)
(B)
(D)
(A)
(C)
(E)
42H
(B)
b15
b8
41H
(A)
b7
b0
43H
(C)
44H
(D)
46H
(F)
00H
"ABCDF" 
42H
(B)
b15
b8
41H
(A)
b7
b0
43H
(C)
44H
(D)
45H
(E)
00H
"ABCDE" 
(S1)+2
(S1)+1
(S1)
(S2)+2
(S2)+1
(S2)