Using LabVIEW with a SYS-2722

Created on 2008-07-11 13:12:00

This tutorial assumes the user has a basic knowledge of LabVIEW and its measurement architecture (visit the National Instruments website for LabVIEW help). For initial setup of your 2722, please download the Getting Started Guide for the AP2700 LabVIEW driver from the Software section of the AP website.

Initialize and Analog Generator Setup
When developing a custom VI (LabVIEW virtual instrument) that includes the AP2700 driver, the first step is to define the VISA resource for the instrument and connect the resource to the AP2700 Initialize VI. Find the GPIB address to which the 2722 is connected (in this example we’re using Address #2) and enter the string as shown into the VISA Resource control.

Note: For each VI setting, you can either look at the Front Panel view or its equivalent icon in the Block Diagram view.

Initialize VI: Front Panel View
Initialize VI : Block Diagram View

When this VI is run you will hear a series of relay clicks indicating that the instrument is set to its default state and is ready to accept measurement commands.

The first step in taking a measurement is to set up a stimulus, in this case we will need a 1 kHz 1Vrms sine wave, which we will obtain via the AGEN SINE VI. AGEN SINE is a VI created by Audio Precision. Like all the VIs in this tutorial, it’s available for download at http://ap.com/ap/download/AP2700_LabVIEW.zip.

The AGEN SINE VI requires parameters to configure the output voltage and frequency values. Use the AGEN SINE VI Control Panel to input the values and configure the hardware connectors (in this example we’re using balanced BNCs).

This VI completes the signal generator portion of the measurement.

AGEN SINE VI: Front Panel View

AGEN SINE VI: Block Diagram View

 

Analog Analyzer Setup
Now we need to set up the analyzer to take a THD+N reading.

The first step here is to define the physical connectors for analyzer input. Here we use the AP2700 ANLR INPUT VI, the source can be Balanced XLR, Unbalanced BNC or generator monitor. Again, use the VI’s Control Panel to define the parameters.

ANLR INPUT VI: Front Panel View
ANLR INPUT VI : Block Diagram View

A more complex analyzer input VI would look like the one below, with selections for weighting filters and other input test conditions:

ANLR INPUT VI: Front Panel View
ANLR INPUT VI : Block Diagram View

Taking the reading
To take a reading of the measurement that has been set up, click the “Run” command on the LabVIEW tool bar. The front panel of the AP2700 ANLR FUNC M VI returns the THD+N value as a numeric double. In this example, the value of .0205% was returned.

ANLR FUNC M VI: Front Panel View

ANLR FUNC M VI : Block Diagram View

Here is the block diagram view of the entire THD+N VI

THD+N VI: Block Diagram View


Click to launch a larger view

 

Advanced example VIs
To see a more advanced VI design, open the THD+N Vs. FREQUENCY VI created by Audio Precision. This VI is one of several advanced sample VIs saved in the Examples folder of the AP LabVIEW Driver zip file.

THD+N Vs. FREQUENCY VI : Front Panel View


Click to launch a larger view

THD+N Vs. FREQUENCY VI : Block Diagram View


Click to launch a larger view


RELATED DOWNLOADS

2700 Series LabVIEW Driver (2.12 MB)

Audio Precision has developed a complete LabVIEW project-style instrument driver for IEEE 488.2 (GPIB) equipped models of the 2700 Series of audio analyzers. This driver supports NI LabVIEW 8.20.