LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in LabVIEW UDP Read?

Hello All

With a little modified UDP Sender and UDP reader you can see that there is a problem in LabVIEW UDP read.

Enclosed, you will find a UDP sender and UDP reader, which you can run simultaneously on one machine (the same over the network).

If the UDP Sender sends 60 packets with 138 bytes in each, everything is OK and Receiver receives all 60 packets.

(Note 60*138=8.280 kbytes)

If the sender sends >138 bytes in packets, not all of them are read by LabVIEW!!!
With increase in number of bytes in packet, less and less packets are received by LabVIEW.

E.g. with double amount of bytes in packet (276), half of packets are received (again 276*30 = 8.2k).

I have tried also to reduce the number of bytes and increase the number of iterations.
E.g. 100 bytes in a packet and 82 repetitions is the maximum LV can handle. With increase in repetitions over 82 LabVIEW can receive only 82!!
Again, note 82*100 = 8.200 kB.

From some resons UDP read can read only around 8kB of UDP packets in the Windows buffer.

I need to read much more than that, so I wonder if somebody has a losution for this.

thanks in advance
Pawel
0 Kudos
Message 1 of 6
(3,544 Views)
And just one more observation.

Try to send only one byte but 8192 and 8193 times.
This is the limit. 8192 bytes, in Hex it is 0x2000.
That must not be a coincidence.

Now, the question is, how to solve this problem?

Pawel
0 Kudos
Message 2 of 6
(3,539 Views)
Are you sure this isn't a problem with the network sockets of the operating system? If sending too much packets some may be lost esp. if you have additional traffic from the "outside"...
0 Kudos
Message 3 of 6
(3,532 Views)
Hi

As I said it works like that also on localhost. I also used EtherReal to capture UDP packets and it shows all of them.

Now I am working on .NET udp client, and I will see if the situation is changed.

cheers
Pawel
0 Kudos
Message 4 of 6
(3,528 Views)
Hi again

I have just checked it.
It is not the LabVIEW problem, it is a Windows buffer problem.
When I read data very fast, before this 8k buffer is filled I can read all the data.

So I guess it solves my problem :), I just need to make a loop and queue and pull data from there. As simple as that :).

cheers
Pawel
Message 5 of 6
(3,524 Views)
Hi again

I have just checked it.
It is not the LabVIEW problem, it is a Windows buffer problem.
When I read data very fast, before this 8k buffer is filled I can read all the data.

So I guess it solves my problem :), I just need to make a loop and queue and pull data from there. As simple as that :).

cheers
Pawel
0 Kudos
Message 6 of 6
(3,523 Views)