
4.2 L_MemCopyFromRam
Function library LenzeMemDrv.lib
Functions for RAM memory access
4−2
L
LenzeMemDrv.lib EN 1.1
4.2 L_MemCopyFromRam
INT. L_MemCopyFromRam(byRamBlockNr, wOffset, pbyData, wLength)
This function can be used to copy data from a RAM block of the PLC byte by byte to the variable
memory 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
byRamBlockNr Byte Selecting the RAM memory block including the bytes to be copied
1 RAM memory 1, size: 64 kbytes
2 RAM memory 2, size: 64 kbytes
wOffset Word Start address in the RAM memory block for the data bytes to be copied
· The start address must not be higher than 65535 − wLength.
0 ... 65535 Start address (offset)
pbyData Pointer to byte Pointer to the destination address in the variable memory of the PLC where the data bytes are to be
copied.
wLength Word 1 ... 8192 Number of data bytes to be copied
Komentáře k této Příručce