CLAD Data Acquisition & Instrument Control 5 — Questions and Answers
Question 1: What is 'aliasing' in the context of data acquisition, and how is it prevented?
- It is distortion caused by undersampling; prevented by sampling at least twice the highest signal frequency (Nyquist) (Correct answer)
- It is a calibration offset; prevented by zeroing the signal before sampling
- It is buffer overflow; prevented by increasing the FIFO size
- It is channel crosstalk; prevented by using shielded cables
Correct answer: It is distortion caused by undersampling; prevented by sampling at least twice the highest signal frequency (Nyquist)
Aliasing occurs when the sample rate is less than twice the signal bandwidth, causing high-frequency components to appear as false lower frequencies; an anti-aliasing filter and sufficient sample rate prevent it.
Question 2: In NI-DAQmx, what is the function of DAQmx Export Signal?
- It routes internal timing and trigger signals to physical output terminals for synchronization (Correct answer)
- It exports acquired waveform data to a spreadsheet file
- It generates a digital pulse on a counter output channel
- It calibrates the exported voltage reference
Correct answer: It routes internal timing and trigger signals to physical output terminals for synchronization
DAQmx Export Signal routes internal signals (sample clock, start trigger, etc.) to physical terminals (PFI lines, RTSI) to synchronize multiple DAQ devices or tasks.
Question 3: Which VISA attribute would you read to determine how many bytes are waiting in the instrument's output buffer before calling VISA Read?
- VI_ATTR_ASRL_AVAIL_NUM (or VISA Bytes at Serial Port / InstrumentBytesAvailable) (Correct answer)
- VI_ATTR_INTF_TYPE
- VI_ATTR_SEND_END_EN
- VI_ATTR_TMO_VALUE
Correct answer: VI_ATTR_ASRL_AVAIL_NUM (or VISA Bytes at Serial Port / InstrumentBytesAvailable)
The bytes-available attribute (often accessed via VISA Bytes at Serial Port or the InstrumentBytesAvailable property) tells you how many bytes the instrument has queued so you can size your Read call.
Question 4: What is the significance of 'simultaneous sampling' in a multifunction DAQ device?
- All channels are sampled at exactly the same instant, eliminating inter-channel phase skew (Correct answer)
- All channels share one ADC to reduce cost and noise
- Simultaneous sampling multiplexes channels faster than 1 MHz
- It allows analog output and input to share the same clock
Correct answer: All channels are sampled at exactly the same instant, eliminating inter-channel phase skew
Simultaneous sampling uses a dedicated ADC per channel so that all channels capture their value at the same moment, which is critical for phase-sensitive measurements.
Question 5: In LabVIEW, how do you programmatically change the sample rate of an existing NI-DAQmx task before starting it?
- Use DAQmx Timing (Sample Clock) or set the Rate property via DAQmx Channel/Timing property node (Correct answer)
- Call DAQmx Read with the new rate as an input
- Modify the task name in MAX and reload
- Use the VISA Write VI to send a new rate command
Correct answer: Use DAQmx Timing (Sample Clock) or set the Rate property via DAQmx Channel/Timing property node
You can call DAQmx Timing again before Start Task or write the Rate property through a DAQmx Task property node to change the sample rate programmatically.
Question 6: A LabVIEW program uses 'hardware-timed single-point' (HWTSP) mode. What is the primary advantage over software-timed single-point?
- Deterministic, jitter-free sample timing controlled by the DAQ hardware clock (Correct answer)
- Higher maximum sample rate than continuous acquisition
- Automatic averaging of multiple readings per call
- Elimination of the need for a DAQmx Start Task call
Correct answer: Deterministic, jitter-free sample timing controlled by the DAQ hardware clock
HWTSP uses the onboard hardware clock to trigger each sample with microsecond-level determinism, whereas software timing introduces millisecond-level jitter from the OS scheduler.
Question 7: Which NI-DAQmx error code typically indicates that the acquisition buffer was not read fast enough and data was overwritten?
- -200279 (DAQmx Error: Input buffer overwrite) (Correct answer)
- 200022 (Warning: Samples acquired but not read)
- -200088 (Task not running)
- -200077 (Invalid channel name)
Correct answer: -200279 (DAQmx Error: Input buffer overwrite)
Error -200279 is the NI-DAQmx 'Onboard device memory overflow' or buffer overwrite error, indicating the read loop is too slow to keep up with the incoming data rate.
What is 'aliasing' in the context of data acquisition, and how is it prevented?