1108
8 BUILT-IN ETHERNET FUNCTION INSTRUCTIONS
8.2 Socket Communications Instructions
■Control data
These instructions read data by the number of words specified by (n) from the socket communications receive data area of
the connection specified by (s1), and store them in the device specified by (d) and later. If the read data (n) is 0, no processing
is performed.
• The receive data length can be read by setting the number of read data to 1 word. As a result, the device for
storing receive data when the SP.SOCRCV or S.COSCRCVS instruction is executed can be changed.
• After issuing the S(P).SOCRDATA instruction to check the data to be received this time and issuing the
SP.SOCRMODE instruction to specify the size of the data to be received next time, the SP.SOCRCV or
S.SOCRCVS instruction can be used to read the data of this time. As a result, based on the data received
this time, the size of data to be received next can be specified.
When completed with an error, an error code is stored in the completion status (s2)+1.
For the error code stored in the completion status (s2)+1, refer to the following.
MELSEC iQ-R Ethernet User's Manual (Application)
Operand: (s2)
Device Item Description Setting range Set by
+0 System area
+1 Completion status The completion status is stored upon completion of the instruction.
• 0000H: Completed successfully
• Other than 0000H: Completed with an error (error code)
System
Error code
(SD0)
Description
3405H The connection number specified by (s1) is a value other than 1 to 16.
The value of the device specified by (n) exceeds 5120.