Overview | Section |
reception, data is received to the send/receive data addresses set in the parameter area.
6-3-3 Using Socket Services with CMND(490)
Service request commands can be sent to the Ethernet Unit by executing the CMND(490) instruction in the ladder diagram. CS/CJ Ethernet Units support the same functionality as the
Up to 16 sockets can be connected using CMND(490): 8 UDP sockets and 8 TCP sockets.
The socket service request commands that can be used are listed in the following table. Refer to Section 7 FINS Commands Addressed to Ethernet Units in the Operation Manual, Construction of Networks for details.
Command code | Name | |
|
|
|
MRC | SRC |
|
|
|
|
27 | 01 | UDP OPEN REQUEST |
|
|
|
| 02 | UDP RECEIVE REQUEST |
|
|
|
| 03 | UDP SEND REQUEST |
|
|
|
| 04 | UDP CLOSE REQUEST |
|
|
|
| 10 | TCP PASSIVE OPEN REQUEST |
|
|
|
| 11 | TCP ACTIVE OPEN REQUEST |
|
|
|
| 12 | TCP RECEIVE REQUEST |
|
|
|
| 13 | TCP SEND REQUEST |
|
|
|
| 14 | TCP CLOSE REQUEST |
Requests sent to the Ethernet Unit by sending commands through execution of CMND(40), and when the Unit receives a command, it will return a response. The response does not, however, indicate that processing has been completed, and the status of the flags in the Socket Status Words allocated to the Unit must be used to determine when processing has been completed.
The results of processing will be stored in the words specified when CMND(490) was executed once the requested processing has been completed.
6-3-4 Specific Socket Service Functions
The socket service functions listed in the following table can be executed either using Socket Service Request Switches or using CMND(490).
Protocol | Socket service request | |
|
|
|
UDP | Open UDP socket | |
|
|
|
|
| Receive via UDP socket |
|
|
|
|
| Send via UDP socket |
|
|
|
|
| Close UDP socket |
|
| |
TCP | Open TCP socket, passive | |
|
|
|
|
| Open TCP socket, active |
|
|
|
|
| Receive via TCP socket |
|
|
|
|
| Send via TCP socket |
|
|
|
|
| Close TCP socket |
|
|
|
105