Mitsubishi Electric MELSEC iQ-R Series Manual page 93

Intelligent function module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

mdrRandR
This function reads devices randomly.
■ Format
short mdrRandR(long lPath, short sRoute, long lNetNo, long lIoNo, long lStNo, short sCPU, long* plDev, short* psBuf, long
lBufSize)
■ Argument
Argument
Name
lPath
Path of channel
sRoute
Access route
lNetNo
Network number
lIoNo
Start I/O number
lStNo
Station number
sCPU
CPU number
plDev
Randomly selected device
psBuf
Read data storage destination
lBufSize
Read data storage destination size
The specification method of the randomly selected device (plDev) is as follows:
Specification
Description
position
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
plDevLst[3n+1]
Device type
plDevLst[3n+2]
Start device number
plDevLst[3n+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), the start I/O number (lIoNo), the station number (lStNo), and the CPU number (sCPU).
• 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)
will occur.
• Communication time varies significantly depending on the contents specified to the randomly selected device (plDev).
To reduce communication time, use the mdrReceive 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 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 number of blocks, device type, start device number, and points of
devices to be read.
Specify the storage destination (address) of read data.
Specify the size of area reserved in the read data storage destination in byte
units.
3.2 MELSEC iQ-R Series Data Link Functions
IN/OUT
IN
IN
IN
IN
IN
IN
IN
OUT
IN
Block
Block 1
Block 2
Block n
3 DETAILS OF FUNCTION
3
91

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-r c

Table of Contents