Mitsubishi Electric MELSEC iQ-R C Programming Manual page 160

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

Advertisement

mdRandRLabelEx
This function reads devices corresponding to labels randomly.
■Format
long mdRandRLabelEx(long lPath, long lNetNo, long lStNo, long* plDev, short* psBuf, long lBufSize, unsigned long long
ullLbCode)
■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
ullLbCode
Label code
The specification method of the randomly selected device (plDev) is as follows:
plDev
plDev[0]
plDev[1]
plDev[2]
plDev[3]
plDev[4]
plDev[5]
plDev[6]
plDevLst[3n+1]
plDevLst[3n+2]
plDevLst[3n+3]
• One block comprises of three elements such as device type, start device number, and number of read points, the total
number of blocks will be stored in the first element of the randomly-specified device (plDev).
■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 and a word device are 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.
• When '0' is specified to the label code (ullLbCode), the device is read without checking the label code.
3 DETAILS OF FUNCTION
158
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 number of blocks, device type, start device number, and device points of
devices to be read.
(Specify the value acquired with the mdGetLabelInfo function.)
Specify the storage destination (address) of read data.
Specify the area size reserved in the read data storage destination in byte units.
Specify the label code acquired with the mdGetLabelInfo function.
Description
Number of blocks
Device type
Start device number
Number of read points
Device type
Start device number
Number of read points
Device type
Start device number
Number of read points
IN/OUT
IN
IN
IN
IN
OUT
IN
IN
Block 1
Block 2
Block n

Advertisement

Table of Contents
loading

Table of Contents