Mitsubishi Electric MELSEC iQ-R C Programming Manual page 170

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

mdSendEx
This function writes devices in a batch.
■Format
long mdSendEx(long lPath, long lNetNo, long lStNo, long lDevType, long lDevNo, long* plSize, short* psData)
■Argument
Argument
Name
lPath
Path of channel
lNetNo
Network number
lStNo
Station number
lDevType
Device type
lDevNo
Start device number
plSize
Write data size
psData
Write data storage destination
■Description
• This function writes data for the size specified to the write data size (plSize) from a device specified to the device type
(lDevType) and the start device number (lDevNo) of a module specified to the network number (lNetNo) and the station
number (lStNo).
• 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
■Relevant functions
• Page 154 mdOpen
• Page 146 mdClose
• Page 165 mdReceiveEx (Device batch read function)
3 DETAILS OF FUNCTION
168
3.2 MELSEC Data Link Functions
Description
Specify the path of the opened channel.
Specify the network number of target module.
Page 9 Argument specification
Specify the station number of target module.
Page 9 Argument specification
Specify the device type for device to be written in batch.
Specify the start device number to be written in batch.
(For bit devices, specify the device number in multiples of 8.)
Specify the write data size in byte units.
(Specify the value in multiples of 4 when a 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.
Description
Normal
Error
For details on the error, refer to the following chapter.
Page 174 ERROR CODE LIST
IN/OUT
IN
IN
IN
IN
IN
IN/OUT
IN

Advertisement

Table of Contents
loading

Table of Contents