Mitsubishi Electric MELSEC iQ-R C Programming Manual page 168

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

mdReceiveEx
This function receives messages. (RECV function)
■Format
long mdReceiveEx(long lPath, long lNetNo, long lStNo, long lDevType, long lDevNo, long* plSize, short* psData)
■Argument
Argument
Name
lPath
Path of channel
lNetNo
Network number
lStNo
Station number
lDevType
Device type
lDevNo
Channel number
plSize
Receive message size
psData
Receive data storage destination
■Description
• This function supports the RECV instruction, the dedicated instruction for a CC-Link IE Controller Network module, a CC-
Link IE Field Network module, or a MELSECNET/H network module, when a value specified to the path of channel (lPath)
is a value returned with the mdOpen function by specifying CC-Link IE Controller Network (channel No.151 to 158), CC-
Link IE Field Network (channel No.181 to 188), or MELSECNET/H network (channel No.51 to 54), and "RECV function:
101" is specified for the device type.
• It receives the message to the channel specified to the channel number (lDevNo) from among the messages sent to a CC-
Link IE Controller Network module, a CC-Link IE Field Network module, or a MELSECNET/H network module.
• Check that the RECV execution request flag of a network module is ON before executing this function.
• For more advanced RECV function, use the C Controller module dedicated functions. This mdReceiveEx function reads the
message to the specified channel number in the order it was received.
• When the actual size of a received message is smaller than the value specified to the receive message size (plSize), data
of the actual size is stored in the receive data storage destination (psData[3] or higher), and the data size of the received
message is returned to the receive message size (plSize).
• When the actual size of a received message is bigger than the value specified to the receive message size (plSize), data
up to the specified size is stored in the receive data storage destination (psData[3] or higher).
• A received message is stored in the receive data storage destination (psData).
Information on a message send source (network number, station number, and used channel of a send station) is stored in
psData[0] to psData[2]. Therefore, the storage size of a received message is '6' + (plSize) byte.
psData
psData[0]
psData[1]
psData[2]
psData[3] or higher
3 DETAILS OF FUNCTION
166
3.2 MELSEC Data Link Functions
Description
Specify the path of the opened channel.
Specify '0' (0H).
Specify own station 255 (FFH).
Specify the device type for device to be read in batch.
Only "RECV function: 101 (65H and DevMAIL)" is available.
Specify the channel number.
• CC-Link IE Controller Network: 1 to 8
• CC-Link IE Field Network: 1 to 2
• MELSECNET/H network: 1 to 8
Specify the receive message size in byte units. (2 to 1920)
(Specify the size with an even number. If it is specified with an odd number, the size error
(-5) will occur.)
Specify the storage destination (address) of receive data.
Data equivalent to 6 + a value specified to plSize (bytes) are specified.
Description
Send station network number
Send station number
Channel used by send station
• Received message (actual data)
• (2 to 1920 bytes)
IN/OUT
IN
IN
IN
IN
IN
IN/OUT
OUT

Advertisement

Table of Contents
loading

Table of Contents