Lenze DDS Function library MemDrv Manuale Utente Pagina 30

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 34
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 29
5.2 L_MemClearFlash
Function library LenzeMemDrv.lib
Functions for RAM memory access
5−2
L
LenzeMemDrv.lib EN 1.1
5.2 L_MemClearFlash
INT. L_MemClearFlash(byFlashBlockNr)
This function can be used to erase a memory segment from the Flash memory of the PLC.
· After erasing the selected memory segment, all data in this segment have the value 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 erasing has been completed.
Segment 1 (64KByte)
Segment 2 (64KByte)
Segment n (64KByte)
byFlashBlockNr
FLASH
CLEAR
FF
hex
Transfer parameters
Identifiers Data type Info/possible settings
byFlashBlockNr Byte Selecting the Flash memory segment to be erased.
1 Flash memory segment 1, size: 64 kbytes
... ...
15 Flash memory segment 15, size: 64 kbytes
Return value: Integer
Value Meaning
0 Erase request 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.
−65 Erase request 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.
Example
Calling the function in ST:
(* clear FLASH segment 2 *)
nReturn := L_MemClearFlash(byFlashBlockNr := 2);
(* check function return value *)
Vedere la pagina 29
1 2 ... 25 26 27 28 29 30 31 32 33 34

Commenti su questo manuale

Nessun commento