628
8 BUILT-IN ETHERNET FUNCTION INSTRUCTIONS
8.2 Socket Communications Function Instructions
This instruction send the data set by (s3) to the target device of the connection specified by (s1).
The completion of the SP.SOCSND instruction can be checked using the completion devices (d)+0 and (d)+1.
• Completion device (d)+0: Turns ON during the END processing for the scan in which the SP.SOCSND instruction is
completed, and turns OFF during the next END processing.
• Completion device (d)+1: Turns ON or OFF depending on the status when the SP.SOCSND instruction is completed.
The following figure shows the timing of the send processing with the SP.SOCSND instruction.
For details, refer to  Built-in Ethernet communication manual.
Status Description
When completed normally The device does not change (remains OFF).
When completed with an error The device turns ON during the END processing for the scan in which the SP.SOCSND instruction is completed, and turns
OFF during the next END processing.
Error code
(SD0/SD8067)
Description
3405 The connection number specified by (s1) is other than 1 to 8.
2820 The device number specified by (s2), (s3), or (d) is outside the range of the number of device points.
2822 Device that cannot be specified is specified.
3582 When an instruction which cannot be used in interruption routine program is used.
CPU module
Send data length
Send data
Send data
Send data
(s3)+0
(s3)+1
(s3)+2
(s3)+n
External device
SP.SOCSND
(Sending data)
Sequence program
END processing END processing
When failed
SP.SOCSND instruction
Completion device (d)+0
Completion device (d)+1
Execute SP.SOCSND instruction
ON
OFF
ON
OFF
ON
OFF
1 scan
<Sending control method>
END processing
Send
data
Open
processing
*1
Data send
processing
Data
transmission
(send)
*1
Open completion signal
(SD10680.n)
Even after completion device
turns ON, data transmission
may continue.