Mitsubishi Electric MELSEC-Q/L Programming Manual page 587

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

Advertisement

Program example
• The following program searches from the 5th character from the left of the character string data stored in devices starting
from R0 for the character string data in devices starting from D0, and stores the results at D100 when X0 goes ON.
[Ladder Mode]
[Operation]
b15
b8b7
R0
49
(I)
43
H
R1
33
(3)
32
H
R2
32
(2)
31
H
R3
49
(I)
43
H
R4
00
4D
H
"CI2312CIM"
• The following program searches from the 3rd character from the left of the character string data being stored in devices
starting from D0 for the character string data "AB", and stores the results of the search at D100 when X1C goes ON.
[Ladder Mode]
[Operation]
b15
b8b7
D0
32
(2)
31
H
D1
34
(4)
33
H
D2
42
(B)
41
H
D3
36
(6)
35
H
D4
42
(B)
41
H
D5
00
H
b0
Not searched since
(C)
the search start
H
(2)
position is 5
H
(1)
Searches from
H
the 5th character
(C)
H
(M)
H
b0
(1)
Searches from the
H
(3)
3rd character
H
5th character from
(A)
H
the first character
(5)
H
(A)
H
[List Mode]
Step
Instruction
b15
b8b7
D0
49
(I)
H
D1
33
(3)
H
D2
00
H
"CI23"
D100
0
Stores "0" because there are no matches.
[List Mode]
Step
Instruction
D100
5
"AB"
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
Device
b0
43
(C)
H
32
(2)
H
Device
7
585

Advertisement

Table of Contents
loading

Table of Contents