166
3 DETAILS OF FUNCTION
3.2 MELSEC Data Link Functions
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
■
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.
Argument
Name
Description
IN/OUT
lPath
Path of channel
Specify the path of the opened channel.
IN
lNetNo
Network number
Specify '0' (0H).
IN
lStNo
Station number
Specify own station 255 (FFH).
IN
lDevType
Device type
Specify the device type for device to be read in batch.
Only "RECV function: 101 (65H and DevMAIL)" is available.
IN
lDevNo
Channel number
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
IN
plSize
Receive message size
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.)
IN/OUT
psData
Receive data storage destination
Specify the storage destination (address) of receive data.
Data equivalent to 6 + a value specified to plSize (bytes) are specified.
OUT
psData
Description
psData[0]
Send station network number
psData[1]
Send station number
psData[2]
Channel used by send station
psData[3] or higher
• Received message (actual data)
• (2 to 1920 bytes)
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......