14.37 ESREP (Replacement of a String: With Storage Area Size)
■
Ladder diagram
■
List of operands
Operand Description
S
Starting device address of the source string (available range: 0 to 65534; for character constant: 0
to 256 characters)
D Starting device address of the destination string (available range: 1 to 65534)
p Replacement start position of the destination string (available range: 0 to 65533)
n Number of characters to be replaced (available range: 0 to 65534)
■
Available devices (●: Available)
Operan
d
16-Bit device:
32-Bit
device:
Integer
Real
numbe
r
St
rin
g
Index
modifie
r
(Note 1)
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 ● ● ● ● ● ● ●
p ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ●
(Note 1) Only 16-bit devices, and integer constants can be modified. (Character constants cannot be specified.)
■
Outline of operation
● This instruction replaces the string specified by [D] with the string specified by [S].
● For [p], specify the relative position in [D] where the string is replaced, and for [n] specify the
number of characters to be replaced.
■
Processing
Example 1) Taking out the five characters "ABCDE" from the DT0 string to transfer
them to the 1st byte (2nd character) of the DT20 string
[S]...DT0 [D]...DT20 [p]...U1 [n]...U3
14.37 ESREP (Replacement of a String: With Storage Area Size)
14-142 WUME-FP7CPUPGR-12