Справочник Пользователя для Mitsubishi Electronics Mitsubishi Digital Electronics Welding System FXCPU

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