05-21-2010 05:53 AM
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.
05-21-2010 06:11 AM
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
05-21-2010 06:21 AM
05-22-2010 09:44 AM
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
05-22-2010 09:52 PM
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.