DMC, Inc.
automating RF measurements

Automating RF Measurements Using LabVIEW for Keysight CXA, ENA, and EPM Instruments

Automating RF measurement systems can dramatically improve test efficiency, repeatability, and accuracy, especially in environments where multiple instruments must be configured and synchronized. DMC developed a LabVIEW-based application to automate measurements for three commonly used Keysight RF test instruments: an RF Spectrum Analyzer (RFSA), an RF Network Analyzer (RFNA), and an RF Power Meter (RFPM). 

The application leverages the Keysight instrument driver library to handle communication and control, while providing a user-friendly graphical interface (GUI) for remote operation. We also integrated the system with NI TestStand, creating a reusable set of custom steps that simplify sequence development.

System Overview

The goal was to design a flexible, modular system that allows an engineer or technician to:

  • Configure measurement parameters for each instrument, using either the LabVIEW GUI or the onboard GUI of each device.
  • Execute measurements automatically or under manual supervision.
  • Collect and log results for analysis.
  • Save and recall instrument states for repeatability.
  • Integrate the entire workflow into automated TestStand sequences.

The core of the system is a LabVIEW application that acts as both the user interface and the instrument control framework. Each instrument is managed by its own dedicated driver class, responsible for communication, configuration, and data acquisition. All devices are connected to a controller PC that runs the LabVIEW application via LAN interface.

Using Keysight Instrument Drivers

Keysight provides certified LabVIEW drivers for many of its instruments. The libraries used in this application are as follows:

  • RFSA: Keysight XSAn library
  • RFNA: Keysight NA library
  • RFPM: Agilent E441X Series library

These drivers implement a consistent API structure and follow the VISA standard, making them ideal for this type of automation project.

Our application created an Initialize, Calibrate, Configure, Acquire Data, Save/Recall Device State, and Close step for each device, using a parallel structure to the Keysight API for ease of integration. While these steps mirror the basic functionality of the VIs in the libraries, they allow the application to be more customizable by controlling only the settings we need to help streamline TestStand sequence development. The functions of each step are below:

  • Initialize: This step creates an instrument handle that will be used by all other Keysight drivers in the device’s lifecycle
  • Calibrate: This step allows the user to perform calibration and zeroing steps on the device (only for RFPM)
  • Configure: This step allows the user to select specific settings for the measurements and sends them to the device
  • Acquire Data: This step will perform a measurement using the settings specified in the previous step and export the data to the application
  • Save/Recall Device State: This step allows the user to save or recall all device settings as a configuration file locally on the device’s drive (Only for RFSA/RFNA)
  • Close: This step closes the VISA resource for the device to prevent any memory issues when the app closes

Application Design and Architecture

The LabVIEW application uses an object-oriented approach, with each device having a widget class, an abstract class, a Keysight instrument class, and a simulated class. The widget class uses APIs from the abstract class to call the basic steps listed above. Each widget also contains the GUI for device control from the LabVIEW front-end.

The Keysight instrument class contains device-specific drivers, and the simulated class generates random data when hardware is not available. If we replaced our devices with a non-Keysight model, we could easily add another class for that device’s drivers.

GUI Module

The GUI for RFSA has 2 screens, with users able to control basic display settings or recall a state from the device’s settings on the first screen. More settings options are available on the second screen, which is accessible by selecting the “Configure” button. After the user selects their desired settings, they can conduct a measurement using the “Start” button, then set markers using the frequency control or the slider below. The positions of the markers automatically update, and their frequency and amplitude values are displayed below.

main tab swept SA measurement
configure tab RF measurement

The RFNA has a similar GUI but requires fewer settings. It has one screen, allowing the user to control the frequency range and select the test type between Insertion Loss (S12) or VSWR (S11). Like the RFSA, users can recall a device state, start a measurement, and control the marker from this screen.

VSWR measurement

The RFPM has a different GUI because it only conducts single-channel measurements, as opposed to frequency sweeps. This GUI allows the user to perform a calibration sequence by selecting the type (Calibrate, Zero, or Calibrate & Zero). The user can then select the frequency at which to conduct the measurement and set the resolution for the measurements. When the user selects the “Measure” button, the device conducts a power measurement and displays it both on the device’s onboard GUI and the LabVIEW GUI.

RF measurement calibration

Data Acquisition and Storage

Measurements for each device can be conducted simultaneously, and the data from all three instruments can be automatically logged to local or network drives. For this application, the data is stored in a TDMS file format, but could easily be saved as a CSV or other format as well.

DMC implemented a data tagging system that associates each measurement with metadata such as date, time, operator, device under test (DUT) ID, and test sequence name. This metadata improves traceability and simplifies post-test analysis.

Integration with NI TestStand

DM added an additional layer of efficiency to the RF measurements by integrating them into NI TestStand sequences used across multiple test stations. To achieve this, we created custom TestStand steps that directly call the LabVIEW VIs controlling each instrument. Each step has a wrapper VI that is used to create a TestStand custom step. This allows the user to create sequences in TestStand the same way they would in LabVIEW, but without needing to understand the programming backend. When used in a sequence, the data plots appear in the report generated by TestStand, and the data can be used in pass/fail grading steps during the sequence itself.

TestStand is the foundation of one of DMC’s core battery test platforms for the reasons above and can enhance the accessibility of automation when used in conjunction with well-encapsulated LabVIEW code.

Conslusion

This project demonstrates how combining LabVIEW, Keysight instrument drivers, and NI TestStand creates a powerful and flexible RF measurement automation platform. By automating configuration, acquisition, and reporting for the three devices, we achieved significant gains in efficiency, repeatability, and scalability. The system meets current test requirements and lays the foundation for future automation initiatives. Because of the modular LabVIEW code, we can easily scale the system to add functions, GUI elements, and devices with minimal rework.

Ready to take your Test & Measurement project to the next level? Contact us today to learn more about our solutions and how we can help you achieve your goals.