88
3 DETAILS OF FUNCTION
3.2 MELSEC iQ-R Series Data Link Functions
■ Example
The following tables show the examples of values set to the label name array (pLbLst) and data read to the device name array
(plDevLst). (For five labels to be read: Label1 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 binary format from the saved text file on a user program, and store the address of the label name
passed to the label name array (pLbLst) on the memory.
• Values set to the label name array (pLbLst)
• Data to be read to the device name array (plDevLst)
■ Return value
*1 For return values which do 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 82 mdrClose
Page 90 mdrOpen
Page 94 mdrRandRLabel
Page 100 mdrRandWLabel
Setting target Setting 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
Read position Value to be read Description
plDevLst[0] 5 Number of blocks
plDevLst[1] DevD Device type
plDevLst[2] 10 Start device number
plDevLst[3] 1 Number of read points
plDevLst[4] DevD Device type
plDevLst[5] 11 Start device number
plDevLst[6] 1 Number of read points
plDevLst[7] DevM Device type
plDevLst[8] 100 Start device number
plDevLst[9] 1 Number of read points
plDevLst[10] DevM Device type
plDevLst[11] 101 Start device number
plDevLst[12] 1 Number of read points
plDevLst[13] DevM Device type
plDevLst[14] 102 Start device number
plDevLst[15] 1 Number of read points
Return value Description
0 (0000H) Normal
Other than 0 (0000H) Error
For details on the error, refer to the following chapter.
*1
Page 108 ERROR CODE LIST