VA Motion Controller Programming Manual
221
10.4.4 REPLACE (replace string)
LD, FBD
programming language
Function: The REPLACE Replace String command replaces several connected characters
in a string with a string.
OUT:=REPLACE ( IN, L, P )
Note
: IL, ST
language programming needs to insert variables
IN1, IN2, L, P
and
OUT
or
use constants in the current
POU
variable worksheet
数据 Data type processed by the REPLACE instruction
The second input string will replace some characters in
the first input string
The number of characters to be replaced, L can be 0, 1,
2...
In the first input string, the position of the first character
to be replaced, P must be an integer greater than 0 ; the first
character position in the string is 1 , and the following
characters are 2, 3...
Output the first input string is not affected by the
substitution, in fact, this instruction is to select the first two
characters in the first input string and the second string to
form a new string, the output is not alloweDAnd input Same
name
REPLACE
function anDAction example
Replace the string "PLC" with the string "VECTOR"