Lenze DDS Function library MemDrv Uživatelský manuál Strana 17

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 34
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 16
Function library LenzeMemDrv.lib
Functions for RAM memory access
4.2 L_MemCopyFromRam
4−3
L
LenzeMemDrv.lib EN 1.1
Return value: Integer
Value Meaning
0 Copy job has been successfully transferred to the operating system.
−10 Copy job has not been transferred to the operating system since the transfer parameters are faulty:
wLength = 0.
−20 Copy job has not been transferred to the operating system since the transfer parameters are faulty:
pbyData does not point to the PLC memory area.
−30 Copy job has not been transferred to the operating system since the transfer parameters are faulty:
The values for wLength and wOffset do not fit together.
−40 Copy jopb 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.
−80 Function is not supported by the operating system.
Example
Calling the function in ST:
(* copy from RAM if last copy action (L_MemCopyFromRam) *)
(* is finished *)
nMemState := L_MemGetStateDriver(byVoid := 0);
bDriverBusy := INT_TO_BOOL(nMemState AND 16#0002);
IF bDriverBusy = FALSE THEN
nReturn := L_MemCopyFromRam(byRamBlockNr := 2,
wOffset := 512,
pbyData := ADR(g_abyDataBuffer),
wLength := 256);
END_IF
(* check return value of CopyFromRam function *)
Zobrazit stránku 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 33 34

Komentáře k této Příručce

Žádné komentáře