LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface between C++ and labview

I have decided a project that consists of C++ and Labview. C++ is used
as the input to labview. However, i don't know how to use C++ to
control the labview. Can C++ control the labview directly? and how ?
or I have to buy another program or hardware to be interface?


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 3
(5,503 Views)
ActiveX and TCP/IP are both good choices for high-level communication
between Windows applications. LabVIEW's VI Server, introduced in version
5.0, gives you tremendous power to control LabVIEW programmatically and
exposes it to the programmer via either ActiveX or TCP/IP.

For a very nice example that shows how to call a LabVIEW VI with arguments
passed from the C++ environment, then bring the resulting data from
LabVIEW back to C++, check out the following example from NI's site:

http://digital.natinst.com/explprog.nsf/websearch/6960cee3bf3d8c30862565da0078ef30?OpenDocument

If the URL doesn't work for you, just go to NI's Example Programs Database
(http://www.natinst.com/support/epd/) and search for "labview and c++".

Regards,
John Lum
National Instruments

Matthew
Ho wrote:

> I have decided a project that consists of C++ and Labview. C++ is used
> as the input to labview. However, i don't know how to use C++ to
> control the labview. Can C++ control the labview directly? and how ?
> or I have to buy another program or hardware to be interface?
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
0 Kudos
Message 2 of 3
(5,503 Views)
> I have decided a project that consists of C++ and Labview. C++ is used
> as the input to labview. However, i don't know how to use C++ to
> control the labview. Can C++ control the labview directly? and how ?
> or I have to buy another program or hardware to be interface?
>

You don't mention what version of LV you have, but assuming you have
at least version 5, then LV has a server interface built in. This
server exports many of the things that you can do directly in LV, and
lets you run VIs and get results out. The server has two ways of
calling it, one over TCP, and the other over ActiveX. You will be
using the ActiveX interface. To make things easier, there are some
C++ classes on the NI ftp and web site that make it easier.

Greg McKaskle
0 Kudos
Message 3 of 3
(5,503 Views)