LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What happens to corrupted packets that arrive to a UDP routine?

Hi,
 
I would like to know what happens to packets that arrive with some errors to a Labview UDP routine. Are they automatically dropped? or does the software pass you the packet even if it has checkdum errors.
 
FYI: I am using Labview 6.1
 
Thanks
0 Kudos
Message 1 of 6
(5,778 Views)
They are probably dropped, because it should be no problem that you miss any packets. If it is a problem TCP might be more suited.

André
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 6
(5,756 Views)
I believe that a UDP datagram checksum error is discarded by the OS. You should never see 'checksum invalid data' at the LabVIEW UDP node...
0 Kudos
Message 3 of 6
(5,744 Views)
Thanks for your answers.
 
Actually UDP protocol provides you with the option of choosing whether you want yo use the checksum. In my application for example, I want to receive all the packets (even corrupted) because it is better for me to receive some information from where I can get an estimate of the real value than nothing at all.
 
The question is whether Labview implemented the checksum option or not.
 
Thanks
0 Kudos
Message 4 of 6
(5,732 Views)
I did some research about improving throughput by disabling UDP checksums, and learned that it is generally not a good idea. Try setting the checksum to zero at the data source
 
If you are receiving data at a high rate, then a single missed datagram should not be a problem. Worst case is you could interpolate as long as you have some sort of timebase (counter or timestamp); if it is a problem then you should use TCP instead. If you are working with slow data, then you might want to consider implementing a request mechanism. Your UDP receiver times out (data not sent by server or failed checksum dropped data) so you manually request a new datagram from the server.
 
If you're just trying to debug your communcations, then use a protocol analyzer like Ethereal to listen for all the data on the Ethernet connection (in promiscuous mode) You've got a choice between missing data and bad data; not a great choice. Smiley Surprised
 
 
0 Kudos
Message 5 of 6
(5,683 Views)
I am not sure about estimating values from corrupted packets.

As your packet has digital data, if a single bit in your packet gets flipped you could potentially halve or double your estimated value, or if you have signed data the polarity could be inverted!

Wosrt case scenario is you have no reasonable guess from a corrupted packet.

0 Kudos
Message 6 of 6
(5,667 Views)