MoveBlock
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
DST |
ANY (*) |
|
|
|
Array containing the destination of the copy. |
NB |
DINT |
|
|
|
Number of items to be copied. |
PosDST |
DINT |
|
|
|
Index of the destination in DST. |
PosSRC |
DINT |
|
|
|
Index of the first character in SRC. |
SRC |
ANY (*) |
|
|
|
Array containing the source of the copy. |
(*) SRC and DST cannot be a STRING.
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
OK |
BOOL |
|
|
TRUE if successful. |
Remarks
- Arrays of string are not supported by this function.
- The function copies a number (NB) of consecutive items starting at the PosSRC index in SRC array to PosDST position in DST array.
- SRC and DST can be the same array.
- In this case, the function avoids lost items when source and destination areas overlap.
- This function verifies array bounds and is always safe.
- The function returns TRUE if successful.
- It returns FALSE if input positions and number do not fit the bounds of SRC and DST arrays.
FBD Language
FFLD Language
- In the FFLD language, the operation is executed only if the input rung (EN) is TRUE.
(* The function is executed only if EN is TRUE. *)
IL Language
Not available.
ST Language
OK := MOVEBLOCK (SRC, DST, PosSRS, PosDST, NB);