Omron CJ1W-ETN21 Network Card User Manual


 
103
Overview Section 6-3
3. Data A and Data B are sent consecutively.
4. When the receiving user program sends a request to receive 1,984 bytes
of data, Data A and Data B are linked to restore the original data, which is
passed to the user program.
As shown above, the UDP protocol handles data communications as
datagrams, so that the send data is restored to the original data before being
passed to the user program. Consequently, if the data length in the receive
request is set to the length of the send data, the entire data can be received
using a single receive data request. However, if the data length in the receive
data request is set smaller than the actual length of the data, all received data
exceeding the set data length will be discarded.
6-3 Overview
6-3-1 Socket Service Functions
The Ethernet Unit’s socket services are used to exchange data between the
PLC and general-purpose applications that do not support FINS message
communications.The socket services can be used by CS/CJ-series PLCs
through the user program by manipulating dedicated control bits (called
Socket Service Request Switches) or by executing the CMND(490)
instruction.
Source data
1,984bytes
Sending User Program
1. Send request
Data A
Data B
1,472 bytes
512 bytes
Ethernet Unit Receiving Node Receiving User Program
4. First receive request
1,984 bytes
Data A Data B
3. 2.
Ethernet Unit
Ethernet
Intranet
User-set data
General-purpose application
(not FINS communications);
The host computer uses system calls to call sockets
provided in a C language interface library to allow
TCP and UDP protocols to be used directly to access
PLC data.
The program in the CPU Unit sends requests to the
Ethernet Unit to open/close sockets or send/receive
data. This is achieved by manipulating dedicated
control bits or executing CMND(490), and allows the
CPU Unit to exchange data with the host computer
by using UDP or TCP protocols directly.