
Function library LenzeMemDrv.lib
Functions for RAM memory access
5.4 L_MemSaveRamToFlash
5−5
L
LenzeMemDrv.lib EN 1.1
5.4 L_MemSaveRamToFlash
INT. L_MemSaveRamToFlash(byRamBlockNr, byFlashBlockNr)
This function can be used to save the data of a whole RAM block of the PLC permanently in a Flash
memory segment of the PLC.
· Before saving data, the function erases the selected Flash memory segment (overwrites it with
FF
hex
).
· 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 data saving 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
byRamBlockNr Byte Selecting the RAM memory block to be saved
1 RAM memory 1, size: 64 kbytes
2 RAM memory 2, size: 64 kbytes
byFlashBlockNr Byte Selecting the Flash memory segment in which the data of the selected RAM block are to be
permanently saved.
1 Flash memory segment 1, size: 64 kbytes
... ...
15 Flash memory segment 15, 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).
−55 Flash write protection has been activated; access denied.
−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.
Komentáře k této Příručce