Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1107

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

■TCP fixed-length receive mode
Upon receipt of data, the instruction stores the data in the socket communications receive data area. If the specified receive
data size is not reached, SD1506 (socket communications receive status signal) does not turn on.
Data reception is repeated until the received data reaches the receive data size. When it reaches the receive data size,
SD1506 (socket communications receive status signal) turns on.
If the received data exceeds the specified receive data size, the excess data becomes the next receive data.
If data is received later before data is read from the socket communications receive data area using the SP.SOCRCV or
S.SOCRCVS instruction, it is stored in the receive data area in the OS.
If the receive data area in the OS contains data when data is read from the socket communications receive data area using
the SP.SOCRCV or S.SOCRCVS instruction, the instruction stores the data in the socket communications receive data area,
but does not turn on SD1506 (socket communications receive status signal) if the data has not reached the specified receive
data size.
Thereafter, data reception is repeated until the received data reaches the receive data size. When it reaches the receive data
size, SD1506 (socket communications receive status signal) turns on.
Ex.
When 200 bytes of data is received continuously while the receive data size is set to 300 bytes
Reading receive data
Socket communications
receive data storage area
Socket communications
OFF
reception status signal
(SD1506.n)
Receiving data
(200 bytes)
• Effective use of devices
The receive data storage device used by the SP.SOCRCV or S.SOCRCVS instruction needs a 1024-word
area by default. Specifying the receive data size in 1024 words or less enables effective use of the device.
• Preventing receive data from being divided
Depending on the line type, data to be received from the external device may be divided before arrival. In this
case, specifying the receive data size in TCP fixed-length receive mode can prevent receive data from being
divided.
• Preventing receive data from being connected
Due to a delay in receive processing of the sequence program, data which has been divided and sent may be
connected before receiving depending on the external device.
Specifying the receive data size in TCP fixed-length receive mode enables data to be correctly divided and
received.
• The size of the receive data to be read once by the SP.SOCRCV or S.SOCRCVS instruction is specified in (s2)+3. In the
case of UDP, if the received data exceeds the specified receive data size, the excess data becomes the next receive data.
Data cannot be read because the data size
has not reached the specified size.
Storing data
(200 bytes)
Receiving data
(200 bytes)
SP.SOCRCV or
S.SOCRCVS instruction
Reading data
Storing data
(300 bytes)
ON
8 BUILT-IN ETHERNET FUNCTION INSTRUCTIONS
8.2 Socket Communications Instructions
The rest of data (100 bytes)
will be stored when next
data (200 bytes) are received.
OFF
1105
8

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents