11 l_memwriteword, Function library lenzememdrv.lib – Lenze DDS Function library MemDrv User Manual

Page 27

Advertising
background image

Function library LenzeMemDrv.lib

Functions for RAM memory access

4.11

L_MemWriteWORD

4−13

L

LenzeMemDrv.lib EN 1.1

4.11

L_MemWriteWORD

INT.

L_MemWriteWORD(wData, byRamBlockNr, wOffset)

This function can be used to write the value of a variable of type "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

Word

(16 Bit)

wData

Transfer parameters

Identifiers

Data type

Info/possible settings

wData

Word

Data value to be written (16 bits).

byRamBlockNr

Byte

Selecting the RAM memory block into which wData 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 wData is to be written.

0 ... 65534 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 ... 65534).

−50

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

Advertising