9 l_memwritedword, L_memwritedword, Function library lenzememdrv.lib – Lenze DDS Function library MemDrv User Manual

Page 25

Advertising
background image

Function library LenzeMemDrv.lib

Functions for RAM memory access

4.9

L_MemWriteDWORD

4−11

L

LenzeMemDrv.lib EN 1.1

4.9

L_MemWriteDWORD

INT.

L_MemWriteDWORD(dwData, byRamBlockNr, wOffset)

This function can be used to write the value of a variable of type "double word" into a RAM block of
the PLC.

wOffset

Block 1 (64KByte)

Block 2 (64 KByte)

RAM

byRamBlockNr

1

n

Block n (64 KByte)

2

Double Word

(32 Bit)

dwData

Transfer parameters

Identifiers

Data type

Info/possible settings

dwData

Double word

Data value to be written (32 bits).

byRamBlockNr

Byte

Selecting the RAM memory block into which dwData is to be written.

1 RAM memory 1, size: 64 kbytes

2 RAM memory 2, size: 64 kbytes

wOffset

Word

Destination address in the selected RAM memory block to which dwData is to be written.

0 ... 65532 Destination address (offset)

·

Only even values are permissible as offset!

Return value: Integer

Value

Meaning

0

Write request completed.

−60

Write request has not been transferred to the operating system since the transfer parameters are faulty:
byRamBlockNr is invalid.

−35

Copy job has not been transferred to the operating system since the transfer parameters are faulty:
wOffset is an odd address or a value beyond the permissible range (0 ... 65532).

−50

Copy job has not been transferred to the operating system since the memory is presently accessed
(e. g. via codes).

Advertising