Replace(_E) - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

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

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
5.8.5

REPLACE(_E)

Outline
This function replaces a character string.
1. Format
Function name
REPLACE
REPLACE_E
*1.
Output variable
2. Set data
Variable
EN
_IN1 (
Input
_IN2 (
variable
_L
_P
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
192
FX
3U(C)
Expression in each language
Structured ladder
REPLACE
Label 1
_IN1
Label 2
_IN2
D20
_L
D30
_P
X000
REPLACE_E
EN
Label 1
_IN1
Label 2
_IN2
D20
_L
D30
_P
Execution condition
Head word device which stores a character string to be replaced
)
s1
)
Head word device which stores a replacement character string
s2
Word device which stores the number of characters to be replaced
(
)
n1
Word device which stores the head character position to be
(
)
n2
replaced in a character string to be replaced
Execution status
Head word device which will store a character string obtained by
(
)
d
replacement
FX
3G
FX
2N(C)
FX
1N(C)
REPLACE(_IN1,_IN2,_L ,_P);
Example:
*1
Label 3
Label 3:=
REPLACE(Label 1,Label 2,
D20,D30);
REPLACE_E(EN,_IN1,_IN2,
_L ,_P,Output label);
ENO
Example:
REPLACE_E(X000,Label 1,
*1
Label 3
Label 2,D20,D30,Label 3);
Description
5.8 Standard Character String Functions
FX
1S
FX
U
/FX
2C
FX
0N
ST
Data type
Bit
String
String
Word [signed]
Word [signed]
Bit
String
FX
0(S)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents