Delta AS Series Programming Manual page 1038

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

AS Ser ies Pro gra mm in g M anu al
API
Instruction code
2106
Device
X
S
D
Data
type
S
D
Symbol
_6
Explanation
1.
This instruction calculates the length of the string in S, exclusive of the ending character (16#00), and stores the
length of the string in D.
2.
The value stored in D must be between 0–32767. If it exceeds this range, the value in D is processed as 32767.
S
S+1
S+2
S+ n
If the data in S-S+4 is ABCDEFGHI, the calculation result is as follows.
6 - 7 5 8
$LEN
P
Y
M
S
T
C
b15
b8
b 7
Sec ond char acter
Fi rs t c haracter
F ourth c harac ter
Thir d char acter
Six th c harac ter
Fifth charac ter
1 6#00
n c harac ter
th
(En d ing c ha ract er)
Operand
S, D
HC
D
FR
SM
Pulse instruction
AS
S : String
D : Length of the string
b0
b15
Function
Calculating the length of a string
SR
E
K
16#
16-bit instruction
32-bit instruction
AS
b0
n
Length of the s tring
"$"
F
-
D

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents