Omron CJ1W-ETN21 Network Card User Manual


 
141
Using Socket Services with CMND(490) Section 6-8
CLOSE REQUEST during RECEIVE REQUEST
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.
RECEIVE REQUEST
command received
CLOSE REQUEST
command received
1
0
1
0
Normal response code
RunningRunning
CMND(490) (CLOSE REQUEST)
response command
Results storage area for
RECEIVE REQUEST
Results storage area for
CLOSE REQUEST
Normal response code
CMND(490) (RECEIVE REQUEST)
response command
1
0
Close Flag
1
0
Receive Flag
Store error response code
Opening Flag
Store normal response code
Port Enabled Flag
Host computer
Ethernet Unit
IP address: 196.36.32.55
Port number: 4096
IP address: 196.36.32.101
Port number: 4096
FINS network address: 01 Hex
Node address: 01 Hex
Unit number: 10 Hex
PLC