32 STRING FUNCTIONS
32.7 Replacing String Data
1957
32
32.7 Replacing String Data
REPLACE(_E)
These functions replace the specified range in a character string, and output the operation result.
■Description, type, data type
Ladder, FBD/LD 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: Executed, FALSE: Not executed) Input variable BOOL
s1 (IN1), s2 (IN2) Input Input variable ANYSTRING_SINGLE
n1 (L) Number of characters to be replaced Input variable INT
n2 (P) Replacement target character start position Input variable INT
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable ANYSTRING_SINGLE
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)
EN ENO
s1
s2
d
n1
n2