How to use Keysight PXI instruments to run LabVIEW programs (detailed steps)
The PXI system provides a high-performance PC-based measurement and automated test platform. In addition to advantages in speed, scale, and scalability, PXI users can also benefit from open industry standards, which means that PXI hardware—instrument modules, chassis, and other devices from different manufacturers—can be used interchangeably. National Instruments' LabVIEW programming environment supports vendor interoperability, enabling test engineers to choose from a wide range of instruments, including Keysight PXI modules. To facilitate running LabVIEW programs with Keysight instruments, many Keysight PXI products come with LabVIEW drivers. In addition, products with .NET drivers and LabVIEW wrappers can also be used in LabVIEW.
This application note describes how to easily use Keysight Technologies PXI instruments in the LabVIEW programming environment. It includes the following topics and examples:
– Using .NET drivers and driver wrappers for Keysight instruments
– Using Soft Front Panels (SFP) for Keysight instruments
– Using LabVIEW G drivers for Keysight instruments
LabVIEW programmers are familiar with creating a user interface or front panel with controls and indicators for their test programs. Test code is then added to the front panel using virtual instruments (VIs) and structures that control the front panel objects. VIs are programs that LabVIEW uses to simulate instruments. The LabVIEW driver provides various VIs specifically for the functions of the instrument, which the programmer can select and use to create test code.
LabVIEW Driver Updatewww.keysight.com
Using .NET Drivers and Wrappers in LabVIEW
Programming with .NET drivers and driver wrappers for instruments in LabVIEW is simple by first creating a .NET Constructor VI, then initializing the module to establish control functionality, and sending configuration, measurement, and other commands. Below we provide step-by-step details using the Keysight M9336A arbitrary waveform generator as an example for creating a .NET Constructor VI and selecting a VI for instrument control.
Creating a .NET Constructor VI
To use .NET drivers and driver wrappers in LabVIEW, you simply use the .NET panel (Connectivity>>.NET), which includes the available functions.
To create a new VI in the block diagram, first open the Function Palette. Expand the Function Palette (Figure 1) and select Connectivity, select .NET, then select Constructor VI and place it on the block diagram. A prompt will appear asking you to select a .NET Constructor. Use the Browse button and select the appropriate component (.NET Driver and Wrapper).
Figure 1. From the Functions palette, navigate to Connectivity, then .NET and Constructor VI.
For 32-bit versions of LabVIEW, on 64-bit operating systems, the dll files are located in this folder:
C:Program Files (x86)KeysightMAwgbin
If you are running 64-bit LabVIEW, or a 32-bit OS on a 32-bit operating system, the dll files are located in this folder: C:Program FilesKeysightMAwgbin
Select the file KtMAwgDriverWrapper.dll, which corresponds to the M9336A Arbitrary Waveform Generator instrument module, and click the OK button.
Scroll down the list of objects to highlight KtMAwgWrpper and assign a constructor. KtMAwgWrpper will appear below in the “Constructors” field. Simply click “OK” and close the dialog box and the Constructor VI will be updated with the name KtMAwgWrpper.
To access the properties of the wrapper, select "Property Node" in the .NET menu panel. To view the methods in the wrapper, select "Invoke Node" in the .NET menu panel (Figure 2).
Figure 2. In the .NET menu panel, you can select Property Node and Invoke Node.
Initialize the module and establish control
To initialize the module, you need to access the Initialize method in the http://IVI.NET driver. Select the "Invoke Node" and place it on the block diagram, connecting the upper wire (reference) and the lower wire (error). To select a method, click "Method" in the VI and a list of root interface level methods will open for you to choose from. You can select the Initialize method by double clicking it.
Once you select a method by double-clicking it, the name of the VI changes to the name of the selected method and includes all of the method's parameters. This example shows the initialization method selected, along with the parameters for the resources and options associated with that method.
Figure 3. Selected initialization methods can support selectable parameters for resources and options.
This IVI help file can help you find the methods you need, which may be located in different interfaces. Click "Browse" and the system will provide a list of properties (or interfaces in the IVI help file) and methods.
Figure 4. Example of using Browse to view selectable properties.
http://IVI.NET Properties can be found in the "Property Node" of the "What is LabVIEW?" menu. Place the property VI on the block diagram, click on it, select "Browse", and then select the desired property (Figure 4).
Figure 5 shows an example of a LabVIEW program that uses the "Invoke Node" call to initialize, uses the "Property Node" to read the serial number, and ends the program by calling "Close."
Figure 5. Example of a .NET and wrapper program that initializes a PXI arbitrary waveform generator and reads the serial number.
Using the Keysight Instrument's Soft Front Panel (SFP)
To determine which commands to use and to become familiar with the IVI.NET driver calls, you can use a product's SFP.
You can first open SFP from the Start menu. From your computer's Start menu, select: Start->All Programs-
>Keysight->MAwg->MAwg SFP. Another benefit of using the SFP is that it allows you to quickly determine the PXI address of the AWG. You can capture and view the IVI driver calls (Figure 6) for reference while programming by selecting Tools->Monitor Driver Calls.
This example shows the code generated when Output Enabled is selected.
Figure 6. M9336A Arbitrary Waveform Generator Soft Front Panel showing the driver command log.
You can see in the generated code that in order to support output channels in LabVIEW, you need to access the output interface of the .NET driver (KtMAwgDriverWrapper component).
If you use SFP when programming in LabVIEW, be sure to turn off SFP before running the LabVIEW program.
Using Keysight Instrument LabVIEW G Drivers
Many Keysight PXI instruments include a LabVIEW G driver to seamlessly integrate Keysight PXI instruments into your LabVIEW test system program. If you already have LabVIEW installed on your test PC or controller, you can simply download one or more instrument drivers, depending on your application. You can download them from the CD that came with your Keysight instrument or from the Keysight support page on the website. Once the driver is loaded, you can start connecting your program sequence by selecting from the many available VIs or other instrument VIs.
Figure 7 shows the M9181x series DMM AC Current Measurement VI. The associated help file includes a comprehensive description of the adjustable instrument parameters (Figure 8) and their types (DBL, I32, abc, etc.), so you can easily configure and make measurements in a very short time.
Figure 7. M9181x DMM LabVIEW VI used to make AC current measurements.
Figure 8. The M9181x DMM LabVIEW VI Help file includes instrument parameter descriptions.
This application note provides various example programs for each instrument to help you speed up program development. This example starts with initializing the Keysight M9393A vector signal analyzer:
Figure 9. Programming example starting with initialization of the Keysight M9393A vector signal analyzer.
As programming progresses, the identity of the driver is determined, as shown in Figure 10. The vector signal analyzer then performs three acquisitions, each with the same duration but at different sampling rates, resulting in different lengths of samples. The analyzer captures the results of all three acquisitions and stores them simultaneously in the digitizer memory.
Figure 10.
The vector signal analyzer's RF characteristics are then set up and an immediate trigger is configured for IQ acquisition, as shown in Figure 11.
Figure 11.
The IQ acquisition parameters are set and memory is allocated in the digitizer to hold the measurement results. An ID and some acquisition details are also stored, as shown in Figure 12.
Figure 12.
Now that we have captured the measurements, the driver is turned off, as shown in Figure 13.
As a LabVIEW programmer, you get the familiar VI programming experience when using the Keysight G Driver for PXI Instruments, while having access to all product features and functionality to take full advantage of the broad range of Keysight PXI instruments.
Summarize
You can use LabVIEW to program PXI instruments in a variety of ways. In this application note, we outline several common methods for performing this task:
– Using .NET drivers and driver wrappers
– Using the instrument’s soft front panel
– Use the LabVIEW G driver.
Interoperability gives you the freedom to choose PXI instruments from multiple vendors. Therefore, you can choose the performance and features you need for your application when developing a LabVIEW-based test system. Keysight PXI instruments provide instrument drivers that make it easy to use Keysight products in LabVIEW test programs. We provide drivers and program examples for each instrument to help you speed up program development.
Previous article:How can a novice quickly learn to use LabVIEW to operate hardware?
Next article:Acceleration sensor (MPA1064A) actual measurement --- LOTO virtual oscilloscope
- Popular Resources
- Popular amplifiers
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- In what situations are non-contact temperature sensors widely used?
- How non-contact temperature sensors measure internal temperature
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Looking for a linear voltage regulator chip
- Considerations for selecting solid-state relays
- Download and get a gift: Explore 5G together and win a surprise~
- Pingtouge RVB2601 board initial evaluation
- I was sorting out my drawers and saw this...
- AG9311DEMO board circuit design schematic diagram | PD TYPE-C to HDMI solution design principle question
- [Program source code] Freescale MAPS-K64 development board program example
- Sensor materials for learning at home: the hottest collection of EE sensor materials
- [RVB2601 Creative Application Development] Unboxing
- [Silicon Labs Development Kit Review] +Si7021 Temperature and Humidity Sensor Detection