LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

communication between LabVIEW applications on two computers

I have a LabVIEW application running on one computer (I’ll refer to this computer as A).  I have a second application running on a second computer (I’ll refer to this second computer as B).  The two computers share an ethernet connection.  I want to create a COM component that enables communication between these two applications.  I’ll author the COM component in C#.  This COM component will reside on computer B. 

 

My question is this: how can my LabVIEW application on computer A access the COM component on computer B?  I am assuming I can consume COM resources from within LabVIEW. 

 

If there is a better way of having communication between applications on these two computers, please advise.

0 Kudos
Message 1 of 5
(2,091 Views)

I don't know why you'd want to use C# when you can program it in LabVIEW and why you want to bring COM into this.

 

Look in the example finder.  There are examples for TCP/IP communication.  Also search the forums and LabVIEW help for "network streams".

0 Kudos
Message 2 of 5
(2,065 Views)

Thank you for the fast reply.  

The reason for having both C# and LabVIEW is that these applications already exist and I need to communicate between them.  I choose COM only because it's something I know how to do.

But, TCP/IP sounds a lot more sane.  I'll do as you suggest and take a look at that.  Probably won't get to it until Monday.  Thanks again. 

 

0 Kudos
Message 3 of 5
(2,061 Views)

I second RavensFan's suggestion, and also recommend Network Streams.  There are Examples showing how to set up Network Streams, good LabVIEW Help on this topic, and recent "Solved" Forum posts on this topic.

 

Bob Schor

0 Kudos
Message 4 of 5
(2,036 Views)

All the suggestion above can be hard to implement.

I suggest you to use VI server. This way you can have direct access to VI on the remote computer using the port that you wish.

It is quite secure since you can set what computer to listen to and from. I like to do that with functional global (getset.vi type) I also control instruments remotely using this strategy. you can set a password in your VI that in the case someone where able to hack your system, with out the password, they wont be able to set the value. It is faster than Network variable that NI offers.

Benoit

0 Kudos
Message 5 of 5
(2,020 Views)