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.
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:
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:
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.
All Versions of NI-DAQmx:
All Versions of NI-DAQmx:
The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNet1.1
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\...
The examples are located at: <Program Files>\National Instruments \MeasurementStudioVS2003\DotNET\Examples\...
The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNet2.0
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\...
The examples are located at:
<Program Files>\National Instruments \MeasurementStudioVS2005\DotNET\Examples\...
The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNet[version]
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]\...
The examples are located at C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.
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\...
The examples are located at:
<Program Files>\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\...
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\...
The examples are located at:
<Program Files>\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\...
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:
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.