This function copies the value from the SRC parameter, which is interpreted as a table, to the DEST parameter, which is also interpreted as a table.
The parameter OFF points into both tables. It is an index for the source array and the destination array where the source value should be copied from and to.
In each cycle the function copies the value of SRC[OFF] to DEST[OFF].
The offset will be incremented in each cycle by the number of 16 bit words, which are copied, unless the parameter NOINC is 1. OFF is of the read/write type, equivalent to the VAR_IN_OUT IEC parameters
A parameter SIZE tells the EFB how many words have to be copied every cycle.
OFF is reset if the parameter R has the value 1 before copying.
SRC and DEST are type ANY, which implies a predefined length. These variables will be interpreted as an ARRAY of bytes regardless of the type definition for these parameters (they may be a structure of different types).
OFF undergoes a boundary check each cycle. If OFF exceeds the length of one of the tables, then END is set to 1 and OFF is not incremented. The function will not copy any more data until OFF returns within its boundaries.
Copying Tables with More than 10,000 Words
To copy tables of more than 10,000 words, the T2T function block must be used instead of the direct assignment :=.
Example: If Tab_1 and Tab_2 are two INT Arrays [1..20000] , do not use Tab_1:=Tab_2; Instead, use: T2T_Instance(NOINC:=0, R=1, SRC:=Tab_1, SIZE:=20000, OFF:=Offset, END=>PointerValue, DEST=>Tab_2
NOTE: During the transfer of a large table using the direct copy Tab_1:=Tab_2, some system words linked to time calculation (for example: %SW30) are not refreshed correctly. This problem does not occur with the T2T function.