Technical data

Table Of Contents
Open Communication via Industrial Ethernet
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
23-3
TCP native
During data transmission, no information about the length or about the start and
end of a message is transmitted. This is not a problem during sending because the
sender knows how many data bytes it will be sending. However, the receiver has
no means of detecting where one message ends in the data stream and the next
one begins. For this reason, it is recommended that the LEN parameter of FB 64
"TRCV" (number of bytes to be received) be assigned the same value as the LEN
parameter of FB 63"TSEND" for the communication partner (number of bytes to be
sent).
If you have specified the length of the data to be received (LEN parameter of FB 64
"TRCV") to be greater than the length of the data to be sent, FB 64 "TRCV" will
only copy the received data into the receiver area (DATA parameter ) after the
length specified by the parameter value has been reached. This occurs only after
the data from a following job have been received. Please note that in this case data
from two different send jobs will be located in one and the same receiver area. If
you do not know the exact length of the first message, you will have no way of
detecting the end of the first message or the start of the second one.
If you have specified the length of the data to be received (DATA parameter of
FB 64 "TRCV") to be less than the length of the sent data, FB 64 will copy as many
bytes into the receiver range as you have specified in the LEN parameter. After
this, it will set NDR to TRUE and write RCVD_LEN with the value of LEN. With
each additional call, you will thus receive another block of sent data.
ISO on TCP
During data transmission, information on the length and the end of the message is
also transmitted.
If you have specified the length of the data to be received (LEN parameter of FB 64
"TRCV") to be greater than the length of the data to be sent, FB 64 "TRCV" will
copy the received data completely into the receiver range. After this, it will set NDR
to TRUE and write RCVD_LEN with the length of the sent data.
If you have specified the length of the data to be received (DATA parameter of
FB 64 "TRCV") to be less than the length of the sent data, FB 64 will not copy any
data into the receiver range but instead will supply the following error information:
ERROR=1, STATUS=W#16#8088.