Delta AS Series Programming Manual page 1059

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

API
Instruction code
2115
$SER
Device
X
Y
M
S
1
S
2
n
D
Data
type
S
1
S
2
n
D
Symbol
Explanation
1.
This instruction searches the string in S
D.
th
2.
When the n
character exceeds the length of the string in S
3.
Suppose the string in S
third character in S
, and the value in D is 5.
2
b15
b8
b 7
S1
1 6#46 (F )
1 6#
4 8(H )
S1
+1
忽略
S1
+2
Ig n o r e d
Operand
P
S
, S
, n, D
1
2
S
T
C
HC
Pulse instruction
: String to be searched
S
1
: String to be searched for
S
2
n : n
D : Search result
th
from the n
2
is "ABCDEFGHIJK", the string in S
2
b0
b15
16#
4 2(B)
1 6#45(E)
1 6#
47 (G)
16#
4 4(D )
16 #
00
16 #
46(F)
16 #
48(H)
16#
4A(J)
16 #
00
Cha p ter 6 App l ied Ins truc tio ns
D
FR
SM
SR
16-bit instruction
AS
AS
th
character in S
where the search begins
2
character for the string in S
1
, or S
>S
, D is 0.
2
1
2
is "EFGH", and n is 3. The search begins from the
1
b8
b 7
b0
S2
16#4 1(A)
16#
4 3(C )
S2
+1
Se arch ing t he st ring f rom the th ird chara ct er
16# 45(E)
S2
Matchin g chara ct er
+2
16#
47(G)
S2
+3
1 6#
4 9(I )
S2
+4
16#
4B(K)
S2
+5
Afte r the inst ruction is e xecuted
5
D
Function
Searching a string
E
K
16#
"$"
32-bit instruction
-
, and stores the search result in
6 - 7 7 9
F
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents