
7 APPLICATION INSTRUCTION
7.6 Character string operation instruction
361
7
7.6
Character string operation instruction
Comparing character strings
LD$
, AND$
, OR$
These instructions perform a comparison operation between the character string data in the device specified by (s1) and later
and the character string data in the device specified by (s2) and later. (Devices are used as a normally open contact.)
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
*1
T, ST, C cannot be used.
Processing details
• These instructions perform a comparison operation between the character string data specified by (s1) and the character
string data specified by (s2). (Devices are used as a normally open contact.)
• In the comparison operation, the ASCII codes of the character strings are compared one by one from the start of the
strings.
• Character strings in the devices specified by (s1) and (s2) to a device that stores 00H are compared.
Ladder diagram
Structured text
($=, $<>, $>, $<=, $<, or $>= enters
.)
Not supported
Operand
Description
Range
Data type
Data type (label)
(s1)
Comparison data or head device number where the comparison
data is stored
Character string
Character string
(s2)
Comparison data or head device number where the comparison
data is stored
Character string
Character string
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s1)
(s2)
• When all the character strings match, the comparison is considered as matched.
LD
AND
OR
(s1)
(s2)
(s1)
(s2)
(s1)
(s2)
b15
(s1)
(s1)+1
(s1)+2
42H (B)
b8
41H (A)
b7
b0
43H (C)
44H (D)
45H (E)
00H
"ABCDE"
b15
(s2)
(s2)+1
(s2)+2
42H (B)
b8
41H (A)
b7
b0
43H (C)
44H (D)
45H (E)
00H
"ABCDE"
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......