Hello,
I want to know how the FB 65 TRCV really works (besides help from S7).
The project configuration for TCP (CPU 319 3PN) is: active, connection type B#16#11, ad-hoc mode (LEN parameter = 0) - so from the help - the length is the length of DATA (any param) ("The length of the area is specified depending on the protocol variant being used by the LEN parameter (if LEN <> 0) or the length information of the DATA parameter (if LEN = 0)").
The communication is established, data is received but I have no real control of the receiving process: sometimes the data received is the expected one but sometimes is wrong.
I didn't understand how TRCV acts - when data is marked as received and how?
The NDR param has something to do with this ("Immediately after receiving a block of data, FB64 enters the data in the receive area and sets NDR to 1"; "NDR = 0: Job not yet started or still running. NDR = 1: Job successfully completed")...What is a "block of data" & how it is marked (end of block)?
I used Wireshark to track (sniff) send / received data on TCP/IP. For example a reply from device (printer) on TCP is 4 packets of 20 bytes - so 80 bytes in total.
The question: NDR is set to 1 when all the 80 bytes are received OR when nr. of bytes received = nr. of bytes of DATA param (ex: 200 bytes).
From my tests I couldn't find an answer to this problem.
Many thanks!
I want to know how the FB 65 TRCV really works (besides help from S7).
The project configuration for TCP (CPU 319 3PN) is: active, connection type B#16#11, ad-hoc mode (LEN parameter = 0) - so from the help - the length is the length of DATA (any param) ("The length of the area is specified depending on the protocol variant being used by the LEN parameter (if LEN <> 0) or the length information of the DATA parameter (if LEN = 0)").
The communication is established, data is received but I have no real control of the receiving process: sometimes the data received is the expected one but sometimes is wrong.
I didn't understand how TRCV acts - when data is marked as received and how?
The NDR param has something to do with this ("Immediately after receiving a block of data, FB64 enters the data in the receive area and sets NDR to 1"; "NDR = 0: Job not yet started or still running. NDR = 1: Job successfully completed")...What is a "block of data" & how it is marked (end of block)?
I used Wireshark to track (sniff) send / received data on TCP/IP. For example a reply from device (printer) on TCP is 4 packets of 20 bytes - so 80 bytes in total.
The question: NDR is set to 1 when all the 80 bytes are received OR when nr. of bytes received = nr. of bytes of DATA param (ex: 200 bytes).
From my tests I couldn't find an answer to this problem.
Many thanks!
Last edited: