Graphical Data Acquisition

Graphical Data Acquisition brings measurements from physical hardware into a LabVIEW program through a configured graphical interface. The DAQ Assistant lets you specify what to measure, which terminals to use, and when samples are taken. For a voltage acquisition, a sensor supplies an electrical signal, the DAQ hardware digitizes it, and the Assistant returns data your program can display or store.

Configure the measurement

A measurement task groups channels with their measurement settings and acquisition timing. A physical channel such as Dev1/ai0 identifies a device and an analog input; its name does not specify the sensor's calibration.


With compatible DAQ hardware and NI-DAQmx installed, place the DAQ Assistant Express VI on the block diagram. For a sensor that already supplies a conditioned voltage:

  1. Select Acquire Signals, Analog Input, then Voltage.
  2. Select the physical input channel or channels connected to the sensor.
  3. Set each channel's minimum and maximum input values.
  4. Match Terminal Configuration to the actual wiring and the device's connection instructions.
  5. Configure acquisition mode, rate, and samples to read, then test the task.

Choose a supported input range that contains the expected signal and appropriate headroom. A range that is too narrow can cause overrange readings or clipping; choosing a wider range does not amplify the signal. Input-range settings also do not replace the hardware's electrical limits. A voltage task returns volts unless you explicitly configure scaling into another unit.


A conditioned sensor feeds DAQ hardware, a computer buffer, and a LabVIEW data read.


Choose the acquisition mode

The acquisition mode determines whether you request individual readings, one fixed record, or ongoing sampling. Available modes depend on the device; labels can vary slightly between versions.


Mode

Timing and stopping behaviour

Typical purpose

1 Sample (On Demand)

Software requests each reading; spacing depends on execution timing.

Occasional voltage checks.

N Samples

A hardware clock acquires a specified number per channel, then acquisition stops.

One fixed measurement record.

Continuous Samples

A hardware clock keeps acquiring until the task is stopped; software reads successive blocks.

Monitoring over an unspecified duration.



Continuous mode does not make one Assistant call run forever. Your program must repeatedly read the ongoing task and stop it when finished. The required surrounding program structure is separate from these acquisition settings.

Relate rate, count, and time

The sample rate fsf_s is the number of samples acquired per second per channel, measured in samples per second per channel, or S/s/channel. The Assistant commonly labels this setting Rate (Hz). Let NN be samples per channel returned in a block and CC the number of channels. For uniform sampling:


Δt=1fs,Tblock=Nfs,Ntotal=CN\Delta t=\frac{1}{f_s},\qquad T_{\text{block}}=\frac{N}{f_s},\qquad N_{\text{total}}=CN


Here Δt\Delta t is sample spacing, TblockT_{\text{block}} is the nominal amount of acquisition time represented by a block, and NtotalN_{\text{total}} counts individual measured values across all channels. These relations assume the stated rate is the actual rate.


For example, at 5000 S/s/channel5000\ \text{S/s/channel}, each channel has Δt=0.000200 s\Delta t=0.000200\ \text{s}. Reading 10001000 samples per channel returns blocks representing 0.200 s0.200\ \text{s} of acquisition. Increasing NN while holding fsf_s fixed makes each block longer; it does not increase sampling speed.



In continuous mode, N/fsN/f_s is also the time needed to generate a fresh block. An individual read may return sooner if samples are already buffered, or later because of transfer and software overhead.

Check the returned data

Wire the Assistant's data output to a compatible indicator or downstream operation. Confirm channel count, units, plausible amplitudes, and timing before trusting a recording. Read continuous data fast enough on average to keep up with acquisition; otherwise unread samples accumulate and can eventually overflow the buffer. Increasing buffer capacity provides more tolerance for delays, but does not fix a sustained read-rate shortfall.


What to remember

  • Match measurement type, physical channels, range, and wiring.
  • Choose finite acquisition for one record and continuous acquisition for ongoing sampling.
  • Rate and sample count are per channel; multiply by channel count only for total values.
  • Distinguish sample spacing, nominal block duration, and endpoint span.

Example: Capturing a two-sensor voltage record

You are using Graphical Data Acquisition to record two conditioned pressure-sensor voltage outputs on a test bench. They are connected to Dev1/ai0 and Dev1/ai1 using the manufacturer's differential wiring instructions. Each output stays between 0.6 V0.6\ \text{V} and 4.4 V4.4\ \text{V}. The device supports differential acquisition on these channels and input ranges of 00 to 5 V5\ \text{V} and −10-10 to 10 V10\ \text{V}.


Capture one record with a nominal duration of 0.800 s0.800\ \text{s} at an actual hardware sample rate of 2000 S/s/channel2000\ \text{S/s/channel}. Both channels and this rate are supported together. Use nominal duration T=N/fsT=N/f_s and ignore startup overhead.


a) Specify the measurement type, physical channels, terminal configuration, input range, and acquisition mode. Report the raw measurements in volts.


Both sensors already provide conditioned voltages, so select Acquire Signals, Analog Input, then Voltage. Select Dev1/ai0 and Dev1/ai1, and set Terminal Configuration to Differential to match the stated wiring.


Check the supported narrower range against both signal limits:


0 V<0.6 V≤Vsignal≤4.4 V<5 V0\ \text{V}<0.6\ \text{V}\leq V_{\text{signal}}\leq4.4\ \text{V}<5\ \text{V}


The 00 to 5 V5\ \text{V} range contains the complete expected signal, with 0.6 V0.6\ \text{V} of headroom at each end. Select this range for both channels. Leave custom scaling unapplied so the returned values remain in volts.


Choose N Samples because the task must capture one finite record, and set Rate (Hz) to 20002000.


b) Calculate Samples to Read and the total number of individual voltage values returned.


The timing settings count ________. Rearrange the nominal-duration relation before substituting the requested duration and actual sample rate:


T=NfsN=fsT=(2000 samples/s/channel)(0.800 s)=1600 samples/channel\begin{aligned} T&=\frac{N}{f_s}\\ N&=f_sT\\ &=(2000\ \text{samples/s/channel})(0.800\ \text{s})\\ &=1600\ \text{samples/channel} \end{aligned}


Set Samples to Read to 16001600. There are ________ channels, so the total count is:


Ntotal=CN=(2)(1600)=3200 voltage valuesN_{\text{total}}=CN=(2)(1600)=3200\ \text{voltage values}


Do not enter 32003200 as Samples to Read: that would request 32003200 samples on each channel and double the nominal duration.


c) Find the interval between successive samples on one channel and the last sample's time relative to the first.


The reciprocal of the actual sample rate gives the interval between successive samples on the same channel:


Δt=12000 s−1=0.000500 s=0.500 ms\Delta t=\frac{1}{2000\ \text{s}^{-1}}=0.000500\ \text{s}=0.500\ \text{ms}


Take the first sample on that channel as time zero. A record containing 16001600 samples has 15991599 gaps between its endpoints, so:


tlast−tfirst=(N−1)Δt=(1599)(0.000500 s)=0.7995 st_{\text{last}}-t_{\text{first}} =(N-1)\Delta t =(1599)(0.000500\ \text{s}) =0.7995\ \text{s}


The endpoint span is 0.7995 s0.7995\ \text{s}. Adding one sample interval gives the nominal record duration: 0.7995+0.0005=0.8000 s0.7995+0.0005=0.8000\ \text{s}. The two time measures therefore agree with their respective definitions.

A conditioned sensor output varies from 0.4 V0.4\ \text{V} to 3.6 V3.6\ \text{V} and is connected to Dev2/ai1. The wiring and terminal configuration have already been checked. The DAQ device supports input ranges of 00 to 1 V1\ \text{V}, 00 to 5 V5\ \text{V}, and −10-10 to 10 V10\ \text{V}. Which DAQ Assistant configuration acquires this sensor's complete voltage signal using the narrowest suitable supported range?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A DAQ Assistant voltage task uses three analog input channels in N Samples mode. Its actual rate is 1200 S/s/channel1200\ \text{S/s/channel}, and Samples to Read is 900900. The device supports this configuration. Which pair gives the total number of individual voltage values returned across all channels and the nominal record duration N/fsN/f_s? Ignore startup overhead.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A single-channel DAQ Assistant voltage task acquires exactly 800800 uniformly spaced samples at an actual hardware rate of 2500 S/s2500\ \text{S/s}. Set the first sample's timestamp to 0 s0\ \text{s}. What is the last sample's timestamp? Give your answer in seconds, to four decimal places.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice