Omron CJ1W-ETN21 operation manual Using Socket Services with Socket Service Request Switches

Models: CJ1W-ETN21

1 242
Download 242 pages 30.9 Kb
Page 128
Image 128

Overview

Section 6-3

The two methods of using the socket services are as follows:

Dedicated Control Bits (Socket Service Request Switches)

Requests can be made to a socket service by setting parameters and then merely manipulating specific Socket Service Request Switches.

CMND(490)

Requests can be made to a socket service by sending service request commands to the Ethernet Unit.

Note One of the main differences between using Socket Service Request Switches and using CMND(490) is in the number of sockets that can be connected simultaneously, as shown in the following table.

Protocol

Socket Service Request

CMND(490)

 

Switches

 

 

 

 

UDP

Total of 8 sockets max.

8 sockets max.

 

 

 

TCP

 

8 sockets max.

 

 

 

6-3-2 Using Socket Services with Socket Service Request Switches

Socket services can be used by setting the parameters in a Socket Service

Parameter Area in the CPU Bus Unit Area and then turning ON a Socket

Service Request Switch.

When using Socket Service Request Switches, a maximum of 8 sockets can be opened simultaneously for the UDP and TCP combined. Also, the same socket number cannot be used simultaneously for both UDP and TCP. (There is only one Socket Service Parameter Area for each socket, i.e., the same

area must be used for both UDP and TCP.)

An illustration of using Socket Service Request Switches to execute socket services is provided below.

CS/CJ-series PLC

CPU Unit

Ethernet Unit

Socket Service

Sockets

Request Switches

Refreshed

 

Socket Service

(See Note 1.)

 

Parameters

Refreshed

 

 

(See Note 2.)

TCP data transfers

UDP data transfers

Host computer or other device

Sockets

System User program

call

 

Note 1. Socket Service Request Switches in the CPU Bus Unit Area in the CIO Area are used to send a service request from the CPU Unit to the Ethernet Unit.

2.The Socket Service Parameters in the CPU Bus Unit Area in the DM Area are used to specify the service being requested from the Ethernet Unit. The CPU Bus Unit Area in the DM Area is also used to receive results of processing from the Ethernet Unit to the CPU Unit.

After setting the required parameters in a Socket Service Parameter Area in the CPU Bus Unit Area in the DM Area, the Socket Service Request Switches can be used to request opening, sending, receiving, or closing for either the UDP or TCP protocol. When requesting a send, send data at the send/receive data addresses set in the parameter area is sent. When requesting a

104

Page 128
Image 128
Omron CJ1W-ETN21 Using Socket Services with Socket Service Request Switches, Protocol Socket Service Request CMND490