LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB LABVIEW to c++

Solved!
Go to solution

Hi,

 

I am a rookie in labview but I have a project, to get data (sound) from NI USB, then find the peak of the signal in which frequency.

after that I have to send the value of the amplitude to the bluetooth.

 

I want to use labview until find the peak of the signal (because easier using labview), after that I will use C++ to send the value to the bluetooth.

Is it possible?

 

Thank you

0 Kudos
Message 1 of 5
(2,676 Views)

Compile the C++ program into a .net assembly and call the functions from a .net node in LV.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(2,673 Views)
Thank you Yamaeda.
If I do it like that. So the "main" is in the labview?

Can I "include"the labview program to c++ program?
0 Kudos
Message 3 of 5
(2,643 Views)
Solution
Accepted by topic author limavolt

@limavolt wrote:

Hi,

 

I am a rookie in labview but I have a project, to get data (sound) from NI USB, then find the peak of the signal in which frequency.

after that I have to send the value of the amplitude to the bluetooth.

 

I want to use labview until find the peak of the signal (because easier using labview), after that I will use C++ to send the value to the bluetooth.

Is it possible?

 

Thank you


Yes this is definitely possible.

 

I would ask (aside from being new to LabVIEW), why not just do the bluetooth communication in LabVIEW as well?  Unless there are some kind of C++ libraries that you cannot live without, it should be easy enough to do this all in LabVIEW (in most cases).

 

But yes, you have a few ways to call C++ code from within a LabVIEW application or vice versa.  To call it from within LabVIEW, I would make a DLL out of your C++ code.  If you want the main code to be C++ based, you will likely use ActiveX or a LabVIEW built DLL. 

 

References to help get your started:

 

For LabVIEW calls within C++:  http://www.ni.com/white-paper/5719/en/

For C++ calls within LabVIEW: http://www.ni.com/white-paper/4877/en/

 

EDIT:

 

Heck, if you really wanted to be crude you could just write two applications and communicate via TCP.  You have many options 😄

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 4 of 5
(2,626 Views)

Thank you for your information,

 

I have try to send the information to the bluetooth, but unfortunetly the communication have some protocol which do not writen well (someone else did the hardware) and there is a C++ program which can communicate with this device.

 

 

 

 

0 Kudos
Message 5 of 5
(2,608 Views)