Delta AS Series Programming Manual page 1054

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
2112
Device
X
S
n
D
Data
type
S
n
D
Symbol
_6
Explanation
1.
This instruction retrieves n characters from the string in S starting from the left, and stores the retrieved characters
in D. When S is a string device, the maximum length for the value in S is 31 characters; when the S is not a string
device, the maximum length for the value in S is 255 characters.
2.
If n is 0, the value in D is 0.
b15
Second ASCII code
S
F our th ASCII code
S
+1
n-1
t h
A SCII code from the last
n+1
AS CII c ode from the last
t h
If the data in S is ABCDEF12345 and n is 7, the instruction retrieves seven characters in the string in S from the
left. The conversion result is as follows.
6 - 7 7 4
$LEFT
P
Y
M
S
T
C
b8
b7
F irst ASCII code
T hi rd A SCII c ode
n-2
A SCII code from the last
t h
n
ASCII c ode from the l as t
t h
Last A SCII c ode
16#00
Operand
S, n, D
HC
D
FR
SM
Pulse instruction
AS
S : String
n : Number of characters to retrieve
D : Device where the characters retrieved are stored
b0
b15
b8
Second ASCII code
F our th ASCII code
n-1
A SCII code from the last
t h
16#00
Function
Retrieving characters from a string
beginning from the left.
SR
E
K
16#
16-bit instruction
32-bit instruction
AS
b7
b0
F irst ASCII code
T hi rd A SCII c ode
n-2
t h
A SCII code from the last
n
t h
ASCII c ode from the l as t
"$"
F
-
D
D
+1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents