Character String Data Comparisons - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Character string data comparisons

LD$, AND$, OR$
Basic
High
Process
performance
LD
AND
OR
(S1), (S2): Data for comparison or head number of the devices where the data for comparison is stored (character string)
Setting
Internal device
data
Bit
(S1)
(S2)
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 within the range from the specified
device number to the device number where the NULL code "00H" is stored.
• If all character strings match, the comparison result will be matched.
b15
b8
b7
(S1)
42H
(B)
41H
(S1)+1
44H
(D)
43H
(S1)+2
00H
45H
"ABCDE"
Instruction symbol
$=
$<>
$>
• If the character strings are different, the character string with the larger character code will be the larger.
b15
b8
b7
(S1)
42H
(B)
41H
(S1)+1
44H
(D)
43H
(S1)+2
00H
46H
"ABCDF"
Instruction symbol
$=
$<>
$>
6 BASIC INSTRUCTIONS
196
6.1 Comparison Operation Instructions
Redundant Universal
LCPU
Command
Command Command
R, ZR
Word
b0
b15
(S2)
(A)
(S2)+1
(C)
(E)
(S2)+2
Comparison operation result
Continuity
Non-continuity
Non-continuity
b0
b15
(S2)
(A)
(S2)+1
(C)
(S2)+2
(F)
Comparison operation result
Non-continuity
Continuity
Continuity
indicates an instruction symbol of
S1
S1
S1
J\
Bit
Word
b8
b7
b0
42H
(B)
41H
(A)
44H
(D)
43H
(C)
00H
45H
(E)
"ABCDE"
Instruction symbol
$<=
$<
$>=
b8
b7
b0
42H
(B)
41H
(A)
44H
(D)
43H
(C)
00H
45H
(E)
"ABCDE"
Instruction symbol
$<=
$<
$>=
$
/
$
/
$
/
$
/
$
S2
S2
S2
U\G
Zn
Constant
$
Comparison operation result
Continuity
Non-continuity
Continuity
Comparison operation result
Non-continuity
Non-continuity
Continuity
/
$
.
Others

Advertisement

Table of Contents
loading

Table of Contents