14.18 LEN (Obtainment of String Length)
■
Ladder diagram
■
List of operands
Operand Description
S Starting device address of the string
D Starting device address to store the string length
■
Available devices (●: Available)
Operan
d
16-Bit device:
32-Bit
device:
Integer
Real
numbe
r
St
rin
g
Index
modifie
r
W
X
W
Y
W
R
W
L
W
S
S
D
D
T
L
D
U
M
WI
W
O
TS
C
S
TE
C
E
IX K U H SF
D
F
" "
S ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
■
Outline of operation
● This instruction sets the number of characters stored in the beginning of the character string
specified by [S] to the device address specified by [D].
■
Processing
Example) Set the number of characters of DT0 in DT100
DT0
DT1
DT2
DT3
DT4
DT5
“B” “A”
“C”
“D”
“1” “E”
“2”“3”
8 (No. of characters)
Byte
■
Flag operations
Name Description
SR7
SR8
(ER)
To be set in the case of out-of-range in indirect access (index modification).
To be set when the obtained number of characters exceeds 4096.
14.18 LEN (Obtainment of String Length)
WUME-FP7CPUPGR-12 14-85