Delta AH500 Programming Manual page 652

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
2115
$SER
Device X
Y
M
S
1
S
2
n
D
Symbol:
Explanation:
1.
The instruction is used to search the string from the n
the same as the string in S
2.
Suppose the string in S
begins from the third character in S
b15
b8
b7
S1
16#46(F)
16#45( E)
S1
+1
16#
48(H)
16#
忽 略
S1
+2
16#
Example:
6 - 4 8 4
Operand
P
S
, S
, n, D
1
2
S
T
C
HC
D
Pulse instruction 16-bit instruction (9-21 steps) 32-bit instruction
AH500
: String which is searched
S
1
: String which is searched for
S
2
n :
D : Search result
, and the search result is stored in D.
1
is "ABCDEFGHIJK", the string in S
2
, and the value in D is 5.
2
b0
b15
b8
b7
16#
42(B)
16#
44(D)
47(G)
00
16#
46(F)
16#
48(H)
16#
4A(J)
16#
00
5
Searching the string
L
SM SR
E
AH500
th
n
character in S
from which the
2
search begins
th
character in S
is "EFGH", and n is 3. The search
1
b0
S2
16#41( A)
16#
43(C)
S2
+1
Searc hing the str ing from the thir d c har acter
16#45( E)
S2
+2
Matching c har acter
16#
47(G)
S2
+3
16#
49(I)
S2
+4
16#
4B(K)
S2
+5
After the instruction is ex ecuted
D
Function
PR
K
16# "$"
DF
-
Word
Word
Word
Word
for the string which is
2

Advertisement

Table of Contents
loading

Table of Contents