130 likes | 382 Views
A Brief Overview of LabVIEW Data Acquisition (DAQ). J. Carroll 10/14/03. Overview of LabVIEW DAQ. Two characteristics help classify the type of DAQ operation performed Whether you use a buffer Whether you use an external trigger to start, stop, or synchronize an operation . Buffers.
E N D
A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03
Overview of LabVIEW DAQ • Two characteristics help classify the type of DAQ operation performed • Whether you use a buffer • Whether you use an external trigger to start, stop, or synchronize an operation
Buffers • A buffer is an area of PC memory reserved for data, DMA allows data to be acquired directly into computer memory • Not using a buffer means you must handle each data point one at a time, as it is acquired • Use buffered I/O when: • Many samples are acquired at a rate faster than is practical to display, store, or analyze in real-time • Data is acquired/displayed continuously on the fly • The sampling period must be precise and uniform throughout the data samples
Buffers • Use nonbuffered I/O when: • The data set is small and short (e.g., acquiring one data point every 100ms) • Reduced memory overhead is required (since a buffer takes up memory) • There are separate LabVIEW VIs for both buffered and nonbuffered I/O
Triggering • Triggering is any method which initiates, terminates, or synchronizes a DAQ event • A trigger is usually an analog or digital signal whose condition is analyzed to determine a course of action • Software triggering is the easiest and most intuitive • Hardware triggering lets the circuitry of the DAQ board take control, adding more precision and control
Triggering • Use software triggering when: • The user needs to have explicit control over all DAQ operations • The timing of an event does not need to be precise • Use hardware triggering when: • Timing a DAQ event needs to be precise • You want to reduce software overhead, i.e., to reduce the need for a While Loop) • DAQ events need to be synchronized to external events
Analog I/O Definitions • A device is the “number” that NI-DAQ assigns to an I/O board • A sample is one A/D conversion (one data point) • Channels specify the physical source of the data • A scan is a sample taken from each channel • represents data versus channel number • A waveform is a set of samples from one channel, collected over a period of time • represents data versus time
The DAQ Palette • The DAQ palette has three VI “tiers” • Top tier VIs are easiest to use but least flexible • these VIs are synchronous with the DAQ data, meaning that they do not finish executing until all of the data is read/written from the board • one fundamental limitation with these VIs is that every time the VI is called the hardware is “setup” for the sampling operating (adding excessive overhead) • multiple sample points acquired using a While Loop, which adds additional overhead • see class web site for more examples
Top Tier Examples Nonbuffered, software triggered ADC Buffered, hardware triggered ADC
The Middle/Bottom VI Tiers • Middle tier VIs offer more functionality, flexibility and efficiency • allows buffered acquisition that is hardware controlled (see web for more examples) • allows continuous or real-time acquisition using “circular” buffers • returns data from an acquisition in progress without interrupting the acquisition • Bottom tier VIs offer the most functionality, flexibility and efficiency, at the cost of complexity (see web examples)
Middle Tier Example Buffered DAQ
Example Continuous, Circular Buffered DAQ