152
3 DETAILS OF FUNCTION
3.2 MELSEC Data Link Functions
■
Example
The following tables show the examples of values specified to the label name array (pLbLst) and data read to the device name
array (plDevLst). (For five labels to be read: Label 1 to 5).
1.
Describe a target label name in a text file, and save it by specifying Unicode (UTF-16).
2.
Read the label name in a binary format on a user program from the saved text file, and store the address of the label
name to pass to the label name array (pLbLst) on the memory.
• Values specified to pLbLst
• Value to be read to plDevLst
■
Return value
*1 For a return value which does not exist in the reference, refer to the manual for the CPU module. (
MELSEC iQ-R CPU Module
User's Manual (Application))
■
Relevant function
• Page 154 mdOpen
• Page 146 mdClose
• Page 158 mdRandRLabelEx
• Page 163 mdRandWLabelEx
pLbLst
Specified value
Description
pLbLst[0]
First (Label1) label name storage address
Label name
pLbLst[1]
Second (Label2) label name storage address
Label name
pLbLst[2]
Third (Label3) label name storage address
Label name
pLbLst[3]
Fourth (Label4) label name storage address
Label name
pLbLst[4]
Fifth (Label5) label name storage address
Label name
plDev
Read value
Description
plDev[0]
4
Number of blocks
plDev[1]
DevD
Device type
plDev[2]
10
Start device number
plDev[3]
1
Number of read points
plDev[4]
DevD
Device type
plDev[5]
11
Start device number
plDev[6]
1
Number of read points
plDev[7]
DevM
Device type
plDev[8]
100
Start device number
plDev[9]
1
Number of read points
plDev[10]
DevM
Device type
plDev[11]
101
Start device number
plDev[12]
1
Number of read points
plDev[13]
DevM
Device type
plDev[14]
102
Start device number
plDev[15]
1
Number of read points
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......