3 DETAILS OF FUNCTION
3.2 MELSEC Data Link Functions
165
3
mdReceiveEx
This function reads devices in a batch.
■
Format
long mdReceiveEx(long lPath, long lNetNo, long lStNo, long lDevType, long lDevNo, long* plSize, short* psData)
■
Argument
■
Description
• This function reads data for the size specified to the read 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).
• When the read data size exceeds the device range, a readable size is returned to the read data size (plSize).
■
Return value
■
Relevant functions
• Page 154 mdOpen
• Page 146 mdClose
• Page 168 mdSendEx (Device batch write function)
Argument
Name
Description
IN/OUT
lPath
Path of channel
Specify the path of the opened channel.
IN
lNetNo
Network number
Specify the network number of target module.
IN
lStNo
Station number
Specify the station number of target module.
IN
lDevType
Device type
Specify the device type for device to be read in batch.
IN
lDevNo
Start device number
Specify the start device number for device to be read in batch.
(For bit devices, specify the device number in multiples of 8.)
IN
plSize
Read data size
Specify the read 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.)
IN/OUT
psData
Read data storage destination
Specify the storage destination (address) of read data.
OUT
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Summary of Contents for MELSEC iQ-R C
Page 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Page 2: ......
Page 201: ...I 199 MEMO ...
Page 203: ...I 201 MEMO ...
Page 207: ......