Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
 

Can I Call the Analysis Functions in the LabVIEW Sound and Vibration Toolkit (SVT) or Order Analysis Toolkit (OAT) From a DLL?

Primary Software: LabVIEW Toolkits>>Sound and Vibration Toolset
Primary Software Version: 4.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Toolkits>>Order Analysis Toolset

Problem:
I would like to use external code to call into analysis function from the LabVIEW Sound and Vibration Toolkit (SVT) or Order Analysis Toolkit (OAT). How can I accomplish this?

Solution:
You can build a DLL exporting SVT or OAT analysis functions using the LabVIEW Application Builder. This tool is available in the LabVIEW Professional Edition, and can also 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. However, the SVT and OAT VIs use many LabVIEW cluster types including the Waveform datatype (WDT) and special clusters for averaging, display, etc. For this reason, it is recommended that you build small “wrapper” VIs around your SVT or OAT analysis routines that expose simpler datatypes.

The following VI illustrates an example of such a wrapper. Looking at the diagram, you can see that there is only one SVT 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 datatype 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 SVT and OAT 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.


Related Links:
Developer Zone Tutorial: Building DLL's in LabVIEW 6.x or Later

Attachments:


SINAD wrapper.vi


Report Date: 05/17/2004
Last Updated: 08/02/2007
Document ID: 39G9882L

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit