NI-DAQmx Example Locations for LabVIEW and Text-Based in Windows

Overview

This article shows how to locate an example or sample code to program with the NI-DAQmx driver in ANSI C, C++, .NET, VB 6, LabVIEW, or LabVIEW NXG. It also explains what to do if the examples are missing from the specified folders.

 

To access the examples, ensure that the planned programming environment and NI-DAQmx is installed correctly.

Contents

Introduction

The default location of the example files depends on your version of NI-DAQmx and operating system. Below are the default folder locations based on the type of examples you are looking for, and your NI-DAQmx/operating system combination. If your examples are not displayed in these folders, the first section shows how to get them to show up.  

Note: 

  • For 64-bit operating systems, 32-bit applications will be in Program Files (x86) by default, rather than Program Files.
  • The default locations for <Documents and Settings> and <Program Files> are C:\Documents and Settings and C:\Program Files.

 

Install Examples

The NI-DAQmx installer has some examples set to install by default. If you find the examples are missing from the folder indicated in the following sections, you can modify the installer to include them:

    1. Navigate to Start »Control Panel »Programs and Features.
    2. Locate NI Software in the list and double click to open it. This will display all the NI software you have installed.
    3. Locate the version NI-DAQmx ADE Support you have installed in the list and click it.
    4. Click Modify in the upper right hand corner of the window. This will start the NI-DAQmx installer and take you to the Features window.
    5. Expand the sections until you locate the example folder you are missing.
    6. Set the example folder to Install this feature to a local drive by clicking on the down arrow on the left side of the item in the list.
    7. Click Next. Then click Finish. If an error occurs you will not be able to click Finish. This may occur if you are attempting to install a feature for a software package that you do not have.
    8. The installer will now place the missing example files into the default folders listed below.

Note that the NI-DAQmx installer for LabVIEW NXG uses NI Package Manager and does not have the option to select/ deselect installing the example folder. If the NI-DAQmx examples are missing in LabVIEW NXG, you must re-install the complete NI-DAQmx driver.

 

LabVIEW

All Versions of NI-DAQmx:

  1. Open LabVIEW.
  2. Click the Help menu.
  3. Select Find Examples.
  4. Click the Browse tab.
  5. Navigate to Hardware Input and Output » DAQmx.

 

LabWindows CVI

All Versions of NI-DAQmx:

  1. Open LabWindows CVI.
  2. Click the Help menu.
  3. Select Find Examples.
  4. Click the Browse tab.
  5. Navigate to Hardware Input and Output » DAQmx.

 

.NET 1.1 Examples (C# and VB.NET)

NI-DAQmx 8.8 and Later:

The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNet1.1

NI-DAQmx 8.5 to 8.7.2:

Windows Vista examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET1.1\...

Windows XP and 2000 examples are located at:
<Documents and Settings>\All Users \Documents\National Instruments\NI-DAQ\Examples\DotNET1.1\...

If Measurement Studio 8.1 is installed prior to installing NI-DAQmx, then the examples are located at
<Program Files>\National Instruments \MeasurementStudioVS2003\DotNET\Examples\...

NI-DAQmx 8.3.1 and Earlier:

The examples are located at: <Program Files>\National Instruments \MeasurementStudioVS2003\DotNET\Examples\...

.NET 2.0 Examples (C# and VB.NET)

NI-DAQmx 8.8 and Later:

The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNet2.0

NI-DAQmx 8.5 to 8.7.2:

Windows Vista examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\...

Windows XP and 2000 examples are located at:
<Documents and Settings>\All Users \Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\...

If Measurement Studio 8.1 is installed prior to installing NI-DAQmx, then the examples are located at:
<Program Files>\National Instruments \MeasurementStudioVS2005\DotNET\Examples\...

NI-DAQmx 8.3.1 and Earlier:

The examples are located at:
<Program Files>\National Instruments \MeasurementStudioVS2005\DotNET\Examples\...

 

.NET 3.5 and Later Examples (C# and VB.NET)

NI-DAQmx 8.8 and Later:

The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNet[version]

NI-DAQmx 8.5 to 8.7.2:

Windows Vista examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET[version] \...

Windows XP and 2000 examples are located at:
<Documents and Settings>\All Users \Documents\National Instruments\NI-DAQ\Examples\DotNET[version]\...

 

ANSI C

NI-DAQmx 8.8 and Later:

The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.

NI-DAQmx 8.5 to 8.7.2:

Windows Vista examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\...

Windows XP and 2000 examples are located at:
<Documents and Settings>\All Users \Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\...

NI-DAQmx 8.3.1 and Earlier:

The examples are located at:
<Program Files>\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\...

 

Visual Basic 6.0

NI-DAQmx 8.5 and Later:

Windows 8 examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0

Windows 7 examples are located at:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0...

Windows Vista examples are located at: C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\...

Windows XP and 2000 examples are located at:
<Documents and Settings>\All Users \Documents\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\...

NI-DAQmx 8.3.1 and Earlier:

The examples are located at:
<Program Files>\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\...

 

LabVIEW NXG

Note: LabVIEW NXG is not recommended for new applications. The final release of LabVIEW NXG was LabVIEW NXG 5.1 in 2021.

All Versions of NI-DAQmx:

  1. Open LabVIEW NXG.
  2. Navigate to the Learning tab.
  3. Select Examples.
  4. Navigate to Hardware Input and Output » DAQmx.

Online Examples

Additional examples for multiple programming environments are available online through the NI Community. LabVIEW shipping examples and legacy LabVIEW DAQmx shipping examples also provide a quick way to recover any examples you might have edited and saved.

Was this information helpful?

Yes

No