Example Code

Measuring Sound Level and Frequency vs Time with Sound and Vibration Software

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Description

Overview

These Vis allow you to see frequency and amplitude as a function of time.

 

Description

These Vis are a modification of the Sound and Vibration example Sound Level Meter found in the NI Example Finder under Toolkits and Modules » Sound and Vibration » Analyzing and Processing Signals » Sound Level Measurements.  The Vis are modified to show frequency as a function of time by using the Extract Single Tone Information.vi.

 

Requirements to Run

Software

  • LabVIEW 8.6 or compatible
  • DAQmx 8.7.2 or compatible
  • Sound and Vibration Toolkit

Hardware

  • Nothing for simulated version
  • Typically NI DSA devices are optimal for sound and vibration applications, however most NI DAQ boards with analog input could be used.

 

Steps to Implement or Execute Code

DAQmx version:

  1. Set the Physical Channel.
  2. You can chagne the sensor sensitivty, weighting, and frequency range. However, this step is just optional.
  3. Press Run.
  4. To stop the VI, use the stop button.

2013-02-05_124707.png

2013-02-05_124939.png

 

Simulated Version:

  1. Configure the signal type.
  2. Press Run.
  3. To stop the VI, use the stop button.

 

2013-02-05_124543.png

2013-02-05_124633.png

 

 

2013-02-05_125045.png

 

Additional Information or References

Sound and Vibration Software Overview and Comparison

 

Two Vis are attached. The simulated version includes a simulated signal. For the DAQmx version, it is ready to use with your device.

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Maggie
National Instruments
Applications Engineer
ni.com/support

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.