Omron CS1W-ETN11 Network Card User Manual


 
146
Using Socket Services with CMND(490) Section 6-3
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-3-5 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 communica-
tions.
System Configuration
The system configuration for the program example and the Ethernet Unit sys-
tem setup are shown below. To establish a TCP connection, the Ethernet Unit
is passively opened and the host computer actively opened.
Data Flow
The data will flow between the CPU Unit, Ethernet Unit, and host computer as
shown in the following diagram.
Note Here, “execution bits” refer to CIO 000000 to CIO 000003, which are used in
the ladder diagram to control execution of communications and are not sys-
tem flags, such as the Port Enabled Flags (A20200 to A20207).
Basic Operations
CIO 000000 is turned ON to request opening a passive TCP socket from
the Ethernet Unit.
CIO 000001 is turned ON to request closing the TCP socket from the
Ethernet Unit.
CIO 000002 is turned ON to request sending data from the Ethernet Unit.
Data (100 bytes) is sent beginning at D02005.
CIO 000003 is turned ON to request receiving data from the Ethernet
Unit. The data that is received (100 bytes) is stored beginning at D04022.
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
PC
CMND(490) response
Results stored in results
storage area
Execution bits turned OFF
Host computer
Line
(Ethernet)
Ethernet
Unit
CPU Unit
Request Switches and
execution bits turned ON
(See note.)
Sent to line.
Processing in
host computer