Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: May 16, 2008


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Getting Started Using National Instruments IVI with LabVIEW or LabWindows/CVI

9 ratings | 3.67 out of 5
Print

Overview

This document describes how to install, configure, and use the IVI™ drivers and tools available from National Instruments™. All of these drivers and tools are based on the IVI Foundation’s currently released and approved IVI specifications. You can download the specifications from www.ivifoundation.org.

This document describes how to use IVI drivers in a simple application in LabVIEW™ or LabWindows™/CVI™. After completing the example, you will be able to perform the following tasks:

  • Run an example application that makes calls to an IVI class driver.
  • Use the IVI category in Measurement and Automation Explorer (MAX) 3.0 or later to configure your instrumentation system.

You can use MAX to swap instruments without recompiling or relinking the application source code.

The NI Web site contains examples, class drivers, and IVI-C specific drivers for use with other IVI classes. You can download these resources from zone.ni.com/idnet. This document describes how to use the IviDmm class driver with the hp34401a and fl45 specific drivers; however, you can use these instructions as a guideline for using other examples and drivers.

Note To complete the exercises in this document, you do not need to have the actual instruments because you can run IVI drivers in simulation mode.

If you are unfamiliar with the architecture of IVI-C class drivers, refer to IVI-3.1: Driver Architecture Specification available at www.ivifoundation.org.

Installing the Software

Complete the following steps to install the IVI software on your system. You can find all of the following components on ni.com.

  1. Install the IVI Compliance Package from Drivers and Updates (link below).
  2. Install NI-VISA from Drivers and Updates (link below).
  3. Choose two IVI-C specific drivers to use in the examples. These two drivers must be from the same class. Install the two drivers you have chosen from NI Instrument Driver Network (link below).
  4. Restart the computer after installing the software.
    See Also:
    NI Web Support--Drivers and Updates
    NI Instrument Driver Network

Configuring an IVI System in Measurement & Automation Explorer

Complete the following steps to configure your IVI system in MAX:

  1. Launch MAX.

    Note If you cannot see the IVI Drivers folder, press <F5> to refresh MAX.
  2. Expand IVI Drivers.
  3. Right-click Logical Names and select Create New (case sensitive).
  4. Replace the default logical name, NewLogicalName, with the new case-sensitive name of your choice, such as MyDmm.


    [+] Enlarge Image
  5. Select hp34401a from Driver Session as shown in the following figure.


    [+] Enlarge Image
  6. Click Go To to view the properties of the hp34401a driver session.
  7. Under the General tab, you can enable or disable initialization options. If you do not have the actual instrument connected to your system, make sure that you select Specific Driver from Simulate With as shown in the following figure. Otherwise, select Don't Simulate and create a new hardware asset under the Hardware tab.


    [+] Enlarge Image
  8. Click Save at the top of the configuration view.
  9. Exit MAX.
    See Also:
    Using Measurement & Automation Explorer 3.0 to Configure Your IVI System

Running an IviDmm Class Example in LabVIEW or LabWindows/CVI

Complete the following steps to run an IviDmm Class example.

LabVIEW Users


To run an IviDmm Class example in LabVIEW, complete the following steps:

  1. Launch LabVIEW and click Open.
  2. Navigate to \Program Files\National Instruments\LabVIEW\examples\instr and double-click IviClass.llb.
  3. Double-click IviDmm-Single Point Measurement.vi.
  4. Select MyDmm in the IVI Logical Name control as shown in the following figure.


    [+] Enlarge Image
  5. Run the example.
  6. Change the configuration settings on the front panel and run the example again.

    Note If you receive an error message after you change the configuration, the configuration settings probably do not match those of HP 34401A DMM.
  7. Leave the example open and go to the Interchanging the HP 34401A DMM with the Fluke 45 DMM section.
To view the IVI class driver calls made in this example, press <Ctrl-E> to open the block diagram.
 
 

LabWindows/CVI Users

To run an IviDmm Class example in LabWindows/CVI, complete the following steps:


1. Launch LabWindows/CVI.

2. Select File»Open»Project.

3. Navigate to \Program Files\IVI\Drivers\ividmm\Examples\CVI and double-click ividmm.prj.

4. Select Run»Debug ividmm.exe.

5. In the Initialize DMM panel, type the logical name (MyDmm) in the Logical Name field, as shown in the following figure, and click Initialize.


6. In the Configure DMM panel, click Configure.

7. In the Read DMM panel, click Read.

8. To take multiple readings, click Read repeatedly.

9. To change the configuration settings of the DMM, return to the Configure DMM panel by clicking Configure.

Note If you receive an error message after you change the configuration, the configuration settings probably do not match those of HP 34401A DMM.

10. Click Close and Quit.


To view the IVI class driver calls made in this example, select File»Open»Source (*.c) to open the source code of the example.

 

Interchanging the HP 34401A DMM with the Fluke 45 DMM


To interchange the HP 34401A DMM with the Fluke 45 DMM, complete the following steps:

  1. Launch MAX.
  2. Expand IVI Drivers.
  3. Expand Logical Names and select MyDmm.
  4. Select fl45 from Driver Session as shown in the following figure.


    [+] Enlarge Image
  5. Click Go To to view properties of the fl45 driver session.
  6. If simulating, make sure that you select Specific Driver from Simulate With.
  7. Click Save.
  8. Exit MAX.

    You are now ready to run the example program using the same logical name but a different instrument.
  9. To verify instrument interchange, repeat the instructions in the Running an IviDmm Class Example in LabVIEW or LabWindows/CVI section.
Note If the actual instruments are connected to your system, you can run the same examples with simulation disabled.

You have successfully completed all sections and learned how to configure an IVI system in MAX, run a sample program in the simulation mode, and interchange instruments.


Related Links:
IVI Foundation Website

9 ratings | 3.67 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).