Tcp/Ip Communications Programming Example; Data Flow - Omron CJ1W-ETN11 Operation Manual

Sysmac cs/cj series ethernet units
Hide thumbs Also See for CJ1W-ETN11:
Table of Contents

Advertisement

Using Socket Services with CMND(490)
6-3-5

TCP/IP Communications Programming Example

System Configuration

Data Flow

Host computer
Processing in
host computer
Basic Operations
146
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.
The following programming example illustrates transferring 100 bytes of data
between an Ethernet Unit and a host computer using TCP/IP communica-
tions.
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.
Host computer
IP address:
Port number: 4096
The data will flow between the CPU Unit, Ethernet Unit, and host computer as
shown in the following diagram.
Line
(Ethernet)
Sent to line.
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).
• 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.
Ethernet Unit
196.36.32.55
IP address:
Port number:
FINS network address:
Node address:
Unit number:
Ethernet
CPU Unit
Unit
Request Switches and
execution bits turned ON
(See note.)
CMND(490) response
Results stored in results
storage area
Execution bits turned OFF
Section 6-3
PC
196.36.32.101
4096
01 Hex
01 Hex
10 Hex

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1w-etn11Cs/cj seriesCs1w-etn01W343-e1-07

Table of Contents