Can I Call the Analysis Functions in LabVIEW Sound and Vibration Software in LabWindows™/CVI™?

Updated Aug 31, 2018

Reported In

Software

  • LabVIEW Sound and Vibration Toolkit
  • LabWindows/CVI

Issue Details

I would like to use external code to call into analysis function from the LabVIEW Sound and Vibration software. How can I accomplish this?

Solution

You can build a DLL exporting Sound and Vibration software functions using the LabVIEW Application Builder. This tool is available in the LabVIEW Professional Edition, or can be purchased as an add-on for the Base or Full Editions of LabVIEW. 

When building your DLL, it is usually advisable to avoid exposing complex data types in your function calls. For example, the Sound and Vibration VIs use many LabVIEW cluster types including the Waveform data type (WDT) and special clusters for averaging, display, etc. For this reason, it is recommended that you build small “wrapper” VIs around your Sound and Vibration analysis routines that expose simpler data types. 

The following VI illustrates an example of such a wrapper. Looking at the diagram, you can see that there is only one Sound and Vibration VI – this performs a Signal in Noise and Distortion (SINAD) measurement on an incoming waveform. The primary purpose of the wrapper VI is to “break” the waveform data type into a simple data array and a scalar floating point double for the waveform time interval. You could also break up other SINAD input clusters as needed, although none are exposed in this example. The outputs are the SINAD calculation and the error status (as opposed to the full LabVIEW error cluster).

A few specific tips:
  1. When building the wrapper VI, be sure to attach the desired inputs and outputs to the connector pane.
  2. The LabVIEW Application Builder will automatically add an argument in your DLL function to import the length of any arrays.
  3. When you deploy the DLL, be sure to include the LabVIEW run-time engine. In addition, most of the Sound and Vibration analysis tools rely on other analysis DLLs such as lvanlys.dll, sml.dll, or order.dll. If you create an installer to deploy your new DLL, these supplemental files will be included in your installer by default.
There are also special considerations for licensing. Sound and Vibration software has different licensing options. If you intend to deploy these DLLs onto another computer, that computer must be licensed to use the Sound and Vibration software. Either a development license or a deployment license will be needed. 
 

Attachments

WAS THIS ARTICLE HELPFUL?

Not Helpful