3 l_memloadramfromflash, L_memloadramfromflash, Function library lenzememdrv.lib – Lenze DDS Function library MemDrv User Manual
Page 31

Function library LenzeMemDrv.lib
Functions for RAM memory access
5.3
L_MemLoadRamFromFlash
5−3
L
LenzeMemDrv.lib EN 1.1
5.3
L_MemLoadRamFromFlash
INT.
L_MemLoadRamFromFlash(byFlashBlockNr, byRamBlockNr)
This function can be used to load (permanently saved) data of a whole Flash memory segment of the
PLC into 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 loading has been completed.
Block 1 (64KByte)
RAM
byRamBlockNr
Block 2 (64KByte)
Segment 1 (64KByte)
Segment 2 (64KByte)
Segment n (64KByte)
byFlashBlockNr
FLASH
Block n (64KByte)
Transfer parameters
Identifiers
Data type
Info/possible settings
byFlashBlockNr
Byte
Selecting the Flash memory segment including data to be loaded.
1 Flash memory segment 1, size: 64 kbytes
... ...
15 Flash memory segment 15, size: 64 kbytes
byRamBlockNr
Byte
Selecting the RAM memory block into which the data of the selected Flash memory segment are to be
loaded.
1 RAM memory 1, size: 64 kbytes
2 RAM memory 2, size: 64 kbytes
Return value: Integer
Value
Meaning
0
Copy job has been successfully transferred to the operating system.
−40
Copy job has not been transferred to the operating system since the copy driver is still processing the previous memory
management function.
−50
Copy job has not been transferred to the operating system since the memory is presently accessed
(e. g. via codes).
−60
Copy job has not been transferred to the operating system since the transfer parameters are faulty:
byRamBlockNr is invalid.
−65
Copy job has not been transferred to the operating system since the transfer parameters are faulty:
byFlashBlockNr is invalid.
−80
Function is not supported by the operating system.