Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Nov 26, 2008


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

NI-DAQmx Hardware Timed Single Point AI with LabWindows CVI

0 ratings | 0.00 out of 5
Print

Overview

This example program demonstrates how to use the Hardware Timed Single Point sampling mode in the LabWindows CVI environment.

Downloads

Filename: cont_acq-intclk_hw_timed.c
Requirements: View


ContAcq-IntClk (HW Timed).c demonstrates the hardware timed, non-buffered technique of data acquisition. The scan clock on the board controls acquisition timing. Acquired scans are read directly from the device's FIFO using DAQmxReadAnalogF64.

The acquisition is configured with no buffer, and the on-board sample clock started at the selected acquisition rate. The SampleCompleteEvent is utilized in this program.  When a sample is ready to be read, the SampleCompleteEvent fires the SignalCallback function.  Each time the callback is fired, a single sample is read from the FIFO.  If a sample is missed because the acquisition does not keep up, an error message will be displayed, and the acquisition stopped. 

A common reason to use non-buffered acquisition is that some kind of processing needs to be done for each data point. The acquisition rate you can achieve depends on many system-dependent variables.  Some of these include the operating system, processing power of the computer, other CPU-intensive tasks that are running at the same time, etc.  .

Before running this program, please read the comments at the top of the program.  These comments are documented below.

Instructions for Running:
1. Select the physical channel to correspond to where your signal is input on the DAQ device.
2. Enter the minimum and maximum voltage range.
Note: For better accuracy try to match the input range to the expected voltage level of the measured signal.
3. Set the rate of the acquisition. Also set the Samples per Channel control. This will determine how many samples are
read at a time.
Note: The rate should be at least twice as fast as the maximum frequency component of the signal being acquired.

Requirements


Filename: cont_acq-intclk_hw_timed.c

Software Requirements


Application Software: LabWindows/CVI Full Development System 8.5
Language(s): C

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Driver: NI-DAQmx 8.7

 
0 ratings | 0.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).