mdrSend
This function writes devices in a batch.
■ Format
short mdrSend(long lPath, short sRoute, long lNetNo, long lIoNo, long lStNo, short sCPU, long lDevType, long lDevNo, long*
plSize, short* psData)
■ Argument
Argument
lPath
sRoute
lNetNo
lIoNo
lStNo
sCPU
lDevType
lDevNo
plSize
psData
■ Description
• This function writes data for the size specified to the write data size (plSize) starting from a device, which is specified to the
device type (lDevType) and the start device number (lDevNo), of a module specified to the network number (lNetNo), the
start I/O number (lIoNo), the station number (lStNo), and the CPU number (sCPU).
• It checks the arguments and verifies whether the address + size determined by the arguments is within the device memory
range.
• When the write data size exceeds the device range, a writable size is returned to the write data size (plSize).
• Note that the extension comment information will be deleted when the data is written to the block to which an extension
comment is assigned (extension file register).
■ Return value
Return value
0 (0000H)
Other than 0 (0000H)
■ Relevant function
Page 82 mdrClose
Page 90 mdrOpen
Page 103 mdrReceive
3 DETAILS OF FUNCTION
104
3.2 MELSEC iQ-R Series Data Link Functions
Name
Path of channel
Access route
Network number
Start I/O number
Station number
CPU number
Device type
Start device number
Write data size
Write data storage destination
Description
Normal
Error
For details on the error, refer to the following chapter.
Page 108 ERROR CODE LIST
Description
Specify the path of the opened channel.
Specify the access route to target module.
• 0: CC-Link IE Controller Network
• 1: CC-Link IE Field Network
• 2: MELSECNET/H
• 3: CC-Link
• 4: Bus interface
Specify the network number of target module.
Page 14 Argument specification
Specify the start I/O number divided by 16 of the target module.
Page 14 Argument specification
Specify the station number of target module.
Page 14 Argument specification
Specify the target CPU number.
• 0: Control CPU specification
• 1 to 4: Multiple CPU specification
Specify the device type for device to be written in batch.
Specify the start device number to be written in batch.
(For a bit device, set a device number in multiples of 8).
Specify the write data size in byte units.
(Specify the value in multiples of 4 when double-word device (LZ, LTN, LCN,
LSTN) is specified, or specify the value in multiples of 2 when a word device
or bit device is specified. If the value other than that is specified, the size
error (-5) will occur.)
Specify the storage destination (address) of write data.
(Reserve a continuous area for the write data storage destination.)
IN/OUT
IN
IN
IN
IN
IN
IN
IN
IN
IN/OUT
IN