Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 208

Controller module
Table of Contents

Advertisement

Example
The following tables show the examples of values specified to the randomly selected device (plDev) and the write data
storage destination (psBuf), and the number of bytes of write data.
Device to be written randomly
M100 to M115
D10 to D13
LCN100 to LCN101
Values specified to the randomly selected device (plDev)
plDev
plDev[0]
plDev[1]
plDev[2]
plDev[3]
plDev[4]
plDev[5]
plDev[6]
plDev[7]
plDev[8]
plDev[9]
Values specified to the write data storage destination (psBuf)
psBuf
psBuf[0]
psBuf[1]
psBuf[2]
psBuf[3]
psBuf[4]
psBuf[5]
psBuf[6]
psBuf[7]
psBuf[8]
Number of bytes of write data
(psBuf[0] to psBuf[8] = 9)  2 = 18
Return value
Return value
0 (0000H)
Other than 0
Relevant functions
• Page 198 mdOpen
• Page 190 mdClose
• Page 199 mdRandREx
3 DETAILS OF FUNCTION
206
3.3 MELSEC Data Link Functions
Description
Turns all the bits OFF.
Stores 10 in D10, 200 in D11, 300 in D12, and 400 in D13.
Stores 0x1 in LCN100, and 0x10000 in LCN101.
Specified value
Description
3
Number of blocks = 3
DevM
Device type = M
100
Start device number = 100
16
Number of write points = 16
DevD
Device type = D
10
Start device number = 10
4
Number of write points = 4
DevLCN
Device type = LCN
100
Start device number = 100
2
Number of write points = 2
Specified value
Description
0
Turns all bit devices from M100 to M115 OFF.
10
D10 = 10
200
D11 = 200
300
D12 = 300
400
D13 = 400
0x0001
Lower bit of LCN100
0x0000
Upper bit of LCN100
0x0000
Lower bit of LCN101
0x0001
Upper bit of LCN101
Description
Normal
Error
For details on the error, refer to the following:
Page 225 ERROR CODE LIST
Block 1: M100 to M115
Block 2: D10 to D13
Block 3: LCN100 to LCN101

Advertisement

Table of Contents
loading

Table of Contents