Udp/Ip Communications Programming Example; Basic Operations - Omron CS CJ1W-ETN21 Operation Manual

Sysmac cs and cj series ethernet units construction of applications
Hide thumbs Also See for CS CJ1W-ETN21:
Table of Contents

Advertisement

Using Socket Services with CMND(490)
6-8-9

UDP/IP Communications Programming Example

System Configuration

Basic Operations

The following programming example illustrates transferring 100 bytes of data
between
an
Ethernet
communications.
For the UDP connection, the Ethernet Unit uses a PASSIVE OPEN and the
host computer uses an ACTIVE OPEN.
The system configuration for the program example and the Ethernet Unit
system setup are shown below.
Host computer
IP address:
196.36.32.55
Port number: 4096
• CIO 000000 is turned ON to request opening a UDP socket from the
Ethernet Unit.
• CIO 000001 is turned ON to request closing the UDP 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 D02008.
• CIO 000003 is turned ON to request receiving data from the Ethernet
Unit. The data that is received (100 bytes) is stored beginning at D04025.
• One of the bits between CIO 000100 and CIO 000103 will turn ON if an
error occurs. Refer to 6-7-5 Socket Service Request Switches for informa-
tion on errors. The following areas can be used to access details about
errors:
CMND(490) response codes
Response codes in results storage area
Network Communications Error Flags (A21900 to A21907)
Completion codes (A203 to A210)
Unit
and
a
host
computer
Ethernet Unit
IP address:
Port number:
FINS network address:
Node address:
Unit number:
Section 6-8
using
UDP/IP
PLC
196.36.32.101
4096
01 Hex
01 Hex
10 Hex
149

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs cs1w-etn21Sysmac cs1w-etn21Sysmac cj1w-etn21

Table of Contents