Automate Measurements on NI ELVIS III with LabVIEW

Updated Jul 15, 2024





  • LabVIEW

The NI ELVIS III integrates instrumentation and control into a single solution for project-based learning. In this article, we introduce two LabVIEW based APIs: the Instruments API and the Control I/O API. Stepping through each of these APIs and understanding the use of LabVIEW, students, and educators can be create labs and projects for a host of applications including electronics, mechatronics, controls, and measurements.

Please note that a basic understanding of LabVIEW including the environment and structures is required. If you are not yet familiar with LabVIEW we recommend using the training available from the NI Learn Platform .

There are two options for installation: either install the NI ELVIS III Software Bundle which will include LabVIEW, Real-Time, the NI ELVIS III Toolkit, and everything else needed to program NI ELVIS III or you can just install the NI ELVIS III Toolkit. See "Installing the NI ELVIS III Software Bundle" for further details including where to find the download.

Locating the VIs in the Palettes

In LabVIEW the Instruments and RIO palettes are found in the Academic I/O Functions Palette as seen below:

Figure 1: LabVIEW Palette for NI ELVIS III APIs

The Academic I/O palette is available only when the VI is under the ELVIS target.


Using the Instruments API

NI ELVIS III has seven instruments that can be accessed through a soft front panel that represents the same controls as a traditional benchtop instrument panel to measure, output, and customize the instrument. For NI ELVIS III, videos of how to use instruments including the oscilloscope and bode analyzer see Explore NI ELVIS Instruments.

However, if there is a need to automate measurements or there is a requirement for post-processing data, the LabVIEW API for the instruments can be used to program a  fully customizable interface.

Each instrument API closely follows a standard pattern you will find throughout LabVIEW. This pattern is found in thousands of LabVIEW instrument drivers and APIs used by professionals in industry around the world.

Understanding this pattern enables the rapid use of any of those drivers in your application. The pattern is as follows:

Figure 2: Standard LabVIEW instrument program

The complete set of instruments can be found in the Instrument palette.

Each instrument has its own set of Vis which can be found in the Instruments folder within the Academic I/O palette. See the image below to see how the oscilloscope instrument VI follows the standard pattern mentioned previously.

Figure 3: Oscilloscope Palette

An example of how these VIs can be connected together to program an instrument is seen below. The Function Generator and Variable Power Supply Instruments are demonstrated in a singular automated dataflow below.

Depending upon the instrument, an explicit Run command might be required in the code to begin execution, and if used in a loop must be stopped before changing its configuration.

It is a good rule of thumb to stop an instrument before making changes to its settings.

Figure 4: Example of FGen and VPS program in LabVIEW


Using the Control I/O API

The control I/O palette consists of a set of Express VIs and low-level VIs which allow direct command over the NI ELVIS III control I/O. These commands are implemented on a real-time processor based upon a reconfigurable I/O (RIO) architecture. The RIO architecture is the exact same technology used in over 35,000 companies around the world.

Unlike the Instruments I/O, the control I/O prompts users to drop an Express VI (a VI whose settings you can configure interactively through a dialog box).

The Express VI configuration dialog contains the open, configuration, and read/write commands in a single setting.

Figure 5: Details of the Control I/O palette
By placing an Express VI onto a block diagram, it automatically opens its configuration window. All Express VIs can be reconfigured by double clicking on them at any time. As an example, the Analog Output configuration window is seen below:

Figure 6: Analog output configuration window
As can be seen above, the configuration window sets the mode (single vs n sample), what channel is used, and the sample rate. The data to output is fed into the input that is automatically generated on the Express VI when the configuration window is closed.
If more customization is needed than the Express VI configuration window, then low-level VIs can be used to achieve the same outcome.