Example Code

How Do I Generate a Chirp Signal in 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.


  • Multifunction I/O Device


  • LabVIEW
  • LabVIEW Sound and Vibration Toolkit

Code and Documents



This example will teach you how to create and output a chirp signal through a DAQ device in LabVIEW. Additionally, you will become familiar with considerations that need to be taken into account.

How to Use

A chirp signal in which the frequency continuously increases (up-chirp) or decreases (down-chirp) with time as shown in the picture below. It is commonly used in sonar and radar applications, but has other applications such as stimulus response analysis and spread spectrum communications.

LabVIEW has a built-in function named Chirp Pattern VI that creates a continuous normalized sweep from a start frequency to a stop frequency, It can be found on the Block Diagram under the Functions Palette >> Signal Processing >> Signal Generation.

In order to output a chirp signal properly using a Data Acquisition device, you'll need to normalize the start and stop frequencies of the chirp signal to the sampling rate of your device by dividing the frequencies by the sampling. In this way, the Chirp Pattern VI will create a signal that when output at the sampling rate of your board, will be accurately represented in physical world.

Attached is an sample program that shows how to create a chirp signal that can be used for signal generation with NI devices.

Alternatively, with the Signal and Vibration Measurement Suite there is a way to generate a chirp signal, also known as a sweep signal, for sine waves specifically with DAQ devices. Example code for the signal can be found under LabVIEW\examples\Sound and Vibration\Swept Sine directory.

Related Links


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