
Upon the occurrence of an event at the
REQ
input, an instance of this FB type sets the
OUT
value to the result of replacing the bytes in positions
{P..P+L-1}
of
IN1
with the value of
IN2
, and then issues an event at the
CNF
output.
- Following the IEC
61131-3 convention, the index of the leftmost byte position is
1
. - If
P = 0
, the result is the same as ifP = 1
. - If
L = 0
, the result is the same as insertingIN2
before byte positionP
ofIN1
. - If
P > N
, whereN
is the number of bytes inIN1
, the result is the same as appending the value ofIN2
to the value ofIN1
. - If
P+L > N
, whereN
is the number of bytes inIN1
, the result is the same as appending the value ofIN2
to the firstP-1
bytes ofIN1
.