09-07-2013 06:35 PM - edited 09-07-2013 06:38 PM
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:
09-09-2013 03:13 AM
@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.
09-15-2013 01:07 PM
Dankje Wel! I appreciate the thoughtful response. The hope that is that the Labview Concept demonstrator will prevent deaths.