92
3 DETAILS OF FUNCTION
3.2 MELSEC iQ-R Series Data Link Functions
■ Example
The following tables show the examples of values specified to the randomly selected device (plDev), values read to the read
data storage destination (psBuf), and the number of bytes of read data.
Values specified to the randomly selected device (plDev)
Values read to the read data storage destination (psBuf)
Number of bytes of read data
(psBuf[0] to psBuf[10] = 11) 2 = 22
Device to be read randomly Current value
M100 to M115 All bits are OFF.
D10 to D13 10 is stored in D10, 200 is stored in D11, 300 is stored in D12, and 400 is stored in D13.
M0 to M13 All bits are ON.
T10 '10' is stored in T10.
LCN100 to LCN101 0x1 is stored in LCN100 and 0x10000 is stored in LCN101.
Specification
position
Specified value Description Block
plDev[0] 5 Number of blocks = 5
plDev[1] DevM Device type = M Block 1: M100 to M115
plDev[2] 100 Start device number = 100
plDev[3] 16 Number of read points = 16
plDev[4] DevD Device type = D Block 2: D10 to D13
plDev[5] 10 Start device number = 10
plDev[6] 4 Number of read points = 4
plDev[7] DevM Device type = M Block 3: M0 to M13
plDev[8] 0 Start device number = 0
plDev[9] 14 Number of read points = 14
plDev[10] DevTN Device type = T Block 4: T10
plDev[11] 10 Start device number = 10
plDev[12] 1 Number of read points = 1
plDev[13] DevLCN Device type = LCN Block 5: LCN100 to LCN101
plDev[14] 100 Start device number = 100
plDev[15] 2 Number of read points = 2
Storage position Read device Read value Description
psBuf[0] M100 to M115 0 All the bit devices from M100 to M115 are OFF.
psBuf[1] D10 10 D10=10
psBuf[2] D11 200 D11=200
psBuf[3] D12 300 D12=300
psBuf[4] D13 400 D13=400
psBuf[5] M0 to M13 3FFFH All the bit devices from M0 to M13 are ON.
psBuf[6] T10 10 T10=10
psBuf[7] LCN100 0x1 Lower bit of LCN100 = 0x0001
psBuf[8] Upper bit of LCN100 = 0x0000
psBuf[9] LCN101 0x10000 Lower bit of LCN101 = 0x0000
psBuf[10] Upper bit of LCN101 = 0x0001