LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Data Sockets and Ports

I wish to use data sockets to connect several different modules of my lab view program, however as there is more than one module I face the prospect of having different data transmitted upon the same data socket. To prevent this I would like to have the different modules each assigned a specific port to use for their communications with the main part of the program. However, I do not know which ports I can use and which ones I can't. Could someone please tell me which ones are availible, so as to avoid collisions with other programs that might be running on the computer, and which ones are preferable, or if there is a better way to do this. This approach seems to be a much easier solution than putting some sort of identifier insid
e the data.
0 Kudos
Message 1 of 4
(3,152 Views)
If you are using NI's Data Socket, you don't need different ports for different types of data.
If you want to implement your own data socket via TCP/UDP and need free ports, check this Port List. Try to find free ports greater than 1024. Let me know if you need details.

Hope I understood the problem
0 Kudos
Message 2 of 4
(3,152 Views)
The problem is that I need to be able to keep certain data seperate from other data, and I need to pass this information using data sockets. I figured the easiest way to do this would be able to use different ports for each of the labview processes that I have, and send/receive data on those ports. Part of the question was what ports i could use, thanks for answering, and the other part was if this was even possible, and how to implement it if it was. Attached is a simple vi which should give the idea of what I am trying to do. Thanks.
0 Kudos
Message 3 of 4
(3,152 Views)
Find attached example (your example modified a little). I write 2 strings to DS, being able to read the first one after writing the second. I think this will solve your problem. Let me know if not, we may find another solution.

Hope this helps
0 Kudos
Message 4 of 4
(3,152 Views)