158
3 DETAILS OF FUNCTION
3.2 MELSEC Data Link Functions
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
The specification method of the randomly selected device (plDev) is as follows:
• 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.
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
plDev
Randomly selected device
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.)
IN
psBuf
Read data storage destination
Specify the storage destination (address) of read data.
OUT
lBufSize
Read data storage destination
size
Specify the area size reserved in the read data storage destination in byte units.
IN
ullLbCode
Label code
Specify the label code acquired with the mdGetLabelInfo function.
IN
plDev
Description
plDev[0]
Number of blocks
plDev[1]
Device type
Block 1
plDev[2]
Start device number
plDev[3]
Number of read points
plDev[4]
Device type
Block 2
plDev[5]
Start device number
plDev[6]
Number of read points
plDevLst[3n+1]
Device type
Block n
plDevLst[3n+2]
Start device number
plDevLst[3n+3]
Number of read points
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......