In the case of open TCP/IP communication via Industrial Ethernet using T blocks with IE CPs and CPUs, why are different amounts of messages sent when the maximum length of 1452 bytes of user data is transferred?
The information below applies to the following Industrial Ethernet CPs:
These modules support open TCP/IP communication via Industrial Ethernet using the following communication blocks (T blocks):
|FB63||TSEND||For transmitting data packets via an established communication connection|
|FB64||TRCV||For receiving data packets via an established communication connection|
|FB65||TCON||For establishing a communication connection|
|FB66||TDISCON||For ending an existing communication connection|
Here, the communication processors only support the ISO-on-TCP connection type. Consequently, the RFC 1006 protocol extension of the TCP protocol is used. Thus a maximum of 1452 bytes of user data are transferred.
With Industrial Ethernet the maximum frame size is 1460 bytes (maxSegmentSize). Consequently, the 1452 bytes of data fit in one Ethernet message; this means that the above-mentioned communication processors can send the data in one message.
The CPUs with integrated PROFINET interface also support open TCP/IP communication via Industrial Ethernet using T blocks.
The Industrial Ethernet CP sends the 1452 bytes of data in one message. The S7 CPU sends the same volume of data in two messages.
To understand this difference, you must consider two LAN (Local Area Network) recordings.
When a connection is established, the two communication partners negotiate the connection parameters.
They include the maxSegmentSize parameter, among others. This is proposed by the active partner and acknowledge or negotiated by the communication partner. This returned value then counts for the communication connection.
Another parameter is the MaxTPDUSize parameter. This is the maximum size of each protocol element. If the value of this parameter is greater than that of the maxSegmentSize parameter, a corresponding protocol element has to be transferred segmented.
Below, we first consider a connection of the TCP/IP communication between two IE CPs using T blocks.
Then we consider a connection of the TCP/IP communication between CPU and IE CP using T blocks. This makes clear why the data has to be sent in two messages here.
- Communication connection between two IE CPs
Fig. 01 shows that the IE CP with the IP address 220.127.116.11 actively establishes the connection and proposes a MAXTPDUSize parameter of 2048 bytes. In the total recording you see that the communication partner (IE CP) acknowledges the MAXTPDUSize of 2048 bytes. This then counts for the communication connection.
This means that only one message has to be sent. The maximum user data length of 1452 bytes is not limited by the maxSegmentSize and the maxTPDUSize. Both values are greater than 1452 bytes.
The IE CP only has to send one message!
- Communication connection between a CPU and an IE CP
Fig. 02 shows that the CPU with the IP address 18.104.22.168 actively establishes the connection and proposes a MAXTPDUSize parameter of 1024 bytes. In the total recording you see that the communication partner (IE CP) acknowledges the MAXTPDUSize of 1024 bytes although it supports a greater maxTPDUSize (see Fig. 01). The maxTPDUSize for the communication connection between CPU and IE CP is 1024 bytes.
This means that the maximum user data length of 1452 bytes is sent in two messages. The maximum user data length is limited by the maxSegmentSize. This value is less than 1452 bytes.
The CPU has to send two messages.
Effects for the user
Initially, the user does not see any of the behavior at the application level. The mechanisms are coordinated independently by the protocol levels of the two communication partners. However, if you compare the number of messages on the LAN, you see that more messages are visible in the second constellation using a CPU.