EasyManua.ls Logo

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

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
196
6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
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 within the range from the specified
device number to the device number where the NULL code "00H" 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
43H44H
45H00H
"ABCDE"
(S1)+2
42H
b15 b8
41H
b7 b0
43H44H
45H00H
"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)

Table of Contents

Related product manuals