
4.3 L_MemCopyToRam
Function library LenzeMemDrv.lib
Functions for RAM memory access
4−4
L
LenzeMemDrv.lib EN 1.1
4.3 L_MemCopyToRam
INT. L_MemCopyToRam(pbyData, wLength, byRamBlockNr, wOffset)
This function can be used to copy data from the variable memory of the PLC byte by byte to a RAM
block of the PLC.
· The function is processed at the same time as the PLC program in the system task. This is
why the processing time depends on the workload of the system.
· You can use the function L_MemGetStateDriver to find out if copying has been completed.
Variable memory (RAM)
pbyData
wLength
wOffset
Block 1 (64KByte)
Block 2 (64 KByte)
RAM blocks
byRamBlockNr
1
n
Block n (64 KByte)
2
Transfer parameters
Identifiers Data type Info/possible settings
pbyData Pointer to byte Pointer to the start address in the variable memory of the PLC from which on the data bytes to be
copied can be found.
wLength Word 1 ... 8192 Number of data bytes to be copied
byRamBlockNr Byte Selecting the RAM memory block to which the data bytes are to be copied
1 RAM memory 1, size: 64 kbytes
2 RAM memory 2, size: 64 kbytes
wOffset Word Destination address in the selected RAM memory block representing the start address for storing the
data bytes to be copied.
· The destination address must not be higher than 65535 − wLength.
0 ... 65535 Destination address (offset)
Komentarze do niniejszej Instrukcji