Archived: Programming Traditional NI-DAQ (Legacy) Using Visual C# .NET

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.


This article discusses options for programming NI-DAQmx or Traditional NI-DAQ (Legacy) in Visual C# .NET. It discusses the usefulness of Measurement Studio for Visual Studio.



Measurement Studio for Visual Studio provides a collection of managed .NET and MFC C++ libraries for advanced analysis, scientific user interface controls, and measurement data networking. Measurement Studio also provides code generation and integration tools with Visual Studio. Measurement Studio and NI-DAQmx ship with .NET examples. Please see this White Paper or this KnowledgeBase article for the location and other general information about the examples. It is possible to create a NI-DAQ Application without Measurement Studio.

 Note: MFC C++ libraries are only available for Visual Studio 2003, 2005 and 2008 with Measurement Studio 2009 or earlier. 

Also, National Instruments does not provide native .NET components for Traditional NI-DAQ (Legacy). Measurement Studio support for Visual Studio 2003 and later do not provide additional functionality for developing Traditional NI-DAQ (Legacy) applications. Instead, you can use the Traditional NI-DAQ ActiveX controls to perform data acquisition. The CWDAQ ActiveX control is provided with the Traditional NI-DAQ (Legacy) Driver and does not require Measurement Studio.

Note: NI-DAQmx replaced Traditional NI-DAQ (Legacy) in 2003.  NI strongly recommends using NI-DAQmx for new applications.


Using Traditional NI-DAQ (Legacy) ActiveX Controls

To use the Traditional NI-DAQ (Legacy) ActiveX controls, you must add the CWDAQ ActiveX Controls to the .NET project. Here are the steps to include the controls in the project:

  1. In the .NET project, select View » Toolbox from the pull-down menu.
  2. The Toolbox will appear. Right-click in the Toolbox and select Add/Remove Items.
  3. The Customize Toolbox will appear. Select the COM Components tab.
  4. On this tab, you can select the specific CWDAQ control you want to use and click OK.
  5. The control you selected will now show up in the toolbox, where you can drag and drop it onto the form.


For more ideas, you can search on the NI Community for example programs.


Was this information helpful?