6/15/2010 10:51 AM | |
Posts: 35 Rating:
|
I use any code program, but in this case I prefer LAD/STL/FBD. I hope your solution helps me. Thank you very much!!! Bye |
6/15/2010 6:42 PM | |
Joined: 10/7/2005 Last visit: 9/12/2024 Posts: 3020 Rating:
|
Hello Miguel Allende Let me start by quoting the the following straight from THIS FAQ: If data is transferred with the TCP protocol, the transfer takes the form of a data stream. There is no information transferred either about the length or about the start and end of a message. The recipient cannot tell where one message ends in the data stream and the next one begins. Therefore, the sender has to specify a message structure which can be interpreted by the recipient. Using AG_RECV should really work the same as T_RECV in my humble opinion and both should be bound to fail if themessage lenght is variable and the receiver has no way of identifying it, soI can't really explain why it will work ok with the T_RECV but NOT withAG_RECV. Having siad that, the following example may give you extra ideas: Transferring data with variable message lengths via the TCP protocol I hope this helps |
Cheers |
|
6/16/2010 9:51 PM | |
Joined: 10/7/2005 Last visit: 9/12/2024 Posts: 3020 Rating:
|
Hello again Miguel Allende You operate the TRCV intheso called "ad hoc" mode which allows it to receive data packets up to 1472 bytes long. It also means that TRCV will (seem to) happily transfer the received data packet into the (suitably larger sized and declared) receive area upon receipt of a data packet. AG_RECV on the other hand will however not be able to do this and "receive" (i.e. transfer from CP to CPU) as many bytes as declared by lenght of the"RECV" ANY pointer once that amount of received data is available on the CP. I sincerely hope I got I "right" this time, as this at least explains what you observe and I hope this helps. |
Cheers |
|
This contribution was helpful to
1 thankful Users |
Follow us on