Install LabVIEW NXG
LabVIEW NXG simplifies hardware integration so you can rapidly acquire and visualize data from virtually any I/O device, whether from NI or a third-party. Combined with a graphical programming syntax that reduces programming time, LabVIEW NXG streamlines complex system design with tools and IP at the forefront of today’s technology.
Download LabVIEW NXG
Learn more about LabVIEW NXG
Figure 1. LabVIEW NXG provides an intuitive programming environment for automating measurements from both NI and third-party instruments.
Install Agilent 33000 Series Instrument Driver
NI develops and supports thousands of instrument drivers for third party instruments to help engineers and scientists automate measurements. You can find these instrument drivers in the Instrument Driver Network.
Download Agilent 33000 Series Instrument Driver.
Figure 2. The NI Instrument Driver Network houses thousands of instrument drivers for automating third-party instruments
Connect and Configure Agilent 33000 Function Generator Instrument
You can connect your Agilent 33000 series function generator to your host PC using a method that works for your instrument. The Agilent 33210A and 33220A support GPIB (IEEE 488.2), USB, or Ethernet (LXI); Serial (RS232) interfaces are not currently available on these instrument models. The Agilent 33120A and 33250A support GPIB (IEEE 488.2) and Serial (RS232); Ethernet (LXI) and USB are not currently available on these instrument models. NI offers GPIB and Serial control modules to add to PXI and PCI based systems, as well as USB to GPIB, USB to RS232, and USB to RS485 converters (common for adding GPIB and Serial ports to laptop computers).
Figure 3. The Agilent 33220A function generator has GPIB, USB, and Ethernet communication ports on the back.
Configure Your System With SystemDesigner
SystemDesigner, a graphical tool for discovering, documenting, and configuring your test system, is integrated directly into every LabVIEW NXG project. This tool automatically detects USB hardware connected to your host PC and adds a graphical representation to the window. If you select the device, you can see additional properties, such as the device name, and any software or drivers that are installed on your system to support this device. You can also troubleshoot and make manual function calls to your instrument to ensure that it is working as expected before moving into automation.
Figure 4. SystemDesigner provides an intuitive, graphical representation of all hardware and software associated with your test and measurement system.
- Locate the communication ports on the back of the Agilent 33000 function generator instrument.
- Locate the communication ports on your host PC
- If you are using a laptop, you likely have only USB. If you are using the Agilent 33120A or 33250A, you need to use a USB to GPIB or USB to Serial converter (mentioned in paragraph above)
- If you are using a desktop PC or an industrial PC, you likely have serial and GPIB slots. If not, you can use a PCI(e) GPIB/Serial device when interfacing with the Agilent 33120A or 33250A, or use USB when interfacing with the Agilent 33120A or 33220A.
- Using the right cable for your communication port (GPIB/Serial/USB), connect your Agilent function generator instrument to your host PC
- Power on your Agilent function generator instrument and allow time for initialization
- Launch LabVIEW NXG
- On the LabVIEW NXG Welcome Screen, select Use Your Hardware
- SystemDesigner opens with a high level view of your system. The procedure for detecting your device depends on the bus you are using.
- GPIB—Select your GPIB interface in SystemDesigner. From the Configuration Pane on the right, scroll down to the installed drivers section to find and install the NI-488.2 drivers. Then return to the Configuration Pane and go to the Advanced section to select Launch NI MAX. Within Measurement & Automation Explorer (MAX) select the GPIB interface and choose Scan for Instruments. The instrument is then detected.
- Serial—The COM port does not show up in SystemDesigner. First ensure you have the NI-Serial driver installed. Select the PC from the SystemDesigner page. Using the Configuration Pane on the right, go to the Advanced section to select Launch MAX. Within MAX, select the COM port and make sure the port settings match the serial settings on your instrument. Serial instruments are not visible in MAX or SystemDesigner. When writing an instrument control application for a serial instrument, you communicate with a COM port rather than the serial instrument connected to the COM port.
- USB—Select your USB interface in SystemDesigner. From the Configuration Pane on the right, scroll down to the installed drivers section to find and install the NI-VISA driver. Then return to the Configuration Pane and go to the Advanced section to click Launch MAX. Within MAX, select the USB interface and click Scan for Instruments. The instrument is then detected.
- The instrument is now configured.
Automate Measurements With LabVIEW NXG
After performing manual/interactive measurements to achieve the results that you need to test your device, the next step is to perform automated measurements to reduce measurement time and increase repeatability.
Application Programming Interface (API)
To help accelerate software development, all instrument drivers follow a consistent programming flow of: Open, Configure, Read/Write, Close. All drivers for NI hardware (for example, PXI modular instruments) also follow this paradigm because it is a best practice when programming in LabVIEW NXG.
Figure 5. The Agilent 33000 instrument driver for LabVIEW NXG uses an intuitive and consistent programming pattern of Open, Configure, Read/Write, and Close
Start From an Example Program
The Agilent 33XXX LabVIEW Plug and Play driver includes a LabVIEW NXG project that features several example VIs to help you get started. Open these examples using the following procedure.
- Open LabVIEW NXG.
- Open the Learning tab by selecting the Learn to Program tile in the Welcome screen or selecting the Learning tab from the top right.
- Select Examples»Hardware Input and Output»Instrument Drivers to locate all the examples included with installed LabVIEW Plug and Play instrument drivers.
- Click the Agilent 33XXX project to create a new copy.
Figure 6. LabVIEW NXG instrument driver examples are included with every LabVIEW Plug and Play instrument driver
- The Agilent 33XXX.lvproject contains several example VIs that require no extra programming to run. Double click a VI in the Project Files tab within the Navigation Pane to open it.
Figure 7. The Agilent 33XXX LabVIEW Plug and Play driver includes multiple example VIs to help you get started.
To run a VI, first select the corresponding VISA Resource Name and appropriate settings on the panel. Then click the green Run arrow at the top left of the VI.
Figure 8. Select the corresponding VISA Resource Name and appropriate settings on the panel before running the example VI.
Customize Waveform Settings
All LabVIEW Plug and Play examples are completely extensible and customizable to fit your measurement needs. For example, start with the Agilent 33XXX Series Generate Arbitrary Waveform.gvi included in the Agilent 33XXX example project. Then add the ability to configure the waveform that is generated using the Agilent 33XXX LabVIEW Plug and Play driver functions.
- Open the Agilent 33XXX Series Generate Arbitrary Waveform.gvi from the Agilent 33XXX.lvproject.
- Click Diagram on the View Selector to view the VI’s diagram.
- Use the following procedure to add manual inputs for noise, samples, and frequency:
- Right-click the “frequency” constant on the Simulate Signal Express VI and select Undock from node. Do this for “noise?” and “samples” as well.
- Create a “noise?” boolean control by right clicking the “noise?” boolean constant and selecting Change to control.
- Change the “frequency” and “samples” constants to controls using the same method.
Figure 9. Right click terminals and choose Change to control to create a control wired to that terminal.
d. Go back to the panel by choosing Panel on the View Selector. Place all new controls on the panel by selecting the Unplaced items box and placing each on the panel. Note that you can place multiple items simultaneously from the Unplaced items box by holding Ctrl while selecting the items in the box. You can then place items one by one on the panel.
Figure 10. Place Controls onto the Panel using the Unplaced items box.
- When you have finished making changes, save them by selecting File and Save Agilent 33XXX Series Generate Arbitrary Waveform.
Add Burst Functionality
The Agilent 33XXX series driver includes several other built-in functions you can use to add burst and other functions to your waveform generation. Follow the procedure below to add burst to the Agilent 33XXX Series Generate Arbitrary Waveform.gvi
- Open the diagram of the VI by choosing Diagram in the View Selector.
- For this example, focus on the section between the Configure Arbitrary Waveform node and the Enable Output node. Drop down the Configure Burst node between the Configure Arbitrary Waveform node and the Enable Output node indicator by selecting it inside the palette on the left side of the diagram in Hardware Interfaces» Instrument Drivers»Agilent 33XXX Series»Configure.
Figure 11. Hundreds of built-in functions are included with LabVIEW and the Agilent 33XXX series driver
- After placing the Configure Burst node, be sure to connect the purple instrument wire and the yellow error wire appropriately.
Figure 12. Wire the purple instrument wire and yellow error wire through the Configure Burst node.
- You can configure the Configure Burst node with several inputs. Create an option for enabling burst by right-clicking the enable burst terminal on the left side of the Configure Burst node and selecting Create control.
- Add an input to change the number of bursts you want the instrument to perform by right clicking the burst count terminal on the bottom side of the Configure Burst node and selecting Change to control. Do the same for the burst phase and burst period terminals on the left side and bottom of the Configure Burst node.
- Switch to the panel of the VI by choosing Panel in the View Selector.
- Drop all the indicators and controls from the Unplaced items box on the panel.
Figure 13. Customize the panel of the VI to fit your application needs.
- Save the VI by selecting File and Save Agilent 33XXX Series Generate Arbitrary Waveform.gvi.
- Select the number of bursts you want the function generator to produce using the burst count control. The default value is 1.
Conduct Sequencing and Database Reporting With TestStand Test Management Software
TestStand, a ready-to-run test management software, is designed to help you develop, execute, and deploy automated test and validation systems faster. Although LabVIEW NXG is ideal for developing individual code modules, you can use TestStand to call multiple code modules you have developed in LabVIEW NXG, along with other programming languages, to build a sequence. Finally, you can specify execution flow, reporting, database logging, and connectivity to other enterprise systems for your test system.
Learn more about TestStand test management software
Figure 14. Test management software (for example, TestStand) is at the top of a properly architected test system
Consider PXI Arbitrary Function Generators
NI PXI Waveform Generators can produce precise waveforms including sine, square, triangle, and ramp as well as arbitrary, user-defined waveforms by using data sequences or by streaming continuously from a host or peer-to-peer instrument within the PXI system. These instruments are ideal for tightly synchronized, mixed-signal test systems in semiconductor, consumer electronics, automotive, and aerospace/defense scientific research or test.
Learn more about NI PXI Waveform Generators
Figure 15. NI PXI Waveform Generator Units