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 insertingIN2before byte positionPofIN1. - If
P > N, whereNis the number of bytes inIN1, the result is the same as appending the value ofIN2to the value ofIN1. - If
P+L > N, whereNis the number of bytes inIN1, the result is the same as appending the value ofIN2to the firstP-1bytes ofIN1.