NI-DAQmx includes several example applications that demonstrate the functionality of your device and can serve as interactive tools, programming models, and building blocks for your own applications. Access examples depending on your programming environment and the driver APIs you use to control your device.

NI Example Finder

The NI Example Finder is a utility that organizes examples into categories and allows you to browse and search installed examples. For example, search for "DAQmx" to locate all NI multifunction DAQ examples. You can see descriptions and compatible hardware models for each example or see all the examples compatible with one particular hardware model.

To locate examples using the NI Example Finder within LabVIEW or LabWindows/CVI, select Help » Find Examples and navigate to Hardware Input and Output » DAQmx.

Installed Example Locations

The installation location for NI-DAQmx example programs differs by programming language and development environment. Refer to the following table for information about example program installation locations.

Table 3. Installed NI-DAQmx Example Locations
Software Application Installed Example Locations
LabVIEW Help » Find Examples
LabWindows/CVI C:\Users\Public\Documents\National Instruments\CVI\Samples\DAQmx
SignalExpress Program Files\National Instruments\SignalExpress\Examples
ANSI C Users\Public\Public Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.
.NET 4.0 Users\Public\Public Documents\National Instruments\NI-DAQ\Examples\DotNET 4.0
.NET 4.5 Users\Public\Public Documents\National Instruments\NI-DAQ\Examples\DotNET 4.5

Common Example Programs

The following NI-DAQmx example programs demonstrate common functions and operations.

The PXIe-6357 uses the NI-DAQmx driver. NI-DAQmx includes a collection of programming examples to help you get started developing an application. You can modify example code and save it in an application. You can use examples to develop a new application or add example code to an existing application.

  • Analog Input Example Programs—Demonstrates how to acquire analog measurements. Options include continuous or finite acquisitions, software or hardware timing, and simultaneous sampling. You can perform analog input applications through DMA or programmed I/O data transfer mechanisms. Some of the applications also use start and reference pause triggers.
  • Analog Output Example Programs—Demonstrates how to generate voltage and waveform data. Options include on-demand, continuous or finite output, waveforms, and hardware timing. You can perform these generations through programmed I/O or DMA data transfer mechanisms. Some of the applications also use start triggers and pause triggers.
  • Counter Input Example Programs—Demonstrates how to acquire counter input data. Options include finite or continuous acquisitions, and reading edge counts, position, pulse-width, or frequency data.
  • Counter Output Example Programs—Demonstrates how to generate one or more digital pulses using a counter output. Options include finite or continuous output.
  • Digital Input Example Programs—Demonstrates how to acquire digital input data. Options include continuous or finite output, software timing, change detection, and pipelined sample clock mode.
  • Digital Output Example Programs—Demonstrates how to generate digital output data. Options include finite or continuous output, software timing, sample clock, and waveform generation.
  • Synchronization Example Programs—Demonstrates how to continuously acquire data. Options include acquiring buffered voltage and thermocouple measurements in a single task, and acquiring waveform data from two modules.