7-203
LEN(P)
1
2
3
4
6
6
7
8
7.11 Character string processing instructions
7.11.8 Character string length detection (LEN(P))
7.11.8 Character string length detection (LEN(P))
LEN(P)
Function
(1) Detects length of character string designated by and stores in the area starting from the
device number designated by .
Processes the data from the device number designated by to the device number storing
"00
H
" as a character string.
For example, when the value "ABCDEFGHI" is stored in the area starting from , the value
9 is stored at .
: Character string or head number of the devices where the character string is stored (character string)
: Number of the device where the length of detected character string will be stored (BIN 16 bits)
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
$
Other
Bit Word Bit Word
–– –– ––
–– ––
Process
High
performance
Redundant
Universal
Basic
LCPU
Command
Command
LEN
LENP
S D
S D
LEN
LENP
S
D
S
D
S
D
S
1st character2nd character
3rd character4th character
b15 b8b7
b0
5th character6th character
nth character
00
H
Indicates the end of character strin
b15 b0
Length of character string
S
D
S
S
S
S
D
+1
41
H
(A)42
H
(B)
43
H
(C)44
H
(D)
b15 b8b7 b0
45
H
(E)46
H
(F)
+2
+3
+4
47
H
(G)48
H
(H)
49
H
(I)00
H
"ABCDEFGHI"
b15 b0
9
S
D
S
S
S
S