Summary
Copies device memory in one operation. The data of addresses specified with Parameter 3 are copied from the source word address specified with Parameter 2 to the destination word address specified with Parameter 1.
The number of addresses that can be used is from 1 to 640. With the "_memcpy_EX" function, the source address, destination address, and number of addresses can be designated indirectly.
Format
_memcpy_EX ([Copy To Address], [Copy From Address], Words)
Parameter 1: Device address + Temporary address
Parameter 2: Device address + Temporary address
Parameter 3: Numeric value, Internal Device, Temporary address (The valid range for Parameter 3 is from 1 to 640.)
Example expression:
[t:0000]=10, [t:0001]=20
_memcpy_EX ([w:[#INTERNAL]LS0100]#[t:0000], [w:[PLC1]D0100]#[t:0001], 5)
In the example above, five words of data are read out from D0120 and written into LS0110 to LS0114.
If the original and destination data ranges overlap, all overlapping data will be rewritten as follows.
For example, when copying LS101-LS104 to LS100-LS103
Data is copied beginning with the destination's smaller address number.
For example, when copying LS100-LS103 to LS101-LS104
Data is copied beginning with the destination's larger address number.