8 BUILT-IN ETHERNET FUNCTION INSTRUCTIONS
8.1 Open/Close Processing Instructions
1087
8
• This instruction opens the connection specified by (s1). The setting value used for open processing is selected by (s2)+0.
• The execution status and the completion status of the SP.SOCOPEN instruction can be checked with the completion device
(d) and the completion status indication device (d)+1.
• The following figure shows the execution timing of the SP.SOCOPEN instruction.
• A connection which has not been set by a parameter (a connection whose protocol field is left blank) can be opened and
used. To do so, set (s2)+0 to 8000H and specify the details of open in (s2)+1 to (s2+9 of control data.
Upon completion with an error, the completion status indication device (d)+1 is turned on and 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)
• Completion device (d)
This device turns on during END processing of the scan where the SP.SOCOPEN instruction completes, and turns off during the next END processing.
• Completion status indication device (d)+1
This device turns on or off depending on the completion status of the SP.SOCOPEN instruction.
When completed successfully: The device remains off.
When completed with an error: The device turns on during END processing of the scan where the SP.SOCOPEN instruction completes, and turns off during the
next END processing.
Error code
(SD0)
Description
3405H The connection number specified by (s1) is a value other than 1 to 16.
END0 END0END0END0
OFF
OFF
OFF
OFF
ON
ON
Sequence scan
SP.SOCOPEN
instruction
Completion device (d)
Completion status
indication device (d)+1
Completed successfully
1 scan
Opening a connection
Execution of the instruction
Completed with an error