
22 CHARACTER STRING FUNCTIONS
22.7 Replacing Character String
825
22
22.7
Replacing Character String
REPLACE(_E)
These functions replace an arbitrary range of a character string and output the result.
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
• These functions replace the data for the specified number of characters from an arbitrary position of a character string input
to (s1) with a character string input to (s2) and output from (d).
• The value input to (n1) specifies the number of characters to be replaced.
Ladder diagram
Structured text
[Without EN/ENO]
[With EN/ENO]
[Without EN/ENO]
d:=REPLACE(s1,s2,n1,n2);
[With EN/ENO]
d:=REPLACE_E(EN,ENO,s1,s2,n1,n2);
Argument
Description
Type
Data type
EN
Execution condition (TRUE: Execution, FALSE: Stop)
Input variable
BOOL
s1, s2
Input
Input variable
STRING(255)
n1
Specification of number of characters to be replaced
Input variable
INT
n2
Specification of head character position of a character string to be
replaced
Input variable
INT
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d
Output
Output variable
STRING(255)
s1
d
s2
n1
n2
EN
ENO
s1
s2
d
n1
n2
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......