LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

udp write

Hi

 

In UDP protocol checksum is optional.

 

Does LabView UDP write.vi calculate a checksum?

 

Regards Vt

 

0 Kudos
Message 1 of 2
(3,256 Views)

LabVIEW does nothing related to the UDP layer itself. It simply takes your data message and passes it on to the underlaying socket library (Berkely sockets on Mac and Linux and Winsock on Windows) and lets them do the packaging, CRC calculation and sending of.

So the CRC handling will be whatever is the default for your underlaying socket library, which as far as I understand is to do CRC for all three mentioned platforms.

 

There seems no direct method of enabling or disabling CRC generation, maybe there is a registry setting for this but since it would be global, that might be rather undesirable.

 

I believe that the standard method of doing non CRC calculation would be to set the IP_HDRINCL option on the socket and then you have to calculate the entire protocol header too and send it yourself in front of the actual data load to the socket.

 

Changing socket options in LabVIEW is however not trivial as you will have to retrieve the native socket handle from a LabVIEW network refnum (there is a VI in vi.lib/Utility/tcp.llb/UDP Get Raw Net Object.vi to do that) and then call the platform socket library API setscockopt() through a Call Library Node to change a socket option. Look for some discussion over the TCP_NODELAY option here on this board to get a better idea how that would need to be done.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(3,235 Views)