Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 201

Controller module
Table of Contents

Advertisement

mdRandREx
This function reads devices randomly.
Format
long mdRandREx(long lPath, long lNetNo, long lStNo, long* plDev, short* psBuf, long lBufSize)
Argument
Argument
Name
lPath
Path of channel
lNetNo
Network number
lStNo
Station number
plDev
Randomly selected device
psBuf
Read data storage destination
lBufSize
Read data storage destination
size
The specification method for the randomly selected device (plDev) is as follows:
plDev
Description
plDev[0]
Number of blocks
plDev[1]
Device type
plDev[2]
Start device number
plDev[3]
Number of read points
plDev[4]
Device type
plDev[5]
Start device number
plDev[6]
Number of read points
plDev[3(n-1)+1]
Device type
plDev[3(n-1)+2]
Start device number
plDev[3(n-1)+3]
Number of read points
Description
• This function reads devices specified to the randomly selected device (plDev) from a module specified to the network
number (lNetNo) and the station number (lStNo).
• The read data is stored in the read data storage destination (psBuf) in word units in order of the specification to the
randomly selected device (plDev). A bit device is stored per 16 points, a word device is stored per 1 point, and a double-
word device is stored in word units.
• Specify so that the total number of read points specified for each block is 10240 points or less. Otherwise, a size error (-5)
occurs.
• Communication time varies significantly depending on the contents specified to the randomly selected device (plDev).
To reduce communication time, use the mdReceiveEx function.
• To access the own station, set the station number to 255. When the actual station number is used, an error will occur.
Description
Specify the path of the opened channel.
Specify the network number of target module.
Page 44 Argument specification
Specify the station number of target module.
Page 44 Argument specification
Specify the number of blocks, device type, start device number, and device points of
devices to be read.
Specify the storage destination (address) of read data.
Specify the area size reserved in the read data storage destination in byte units.
IN/OUT
IN
IN
IN
IN
OUT
IN
Block 1
Block 2
Block n
3 DETAILS OF FUNCTION
3.3 MELSEC Data Link Functions
3
199

Advertisement

Table of Contents
loading

Table of Contents