LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control labview VI from a program not written in LabView on another computer?

I am tasked with finding a way to control (an existing) LabView application (VI) from another computer (networked together) as part of a larger application which is not constructed in LabView (likely C# .Net Windows app).

 

So, I am looking to find a solution that

a) requires minimal change to the existing stand-alone LabView VI

b) does not require LabView on the remote (controlling) computer.

 

Controlling the LabView application involves communicating various setpoints etc, controlling start / stop, and getting back from the application some measured data values; could be treated as file transfer or data streams.

 

Will it be fruitful to look into controlling the VI over TCP/IP? I gather that support exists in LabView for sending and receiving data over TCP connections. This approach would I guess require code to be added to the existing VI to handle commands and requests on the connection; simulating the ability to interact with the front panel.

 

Are other options available? I see in the help pages mention of DataSockets and web services among other approaches.

 

I am totally new to LabView, so all suggestions gratefully received, but please don't assume any knowledge of LabView.

 

 

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

You can control LV from other applications using the ActiveX interface from VI Server. Since you want to do this from a remote machine, you would have to enable ActiveX-access using DCOM. This is a rather worksome efford and to my experience not really suggested.

 

So i suggest you to define a TCP-based protocol for remote control of your dedicated application. This of course is only valid, if the application is already running on the "server". So your "client" connects, sends commands which are executed by the "server" and data and status information is sent back. And you are correct that this will require (significant) changes to the LV application.

 

Web Services are also a valid approach if you can connect to web based applications. LabVIEW utilizes RESTful Web Services architecture. REST provides a lightweight protocol accessible to a wide variety of clients. The architecture does not require complex message parsing and provides a simple interface for you to begin using Web Services in LabVIEW.

 

Other methods are possible, but i recommend you to pick one of those.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(3,265 Views)
I agree with the TCP/IP solution. I had a similar issue where I had to control a custom C program from LabVIEW. We came up with a simple protocol and it has worked very well for us.
0 Kudos
Message 3 of 5
(3,257 Views)

 

Norbert B : ".. So i suggest you to define a TCP-based protocol for remote control of your dedicated application .."

 

This looks VERY intersting to me also...

Can you (or anyone) suggest a/some specific "how to" or process/application-note/examples  to develop this method ??

 

Thanks

0 Kudos
Message 4 of 5
(3,216 Views)

 


slbLV wrote:

 

Norbert B : ".. So i suggest you to define a TCP-based protocol for remote control of your dedicated application .."

 

This looks VERY intersting to me also...

Can you (or anyone) suggest a/some specific "how to" or process/application-note/examples  to develop this method ??

 

Thanks


 

 

There would not be anything specific since it's all dependent on the information that you want to pass. You can look at the examples that ship with LabVIEW on how to use the LabVIEW TCP/IP functions. What you do at the other end with the other application you will need to find out yourself, as that's dependent on the programming language at the other end. 

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