This is a very simple automation VI that performs a frequency and power sweep and plots the gain of an RF DUT (for example, a power amplifier).
The RF generator generates a CW tone and sweeps both frequency and power. The RF analyzer measures the spectrum at the DUT output and fetches the peak power. The DUT gain is calculated as (DUT output power) - (DUT input power) = (MeasuredPeakPower) - (GeneratedRFSGPower).
The results are presented as a Gain vs. DUT Input Power series of plots for each frequency tested.
It's important to put a proper approximation for the DUT gain before running the test. This will set the analyzer reference level to a safe state.
Hardware:
RF Analyzer (eg. PXIe-5840 VST)
RF Generator (eg. PXIe-5840 VST)
RF DUT
Software:
NI-RFSA (16.0 used)
NI-RFSG (16.0 used)
NI-RFmx SpecAn (2.2 used)
LabVIEW 2016 or later
1. Open the VI
2. Configure hardware and sweep parameters for the generator and analyzer path (RFSG to DUT Pin and DUT Pout to RFSA respectively)
3. Run the VI, you should see each test point update the results in the center column.
4. When the test is finished, the Results graph is updated.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.