Description
Original instructions
Function description
This function block copies the value from the SRC parameter to the DEST parameter. Both tables have to be of the same data type.
When setting OFF to 0 the copy operation is blocked. In this case the function block sets END to 1 and doesn't perform any data copying.
If the sum of OFF and SIZE is outside of the DEST table END is also set to 1.
Independent from the data type of SRC and DEST the function block copies on a word base (16 bits). This results in the following behavior:
In general the copy operation will only be performed for END=0.
If NOINC is set to 0, the value of OFF increases by SIZE after each copy operation.
EN can be configured as additional parameter.
NOTE: ENO is not supported by this function block (value is always 1).
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL T2T_Instance (NOINC:=FreezesPointerValue,
    R:=Reset, SRC:=SourceData,
    SIZE:=NumberOfWordsToCopy, OFF:=Offset, 
    END=>PointerValue, DEST=>DestinationTable)
Representation in ST
Representation:
T2T_Instance (NOINC:=FreezesPointerValue,
    R:=Reset, SRC:=SourceData,
    SIZE:=NumberOfWordsToCopy, OFF:=Offset, 
    END=>PointerValue, DEST=>DestinationTable) ;
Parameter description
Description of input parameters:
Parameter
Data type
Description
NOINC
1: Freezes the pointer value. The value of OFF remains unchanged.
R
BOOL
1: Sets the offset variable (OFF) to the first element and resets the END output before starting the copy operations.
SRC
ANY should be an array of the BOOL, BYTE, WORD, DWORD, INT, DINT, UINT, UDINT,REAL, TIME types e.g.ARRAY [0..X] OF INT
Source data to be copied in the current cycle
SIZE
UINT
The variable tells the function block how many words have to copied every cycle.
Description of input / output parameters:
Parameter
Data type
Description
OFF
UINT
Offset in both the source and destination table.
Description of output parameters:
Parameter
Data type
Description
END
BOOL
1: Pointer value = table length (function block cannot increment any further)
1: If OFF=0 or if the sum of OFF and SIZE is outside the destination table DEST. Copy operation is disabled.
DEST
ANY should be an array of the BOOL, BYTE, WORD, DWORD, INT, DINT, UINT, UDINT,REAL, TIME types e.g.ARRAY [0..X] OF INT
Destination table where source table will be copied in the cycle.