EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 106

Mitsubishi Electric MELSEC iQ-R Series
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
104
3 DETAILS OF FUNCTION
3.2 MELSEC iQ-R Series Data Link Functions
mdrSend
This function writes devices in a batch.
Format
short mdrSend(long lPath, short sRoute, long lNetNo, long lIoNo, long lStNo, short sCPU, long lDevType, long lDevNo, long*
plSize, short* psData)
Argument
Description
This function writes data for the size specified to the write data size (plSize) starting from a device, which is specified to the
device type (lDevType) and the start device number (lDevNo), of a module specified to the network number (lNetNo), the
start I/O number (lIoNo), the station number (lStNo), and the CPU number (sCPU).
It checks the arguments and verifies whether the address + size determined by the arguments is within the device memory
range.
When the write data size exceeds the device range, a writable size is returned to the write data size (plSize).
Note that the extension comment information will be deleted when the data is written to the block to which an extension
comment is assigned (extension file register).
Return value
Relevant function
Page 82 mdrClose
Page 90 mdrOpen
Page 103 mdrReceive
Argument Name Description IN/OUT
lPath Path of channel Specify the path of the opened channel. IN
sRoute Access route Specify the access route to target module.
0: CC-Link IE Controller Network
1: CC-Link IE Field Network
•2: MELSECNET/H
3: CC-Link
4: Bus interface
IN
lNetNo Network number Specify the network number of target module.
Page 14 Argument specification
IN
lIoNo Start I/O number Specify the start I/O number divided by 16 of the target module.
Page 14 Argument specification
IN
lStNo Station number Specify the station number of target module.
Page 14 Argument specification
IN
sCPU CPU number Specify the target CPU number.
0: Control CPU specification
1 to 4: Multiple CPU specification
IN
lDevType Device type Specify the device type for device to be written in batch. IN
lDevNo Start device number Specify the start device number to be written in batch.
(For a bit device, set a device number in multiples of 8).
IN
plSize Write data size Specify the write data size in byte units.
(Specify the value in multiples of 4 when double-word device (LZ, LTN, LCN,
LSTN) is specified, or specify the value in multiples of 2 when a word device
or bit device is specified. If the value other than that is specified, the size
error (-5) will occur.)
IN/OUT
psData Write data storage destination Specify the storage destination (address) of write data.
(Reserve a continuous area for the write data storage destination.)
IN
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

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals