Showing results for 
Search instead for 
Did you mean: 

Some problems in labview writing to localhost using UDP



I am new to the labview. Right now I want the labview to write UDP packets to localhost(, then VLC reading from localhost to play a video stream. 


But based on my test, there is some problems of networking between these two softwares. 


The situation is that: 

1, VLC as the source, labview reading packets, perfect!

2, VLC as the source, VLC reading packets, perfect!

3, Labview as the source, labview reading packets, perfect!

4, Labview as the source, VLC reading packets, not working! 


The last situation is exactly what I want. 

Has anyone met similar problems? Any suggestions?


Thank you very much in advance. 

0 Kudos
Message 1 of 10
You need to provide more information than just 'not working'.What error code/messages?
0 Kudos
Message 2 of 10

No error appears. The VLC just cannot get the packet. 

0 Kudos
Message 3 of 10

VLC can apparently use both UDP and TCP.  The latter is generally considered more reliable, as it is more rigorous in establishing the connection and can handle out-of-order packets.  Can you try using TCP instead of UDP, if only to see the error messages?  [You state that with UDP, there are no errors, which probably means "There are errors, but UDP doesn't care and doesn't report them"].  Once you figure out how to set up the TCP protocol, you might be able to port the same "fix" to UDP.


I've personally never used UDP with LabVIEW (because reliability of data transmission was too important to me), but have used TCP, and am presently happily using Network Streams.



0 Kudos
Message 4 of 10
You really need to show some code. Trying to guess what you have and have not done is not very efficient.
0 Kudos
Message 5 of 10

Well Bob, UDB and TCP are working quite differently and also in LabVIEW they need to be handled differently enough that whatever might be working for TCP might be not a viable solution for UDP.


That said, the OP's description is so vague that there is really very little we can suggest to help him make it work. It does not work! is definitely not enough of information here. What is the LabVIEW code? Did he check that the Windows firewall is allowing incoming UDP connections for the LabVIEW.exe in question? It's easy to dismiss the according Windows dialog the first time you start up LabVIEW after installation (and often the dialog doesn't even seem to come) and then end up with blocked network sockets later on when you start to use network functions in LabVIEW.


Other than that there are about several dozen other things that could be wrong in some ways. 


Rolf Kalbermatter
My Blog
Message 6 of 10
Don't forget that UDP is just a transport layer protocol. You also have to make sure that the data payload contained in the packet is correct.
When you say VLC sending and LV receiving is "perfect", what does that mean? Is the data going to VLC from LV formatted correctly?


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 10



Did you try to send video stream via UDP? in LabVIEW Sender and LabVIEW receiver case.. OR it was just some dummy data?


I am trying to send live Video stream in LabVIEW Send/Receive and my UDP read is producing TO..


Is this situation allowed?


Thank you, 


0 Kudos
Message 8 of 10

what is your LabVIEW version?



0 Kudos
Message 9 of 10

LV 2014

0 Kudos
Message 10 of 10