ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview LAN communcation

Hi all,

I've spent some time trying to figure out the best way to do this and have a couple of LabVIEW related questions. The overall goal is to write two LabVIEW VI's, make one a .exe and place it on another computer that doesn't have LabVIEW installed. The original computer with LabVIEW installed (Local) and the second computer (Remote) are on the same LAN. 

 

I think I can create the VI's in such a way that:
1) The user inputs parameters onto the Local VI

2) The local VI sends data/commands to the Remote .exe

3) The Remote .exe performs a function based on what it receives and sends data/commands back to the Local VI
4) The Local VI performs a function based on what it receives (which may include repeating step 2)

 

The thing I'm struggling with is how to get the two pc's, and their respective VI/.exe, to communicate. I believe, based on what I've read, each program must have a set of LISTEN/READ and CONNECT/SEND, but I'm not sure how to implement this. 

Let me know what you think. I'll be actively monitoring this post.

0 Kudos
Message 1 of 5
(3,350 Views)

You just need a single connection between the two.  Even a listener can send data back (or at least that has been my experience).  Look in the Example Finder (Help->Find Examples) for Simple TCP.lvproj.  In that project are a client and a server VI.  Give that a good look over.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(3,345 Views)

Thank you for the quick reply. After looking them over I have a better understanding of what I need to do. I still am not sure how to correctly set the Ports which need to match across the two computers. Is there somewhere to find a list of available ports?

0 Kudos
Message 3 of 5
(3,333 Views)

 

It depends on the communication protocol that you are using.  The two more common protocols typically use:

 

SSH port 22

 

Telnet port 23

 

Message 4 of 5
(3,320 Views)

I think I have what I need now, thanks for the help!

0 Kudos
Message 5 of 5
(3,309 Views)