Mitsubishi Electric MELSEC FX Series Structured Programming Manual page 195

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
Explanation of function and operation
1) This function replaces specified number of characters from an arbitrary position of a character string
stored in devices specified in
the character string obtained by replacement to devices specified in
The value specified in
The value specified in
Example: When "5" is specified in
High-order byte Low-order byte
1st word
2nd word
3rd word
4th word
5th word
6th word
High-order byte Low-order byte
1st word
2nd word
3rd word
4th word
2) A character string (data) stored in devices specified in
in units of byte in the range starting from the specified device.
3) When "n1+n2" exceeds the number of characters of a character string stored in devices specified in
excessive characters are not output to devices specified in
4) When "-1" is specified in
in
is regarded as the value specified in
s2
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data in structured programs, you cannot specify 16-bit devices directly,
different from simple projects. Use labels when handling character string data.
Use global labels when specifying labels.
with a character string stored in devices specified in
s1
specifies the number of characters to be replaced.
n1
specifies the position from which specified number of characters are replaced.
n2
and
n1
Input value to
s1
"ABCDEFGH123"
42H(B)
41H(A)
44H(D)
43H(C)
Replacement start
46H(F)
45H(E)
position
48H(H)
47H(G)
= 5th character
32H(2)
31H(1)
00H
33H(3)
Input value to
s2
Number of characters
"123456"
to be replaced
32H(2)
31H(1)
34H(4)
33H(3)
36H(6)
35H(5)
0000H
, the number of characters of a character string stored in devices specified
n1
5.8 Standard Character String Functions
d
n2
Output value
"ABCD1234523"
High-order byte Low-order byte
42H(B)
44H(D)
32H(2)
n2
34H(4)
32H(2)
00H
= 5
n1
indicates the data until "00H" is detected first
s
.
d
.
n1
, and outputs
s2
.
41H(A)
1st word
2nd word
43H(C)
31H(1)
3rd word
33H(3)
4th word
35H(5)
5th word
33H(3)
6th word
193
1
2
3
4
5
6
,
s1
A

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents