Example Code

FFT Example From Single Input Data Using LabVIEW

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.


  • LabVIEW

Code and Documents


This code was developed to show how to build a waveform with input single pieces of data, then perform an FFT then display the results in a simple straightforward fashion.

This code takes simulated single point data in the form of a sine wave (4 points per revolution) then outputs the data into a waveform and performs an FFT based on the data.  When used on actual data, the code will need to be adjusted to match the different update rates of your hardware.


  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code

  1. Select an arbitrary number of samples
  2. Select an arbitrary frequency
  3. Run the VI
  4. Observe the results, adjust as needed.


Additional Information or References
VI Block Diagram


 If this code is too simple please see the example code in LabVIEW or this example: https://decibel.ni.com/content/docs/DOC-28042


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



Bobby Breyer
Applications Engineer
National Instruments

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