Eleft (Takeout Of The Left Side Of A String: With Storage Area Size) - Panasonic FP7 Series Command Reference Manual

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area Size)

14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area
Size)
Ladder diagram
List of operands
Operand
Description
Starting device address of the source data (available range: 0 to 65534; for character constant: 0 to
S1
256 characters)
S2
Number of characters to be taken out (available range: 0 to 65534)
D
Starting device address to store the result that is taken out
Available devices (●: Available)
Operan
d
W
W
X
Y
S1
S2
D
(Note 1)
Only 16-bit devices, and integer constants can be modified. (Character constants cannot be specified.)
Outline of operation
● This instruction takes out characters as specified by [S2] from the left side (start of the
character data) of the string specified by [S1], and stores them as string data with storage
area in the device address specified by [D].
● The number of bytes of string data that are taken out is stored in [D+1].
● For both [S1] and [D], the size of the starting storage area must be set by using the user
program before an instruction is executed.
Processing
Example 1) Taking out the first five characters "ABCDE" from the string
"ABCDE123" to store them as string data with storage area in DT20 and later
[S1]...DT0 [S2]...U5 [S2]...DT20
WUME-FP7CPUPGR-12
16-Bit device:
W
W
W
S
D
L
R
L
S
D
T
D
32-Bit
device:
TS
TE
U
W
WI
IX
C
C
M
O
S
E
Real
St
Integer
numbe
rin
r
g
D
K
H
SF
" "
F
Index
modifie
r
(Note 1)
14-133

Advertisement

Table of Contents
loading

Table of Contents