Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Integration of C++ program into Labview

I have written a C++ program that generates low level code to control a machine. I would like to integrate this program into Labview. I would like to know what would be the best approach to do:
- use CIN (code interface node). Can I take a few parameters as inputs and pass a string of characters to labview? Originally the C++ program generates a text file with the comands to control the device, I guess this can be substituted by a string control/indicator that will control the GPIB device.
- use ActiveX
- DLLs??
Thanks in advance for your help.
0 Kudos
Message 1 of 3
(3,905 Views)
Madrid,

I would recommend that you stir away from CINs. If you can compile your C++ code into a DLL, then you can easily call it from LabVIEW. CINs have the disadvantage that if you change your code in anyway, you have to update the CIN node in the diagram of the VI. However if you recompile your DLL, you don't have to inform LabVIEW that you have a newer version of your DLL. If the newer DLL is in the same path that LabVIEW is searching, then it'll link to it automatically.
ActiveX is also a good choice. It might take more development time than creating a DLL though.

My two cents,

Azucena
Message 2 of 3
(3,905 Views)
Check out NI application note 087, called
Writing Win32 Dynamic Link Libraries (DLLs) and Calling Them from LabVIEW

Curt
Message 3 of 3
(3,905 Views)