From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Archived: Download NI-DAQmx Shipping Examples for LabVIEW 2012 or Compatible

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Driver

  • NI-DAQ™mx

Code and Documents

Attachment

Description

Overview


This document has been archived and is no longer updated by National Instruments.

This is a consolidated export of NI-DAQmx shipping examples that have been included since LabVIEW 2012. These are the same examples that are installed on your machine when a compatible version of NI-DAQmx is installed with LabVIEW. These coding examples demonstrate basic analog, digital, and counter acquisition and generation, plus other concepts like synchronization. Use this page to locate your local copies of the examples, replace your existing files, or search through extended example descriptions to locate an example to meet your needs.

Many other coding examples demonstrating extended and unique functionality submitted by NI and community members for NI-DAQmx and other products are available at http://www.ni.com/examples.

Introduction

NI-DAQmx 9.5.5 launched with LabVIEW 2012 and introduced a more consolidated set of shipping examples with new user interfaces based on LabVIEW silver controls. These shipping examples continue to be included with new versions of NI-DAQmx and support for new LabVIEW versions. In addition to being included with the NI-DAQmx driver, they were also previously posted to the online NI Community in an effort to be more searchable and assist users in replacing modified examples with new.  The attachment on the right side of this page includes a folder for each of the NI Community HTML pages that described each example as well as how to run them. Each folder also contains the example VI's, and any other resources referenced. Once your download is complete, you can extract the files and then browse or search locally for examples. 

Finding the NI-DAQmx Shipping Examples Already Installed on your System

If you've installed NI-DAQmx 9.5.5 or later and have LabVIEW 2012 or compatible, then you should already have these examples installed, and can locate them without the need to download from this article unless you'd like to further search through them, or replace existing modified examples. 

To check the version of NI-DAQmx and LabVIEW installed on your system, reference KnowledgeBase 4W1GE4NC. Also, you must install NI-DAQmx with ADE Support to get the LabVIEW API and the examples. Installing NI-DAQmx variants such Core, Run-Time or Configuration Support will not install the LabVIEW API, or the examples per KnowledgeBase 619L79ZK. Also note these NI-DAQmx examples are different than those that ship with NI-DAQmx Base, which is a subset of NI-DAQmx for advanced users.

  • The preferred method of accessing NI-DAQmx LabVIEW shipping examples is from the LabVIEW welcome splash screen, or from any front panel or block diagram by selecting Help » Find Examples » Hardware Input and Output » DAQmx and then browsing the sub-categories. Note that descriptions and compatible hardware for each example is also provided when browsing this way.
  • You can also locate your LabVIEW shipping examples on disk by navigating to the default install location at:
    <Program Files>\National Instruments\<LabVIEW>\examples\DAQmx .

Opening the Attached Files

The attachment on the right side of this page includes a folder for each of the NI Community HTML pages that described each example as well as how to run them. Each folder also contains the example VI's, and any other resources referenced. Once your download is complete, you can extract the files and then browse or search locally for examples. 

The HTML file originally posted with the example code is provided as a reference with most NI community formatting removed. The HTML file contains a description of the functionality, how to use the code and a VI snippet to quickly review the code. Links contained within the HTML files may not be valid. Instead, use the files contained in this export. Some files may need to be unzipped before using. Note the embedded images and style sheets are stored locally in the 'resources' folder.

Some examples may be able to be downconverted to previous versions of LabVIEW, but this conversion is not NI supported or guaranteed to work.

Searching The Attached Examples for Your Application Needs

In addition to browsing your examples, you can also use Windows search. To find examples relevant to your needs use keywords the same way you would when searching on the web. Windows search can search through the folder and file names, as well as the content inside the HTML file.

Downloading LabVIEW or NI-DAQmx, and Understanding Compatibility

LabVIEW 2012 or newer is required to run these examples, as well as a compatible version of NI-DAQmx.

Note: Beginning with NI-DAQmx 14.0, the driver version began following the convention set out for other NI drivers that aligns with yearly software releases.

File Extraction/Copy Errors

If you receive a Windows error similar to 'Destination Path Too Long' or 'The file name(s) would be too long for the destination folder' when trying to extract or move this archive, you will need to move your directories folder levels up to create a shorter overall file path. Folder and file names are based off example titles, with some being long.

Disclaimer

The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense .

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.