Eright (Takeout Of The Right 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.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size)

14.33 ERIGHT (Takeout of the Right 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 the characters for the number specified for [S2] from the right side
(end of the character data) of the string specified by [S1], and stores them as string data in
the device whose address is 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 last five characters "DE123" from the string "ABCDE123"
to store them as string data with storage area in DT20 and later
[S1]...DT0 [S2]...U5 [S2]...DT20
14-130
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
WUME-FP7CPUPGR-12
Index
modifie
r
(Note 1)

Advertisement

Table of Contents
loading

Table of Contents