How to Change the Amplitude of Output Signals Dynamically Using Function Generator Modules

Updated Apr 21, 2025

Environment

Hardware

  • PXI-5422
  • PXIe-5413

Software

  • LabVIEW

National Instruments offers several types of function generator modules, such as the PXIe-5413 and PXI-5422. There are various approaches to dynamically change the amplitude of output signals. This document explains the fastest method using the digital gain property to change the amplitude dynamically.

For the demonstration, we used PXIe-8862, PXIe-1095, PXIe-5413, and PXI-5422. The performance of the VI and hardware is restricted by the OS and controller. Therefore, we do not guarantee the behavior of the hardware/software as explained in this document.

You can start with the Fgen Arbitrary Waveform.vi available in the NI Example Finder. You need to add the digital gain property as shown below.

By using the digital gain property, you can rapidly change the amplitude of the signal between -1 and +1. This method is much faster than changing the waveform data itself because the digital gain is applied just before the DAC.

 

In this test, PXIe-8862 (Windows 11) was used. In summary, the PXI-5422 performs better in switching amplitude. I changed the amplitude from 0.1 V to 1 V in 0.1 V increments (10 steps), and the PXI-5422 was able to change the amplitude in 10 steps within 1 ms. However, there is some fluctuation in the execution time. On the other hand, the PXIe-5413 takes almost 10 ms. (This performance is not guaranteed.)