LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ data --> Labview

We are developing a data system in C++ that will run on Windows 2000. I'd
like to use LabView to display the data as it is collected. I am looking for
advice on getting the data collected via the C++ program to LabView. Any
advice?

Thanks,
D Miller
SSAI-NASA/GSFC
0 Kudos
Message 1 of 2
(2,752 Views)
You have several possibilities to do that.

1. Create your C++ system as a DLL. Use LabVIEW as the main program and call the DLL from LabVIEW. Take a look at the intermediate DAQ VIs to get an idea how your interface should be.

2. Make your C++ system and your LabVIEW application a program.
If you put the host name in an ini file you will be able to separate the two tasks on two computers if it is nesseccary for performance reasons.

2.1 Use TCP/IP to transfer data from one program to the other.
2.2 Use Data Socket Server to transfer data.

3. Make your LabVIEW application an Active-X server. From your C++ System call methods in the Active-X server to transfer data. The methods are implemented as VIs, the parameters are the connector pane of the VI.

4. Make your C++ system an Active-X server and call methods from your LabVIEW application.

5. Make your C++ system an Active-X control. Call the control methods and porperties from your LabVIEW application.

Each of the solutions have advantages and disadvantages which correspond to the programming experience and technical facts.

The solutions 1 and 5 will create a single program. If you do not take concern of multi threading with worker threads this will have possibly poor performance until the fact of loosing data.

The solutions 2,3 and 4 will create multiple programs. The programs can be multi tasked by Windows. If you implement the C++ system as a console application and it will never do a "printf" it will not open a window. You will then never get into user interface effects that are related to the Windows UI system (like stopping threads by holding the title bar with the mouse).

If I had to design the application I would choose solution 2.1 or 3. This is because I have experience in network communication and using LabVIEW Active-X servers.
If you see that the application will be transfered to another OS like Linux only solution 2.1 with LabVIEW as UI and your C++ system as console is applicable.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 2 of 2
(2,752 Views)