LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ DSP Virtual Instrument

I have a motion signal processing application that will look for motion and output whether it believes the motion is of interest or not. (can't be more specific at this point). 

 

That being said, there are a number of published C++ algorithms that would be desirable to try out on the signal.  Is there a mechanism whereby I can attach C++ code to a VI for signal processing.  What I mean by this, is there a VI that can accept C++ signal processing code, and then wired in line with a signal?  Hopefully, I've been clear with this question, however, I am willing to clarify and specific questions.  Thank you 

 

I did find this, however, I thought that there may be something better \ smarter:

 

https://decibel.ni.com/content/docs/DOC-9076

0 Kudos
Message 1 of 3
(2,361 Views)

@gatorback wrote:

I have a motion signal processing application that will look for motion and output whether it believes the motion is of interest or not. (can't be more specific at this point). 

 

That being said, there are a number of published C++ algorithms that would be desirable to try out on the signal.  Is there a mechanism whereby I can attach C++ code to a VI for signal processing.  What I mean by this, is there a VI that can accept C++ signal processing code, and then wired in line with a signal?  Hopefully, I've been clear with this question, however, I am willing to clarify and specific questions.  Thank you 

 

I did find this, however, I thought that there may be something better \ smarter:

 

https://decibel.ni.com/content/docs/DOC-9076


Not directly. LabVIEW can not link directly to C++ code for many reasons, one of them being that there is no single C++ ABI standard, but each compiler implements its own format with different attributes.

 

Your options are threefold here:

 

1) Creating a classical DLL with exported function interface. This would require you to define a wrapper for each C++ object that exports a function per object method you want to access as well as for any object variable.

 

2) Turning your C++ code into an ActiveX object and import it through the ActiveX interface in LabVIEW

 

3) Turning your C++ code into a .Net assembly and import it through the .Net interface in LabVIEW

 

All of these options have drawbacks.

 

1) it is quite some work to do this but it is IMO the most flexible approach

2) There used to exist tools that could automate most of the conversion process to go from C++ to ActiveX. Will only work for Windows and ist considered obsolete by Microsoft, they want you to move to .Net and try hard to make ActiveX an unattractive option for any new developments.

3) Again only working for Windows, and C++ code for .Net assemblies ist not straightforward, they would like everyone to move to C# instead.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(2,322 Views)

Dankje Wel!   I appreciate the thoughtful response.   The hope that is that the Labview Concept demonstrator will prevent deaths.

0 Kudos
Message 3 of 3
(2,275 Views)