S7 TCP/IP communication - TRCV (FB65)

Supreame

Member
Join Date
Jul 2008
Location
Brasov
Posts
33
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!
 
Last edited:
I don't know what is FB65, but usuallu LEN-output parameter is one shot type. So it must save to same static variable if <> 0.
 

Similar Topics

Hi, i cant establish communication between fatek plc with an energy meter, both capable for modbus tcp, i did with modscan but fatek plc does not...
Replies
1
Views
141
can i send and recieve data using my yokogawa UT35A controller with my siemens s7 1200 plc using profinet communication without using gsd file
Replies
1
Views
378
I am trying to establish communication between Siemens PLC 1500 and Matlab. I followed a tutorial on youtube at this link: But when I got to the...
Replies
0
Views
332
Hi all, I don't have experience PLC programming so it might be a stupid question. I made a socket request to PLC and there is no problem to read...
Replies
5
Views
848
CR3000 HMI ModBus TCP/IP Master has gotten erratic after increasing block size to 24 at DA70A in Protocol 1. What should a practical guide be for...
Replies
2
Views
556
Back
Top Bottom