Example Code

Simple Filters with Spectrum Analyzer

Code and Documents

Attachment

Overview
This VI filters a noisy sine wave using a Low Pass, a High Pass, or a Band Pass filter.  It also shows the filtered signal on a simple Spectrum Analyzer.

 
Description
A noisy sine wave is generated and, depending on what the user chooses, passed through either a Low Pass, High Pass, or Band Pass filter.  There are two graphs that show the unfiltered and filtered sine wave.  An FFT function is then performed on the filtered signal and it is shown in a graph that represents a Spectrum Analyzer.        

 
Requirements

  • LabVIEW 2013 (or later)


Steps to Implement or Execute Code

1.Choose the type of filter you want to use.

2.Input the frequency of the sine wave.

3.Choose the cutoff frequency(ies) for the chosen filter.

4.Run the program (the above steps can be changed while the program is running).

 

 

Additional Images or Video

Filter VI Snippet.png

 

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

 

 

Taylor

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