3 DETAILS OF FUNCTION
3.2 MELSEC Data Link Functions
159
3
■
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
Bit is 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
Bit is ON.
T10 current value
'10' is stored in T10.
LCN100 to LCN101
0x1 is stored in LCN100 and 0x10000 is stored in LCN101.
plDev
Specified value
Description
plDev[0]
5
Number of blocks = 5
plDev[1]
DevM
Device type = M
Block 1: M100
plDev[2]
100
Start device number = 100
plDev[3]
1
Number of read points = 1
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
plDev[8]
0
Start device number = 0
plDev[9]
1
Number of read points = 1
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
psBuf
Read device
Read value
Description
psBuf[0]
M100
0
M100 = 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
1
M0 = 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
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......