Mitsubishi Electric MELSEC iQ-R C Programming Manual page 166

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
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
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
*1 For a return value which does not exist in the reference, refer to the manual for the programmable controller CPU. (MELSEC iQ-R
CPU Module User's Manual (Application))
■Relevant functions
• Page 154 mdOpen
• Page 146 mdClose
• Page 150 mdGetLabelInfo
• Page 158 mdRandRLabelEx
3 DETAILS OF FUNCTION
164
3.2 MELSEC Data Link Functions
Description
Turns the bit 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
1
Number of write points = 1
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
M100 = 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 chapter.
Page 174 ERROR CODE LIST
Block 1: M100
Block 2: D10 to D13
Block 3: LCN100 to LCN101
*1

Advertisement

Table of Contents
loading

Table of Contents