|NI-DAQmx 18.6 Help|
|NI-DAQmx 19.0 Help|
|NI-DAQmx 19.1 Help|
Acquiring a single sample is an on-demand operation. In other words, NI-DAQmx acquires one value from an input channel and immediately returns the value. This operation does not require any buffering or hardware timing. For example, if you periodically needed to monitor the fluid level in a tank, you acquire single data points. You can connect the transducer that produces a voltage representing the fluid level to a single channel on your measurement device and initiate a single-channel, single-point acquisition when you want to know the fluid level.
With NI-DAQmx, you also can gather data from multiple channels. For instance, you might want to monitor the fluid level in the tank as well as the temperature. In this case, you need two transducers connected to two channels on your device. The following flowchart depicts the steps to programmatically create a single sample analog input application. If you prefer, you can configure a task for acquiring a single sample using the DAQ Assistant.
|Tip To increase performance, especially when multiple samples are read, include the Start function/VI and Stop function/VI in your application. In the previous flowchart, the Start function/VI would come just before you read samples, and Stop would come just before you clear the task.|