Jump to content

Phil J

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Phil J's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Sorry, that was unclear. "The Expected Data Arrival Size (Bytes)" is already, as you said, the product of the string length and the iteration value. So sending 8 bytes 10 000 times, it requires 80 000 bytes to be received. This is not achieved. Instead, the number of bytes read is a seemingly random value usually ranging from 20k to 60k. This method works 100% for TCP, and also works for UDP when I put a 1ms Wait Timer inside the send loop.
  2. pbrooks, I have tried all your advice, including the code you posted. Unfortunately my problem remains the same in either case. It appears to me that the messages might not be buffering properly, and hence I think it is 'sending too fast.' I am likely to be wrong. It is possible my code has some logical error. Maybe you could take a look at it below: The code has 5 steps, open connections, start timing, execute transfer, stop time, close connections. It is intended for the sole purpose to send n-packets as quickly as possible. Any ideas?
  3. Thanks a lot for the help pbrooks. :thumbup: Firstly, your advice led me to find a fault with my code -- as the UDP address, I put "localhost" (as per the examples?) I suspected it to be broadcasting (as you said), and by changing that to "127.0.0.1" it now transfers about 10x faster than it did before! (about 100 uSec for an 8-byte packet) I think you addressed my new problem (I am losing UDP packets bigger than 8 bytes, or so) ; I think the loop is going too fast. Is that what you meant by "Place the UDP Read function in a tight while loop and pass the output to a queue." ?? I don't really understand what you mean by that paragraph. Thanks again, cheers, Philip
  4. Problem: For a project I am testing possible methods of data transfer between applications. Sparing the details, the three methods being tested are TCP, UDP and DLLs. Approach: I designed a basic LV VI that passes packets of data to itself via the three methods. Packets are usually 64-bytes, and the test usually loops 1,000 to 20,000 times. Time is measured for further comparison of speed and accuracy. Results: I have read that UDP is a faster protocol, often at the expense of accuracy. As others working on the project, I have found LV DLL functions to be very unstable, crashing LabVIEW all together. My concern is that the results show that TCP is about 5 times faster than UDP transfers! Which is only about half the speed of DLL transfers (i.e. DLL = 0.1ms per transfer, TCP = .2ms per transfer, UDP = 1.0ms per transfer) Is this reasonable? Any ideas why these results contradict general expectations? Any ideas would be appreciated. - Philip
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.