Example Code

Radar Pulse Generator Example Program

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.


  • RF|Wireless


  • LabVIEW


  • NI RF Device Drivers

    Operating System

  • Windows

    Programming Language

  • LabVIEW G

Code and Documents


Download All


This example is a generic demonstration for radar pulsed modulated signals generation. It provides the ability to configure different pulse modulation and play the signal via a Vector Signal Generator or Transceiver using the RFSG driver.


This example supports the generation of the following signals:

  • Unmodulated pulse: A standard pulse with configurable duty cycle (duration) and IQ rate
  • FM Slow Chirp: A LFM modulated signal with an up-ramp and down-ramp and configurable chirp length or ratio (ratio of the entire pulse duration)
  • FM Fast Chirp: A LFM modulated signal with a configurable number of up-chirps where the pulse duration is spread evenly over the configured number of chirps
  • Non Linear FM (NLFM) :A Nonlinear FM compressed pulse with configurable exponential order
  • Barker Coded BPSK: Phase-coded waveforms differ from FM waveforms in that the long pulse is sub-divided into a number of shorter sub pulses. Generally, each sub pulse corresponds with a range bin. The sub pulses are of equal time duration; each is transmitted with a particular phase. The phase of each sub-pulse is selected in accordance with a phase code. The most widely used type of phase coding is binary coding.

The example allows to configure interactively a pulse train with configurable parameters such as BW, PRI, pulse duraction,pulse count, silence time after a pulse train and many other modulation specific parameters. This pulse train can be repeated indefinetely until the user stops the application.

A trigger is generated via a marker event on the start of each new pulse train. This trigger is exported for external use via PXI_Trig0. You can use the trigger to synchronize the generator and receiver or to drive an external DUT.


Alternatively, the example offers the option to generate a script (table of pulse train) that will play sequentially by generating a new trigger for each entry. The pulse trains can have different modulations and parameter configurations which can be used for different functionalities such as PRI staggering and pulse agility.

The script has a specific syntax that is described in the attached document. It can be configured manually. Or, there is a script assistant in the UI to allow interactive configuration of the script, saving the config to a file and load an existent configuration.


For more information, refer to the attached manual.




How to Use

Download the Attached ZIP file and extract it to:

  • C:\Program Files (x86)\National Instruments\LabVIEW 201x\user.lib\Radar Tools Library for 32 bits LabVIEW
  • C:\Program Files\National Instruments\LabVIEW 201x\user.lib\Radar Tools Library for 64 bits LabVIEW


Follow the instructions in the User Manual.

Additional Information

Supported Hardware: NI VST and VSG supporting RFSG Scripting. this example has been tested with following HW:

  • VST 564x
  • VST 5840/1
  • VST 5830/1



Supported Software:

  • LabVIEW 2018 (32 or 64 bits) or later
  • LabVIEW Modulation Toolkit 18.0 or later
  • RFSG driver 18.1 or later
  • (optional: RFSA 18.1 or later)
  • It is recommended to install RFmx SpecAn 19.0 or later to test the generated signal via RFmx Soft Front Panel of LabVIEW APIs

Related Links

This example is an improvement of the existent Radar Library toolkit:


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