Mitsubishi Electric MELSEC iQ-R Series Manual page 101

Intelligent function module
Hide thumbs Also See for MELSEC iQ-R Series:
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)
Write position
Specified value
plDev[0]
3
plDev[1]
DevM
plDev[2]
100
plDev[3]
16
plDev[4]
DevD
plDev[5]
10
plDev[6]
4
plDev[7]
DevLCN
plDev[8]
100
plDev[9]
2
Values specified to the write data storage destination (psBuf)
Write position
Specified value
psBuf[0]
0
psBuf[1]
10
psBuf[2]
200
psBuf[3]
300
psBuf[4]
400
psBuf[5]
0x0001
psBuf[6]
0x0000
psBuf[7]
0x0000
psBuf[8]
0x0001
Number of bytes of write data
(psBuf[0] to psBuf[8] = 9)  2 = 18
■ Return value
Return value
Description
0 (0000H)
Normal
Other than 0 (0000H)
Error
For details on the error, refer to the following chapter.
Page 108 ERROR CODE LIST
■ Relevant function
Page 82 mdrClose
Page 90 mdrOpen
Page 91 mdrRandR
Current value
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.
Description
Number of blocks = 3
Device type = M
Start device number = 100
Number of write points = 16
Device type = D
Start device number = 10
Number of write points = 4
Device type = LCN
Start device number = 100
Number of write points = 2
Description
Turns all bit devices from M100 to M115 OFF.
D10=10
D11=200
D12=300
D13=400
Lower bit of LCN100 = 0x0001
Upper bit of LCN100 = 0x0000
Lower bit of LCN101 = 0x0000
Upper bit of LCN101 = 0x0001
Block
Block 1: M100 to M115
Block 2: D10 to D13
Block 5: LCN100 to LCN101
3 DETAILS OF FUNCTION
3.2 MELSEC iQ-R Series Data Link Functions
3
99

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-r c

Table of Contents