![](/images/new-backgrounds/1193384/193384329x1.webp)
Using Socket Services with CMND(490) | Section |
■CLOSE REQUEST during RECEIVE REQUEST
RECEIVE REQUEST | CLOSE REQUEST |
command received | command received |
Port Enabled Flag | 1 |
0 | |
CMND(490) (RECEIVE REQUEST) |
|
response command |
|
CMND(490) (CLOSE REQUEST) |
|
response command |
|
Receive Flag | 1 |
0 | |
Close Flag | 1 |
0 | |
Opening Flag | 1 |
0 |
Results storage area for
RECEIVE REQUEST
Results storage area for
CLOSE REQUEST
| Running |
| Running |
|
Normal response code
Normal response code
Store error response code
Store normal response code
Note The timing shown in the above diagram occurs if a CLOSE REQUEST com- mand is executed during SEND REQUEST command execution. The timing shown in the diagram also applies if a CLOSE REQUEST command is exe- cuted during OPEN REQUEST command execution, with the exception of the status of the Opening Flag.
6-8-8 TCP/IP Communications Programming Example
The following programming example illustrates transferring 100 bytes of data between an Ethernet Unit and a host computer using TCP/IP communications.
System Configuration
The system configuration for the program example and the Ethernet Unit system setup are shown below. To establish a TCP connection, the Ethernet Unit is passively opened and the host computer actively opened.
Host computer
Ethernet Unit
PLC
IP address: | 196.36.32.55 | IP address: | 196.36.32.101 |
Port number: | 4096 | Port number: | 4096 |
|
| FINS network address: | 01 Hex |
|
| Node address: | 01 Hex |
|
| Unit number: | 10 Hex |
141