Omron W343-E1-07 User Manual

Page 130

Advertising
background image

109

Overview

Section 6-1

When using TCP protocol, the fragmented data is passed to the user pro-
gram. Therefore, the receiving user program must be able to evaluate the end
of the data transmission, and repeatedly send receive requests until all data
has been received. The receive request is sent twice in the example shown
above, but the data would be even more fragmented if a router was included
in the communications path, and the number of receive requests would need
to be increased accordingly.

When making the receive request, it is not necessary to specify the same data
length as the sent data length. For example, if the length setting is shorter
than the actual length of the data, all the data can be received by repeating
the receive requests.

Note If communications are with a different segment and data is sent via the TCP

protocol, data will be fragmented into units of 536 bytes.

Cautions when Using UDP

An example of fragmentation and transmission of data using the UDP is
shown in the following illustration.

1,2,3...

1.

The transmission user program sends a request to send 1,984 bytes of da-
ta.

2.

The Ethernet Unit fragments the send data into Data A with 1,472 bytes
and Data B with 512 bytes.

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 data-
grams, 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 B

Sending User Program

Ethernet Unit

1. Send request

Source data

1,984 bytes

1,024 bytes

Data A

Data B

960 bytes

Data A

Data B

Data A

2. Data separated

3. Data A and
Data B sent
consecutively.

Receiving Node

Receiving Computer

4. First receive request

1,984bytes

1,984 bytes

Remaining
960 bytes

5. Second receive request

Only first
1,024 bytes

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.

Advertising
This manual is related to the following products: