With faster computers and advanced tools readily available to you, more often than not you are expected to complete development projects quickly. The DAQ Assistant and NI-DAQmx Library were developed to help you overcome these time constraints. Using the DAQ Assistant and NI-DAQmx Library, you can shorten development time and deliver an optimized, professional application.
Reduce Development Time with the DAQ Assistant
The DAQ Assistant is an interactive tool you can use to graphically configure a customized DAQ operation, known as a task, to incorporate into a LabWindows/CVI project. As shown in Figure 2 and Figure 3, you can define a complicated task, such as an analog start/stop triggered data acquisition using an externally provided scan clock, with a few mouse clicks in the DAQ Assistant.
Figure 2. DAQ Assistant Displaying Timing Tab
Figure 3. DAQ Assistant Displaying Triggering Tab
Once you create the task, you can import the task into an application by selecting the name of task within a LabWindows/CVI function panel, as shown in Figure 4.
Figure 4. DAQmxLoadTask Function Panel
Prior to NI-DAQmx, DAQ driver software was merely a group of functions you could call in the LabWindows/CVI environment to implement DAQ applications. If you wanted to set a specific sampling rate, configure a digital start trigger, and change the gain setting for a given operation, you had to call separate functions for each task. If requirements changed, such as from a single-buffered acquisition to a double-buffered acquisition, you had to modify the program thoroughly to implement those changes. You might have to replace more than half of the source code to implement such changes. With the DAQ Assistant and NI-DAQmx, you can update any change by reloading the DAQ Assistant and changing the configuration settings. Because the DAQ Assistant generates the necessary code, you do not need to modify the source code at all, which makes development faster and more productive.
LabWindows/CVI also can automatically generate source code based on the customized loaded task, which also saves you development time. Using convenient built-in DAQ tools, you can develop an advanced DAQ application without manually developing mundane tasks.
Reduce Development Time with the NI-DAQmx Library
Figure 5. NI-DAQmx General Programming Flow for Continuous Analog Input Operation
Figure 5 shows the general programming flow you use to acquire an analog input signal using the NI-DAQmx Library. Using the four functions shown, you can acquire analog input signals with or without a triggering condition enabled using either an internal or an external clock. The complexity level of data acquisition does not affect the number of functions you use when you take advantage of the NI-DAQmx Library. As a result, the number of functions you need to complete a complicated task, such as a single-buffered acquisition with digital triggering enabled, has been drastically reduced from 16 lines of code when using Traditional NI-DAQ, as shown in Figure 6, to six lines of code when using NI-DAQmx, as shown in Figure 7. You also will notice that the names of NI-DAQmx functions are much more intuitive than their Traditional NI-DAQ counterparts.
Figure 6. Single-Buffered Acquisition with External Digital Triggering Using Traditional NI-DAQ
Figure 7. Single-Buffered Acquisition with External Digital Triggering Using NI-DAQmx