Mitsubishi Electric MELIPC MI5000 Series Programming Manual page 110

Vxworks
Hide thumbs Also See for MELIPC MI5000 Series:
Table of Contents

Advertisement

Example
The following tables show the examples of random-specified devices (plDev), data configured for 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]
• Data configured 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
For details on error codes, refer to the following section.
Page 116 Function error codes
Relevant function
Page 99 mdClose
Page 103 mdOpen
Page 104 mdRandREx
3 DETAILS OF FUNCTIONS
108
3.3 MELSEC Data Link Functions
Specified value
3
DevM
100
16
DevD
10
4
DevLCN
100
2
Specified value
0
10
200
300
400
0x0001
0x0000
0x0000
0x0001
Description
Normal
Error
Description
All bits are 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 read points = 16
Device type = D
Start device number = 10
Number of read points = 4
Device type = LCN
Start device number = 100
Number of read points = 2
Description
All the bit devices from M100 to M115 are OFF.
D10=10
D11=200
D12=300
D13=400
Lower bit of LCN100
Upper bit of LCN100
Lower bit of LCN101
Upper bit of LCN101
Block 1: M100 to M115
Block 2: D10 to D13
Block 3: LCN100 to LCN101

Advertisement

Table of Contents
loading

Table of Contents