NI-DAQmx is the new NI data acquisition driver framework that addresses several weaknesses present in Traditional NI-DAQ (Legacy).
Table 1. NI-DAQmx includes a high-performance driver and additional software to increase productivity.
Some of the advantages of NI-DAQmx include:
- NI-DAQmx provides significant performance improvements over Traditional NI-DAQ (Legacy), especially for single-point software-timed analog input.
- The API for NI-DAQmx relates to the type of measurement you make. With the API abstraction, you can specify hardware behavior based on the hardware subsystem.
- Using the NI-DAQmx driver, you can easily set up concurrent I/O operations and create multithreaded data acquisition systems.
Improved State Model
- NI-DAQmx defines and enforces a state model, eliminating unnecessary reconfigurations of input limits, timing, triggering, and accessories. This improvement significantly increases overall performance.
Consistent API across all Programming Languages
- The NI-DAQmx programming paradigm is consistent across multiple languages. You do not have to reacquaint yourself with NI-DAQmx driver concepts if you decide to move between programming NI-DAQmx in LabVIEW, ANSI C, C++, C #, and Visual Basic .NET.
Robustness in Exceptional Conditions
- Traditional NI-DAQ (Legacy) can have difficulty handling exceptional conditions, such as abnormal process termination. NI-DAQmx defines and enforces policies for such conditions.
Note: For additional information see Answers to Frequently Asked Questions about NI-DAQmx and Traditional NI-DAQ (Legacy).
The NI-DAQmx data acquisition framework introduces several new concepts, the two most important being tasks and task state models.
Learn how tasks are set up as you explore the NI-DAQmx ANSI C API in the following sections.
Task State Model
NI-DAQmx uses a task state model to improve ease of use and speed up driver performance. The task state model consists of five states – Unverified, Verified, Reserved, Committed, and Running.
You can choose to interact with as little or as much of the task state model as your application requires.
For more information about the NI-DAQmx task model, select NI-DAQmx Help»Key NI-DAQmx Concepts»Tasks»Task State Model in the NI-DAQmx Core Help.
The NI-DAQmx Core Help provides information about some of the other concepts of NI-DAQmx as well. For more information, select NI-DAQmx Help»Key NI-DAQmx Concepts.
The NI-DAQmx Core Help has flowcharts for each type of task. You can find these flowcharts under NI-DAQmx Help»Common Applications»Generic Programming Flows .
Typical NI-DAQ Application
When framing a data acquisition application, regardless of the type of driver or device used for acquiring data, you organize the application into five main steps. The approaches to these five steps vary based on how the data acquisition driver is organized and the functionality it provides. These steps include the following:
1. Identify your measurement
2. Configure your measurement
3. Run the data acquisition operation
5. Clean up
These steps are the basic building blocks for creating a typical data acquisition application. You should be familiar with how a data acquisition application uses the NI-DAQ driver to address each of these steps and create an effective data acquisition application. Other documents in this series compare the NI-DAQmx ANSI C API with the Traditional NI-DAQ (Legacy) ANSI C API by breaking down their functionality into these five steps. Refer to the “Additional Resources” section to access these documents.