a brief overview of labview data acquisition (daq) j. carroll 10/14/03

12
A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

Post on 20-Dec-2015

229 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

A Brief Overview of LabVIEW Data Acquisition (DAQ)

J. Carroll

10/14/03

Page 2: 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

Page 3: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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

Page 4: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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

Page 5: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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

Page 6: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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

Page 7: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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

Page 8: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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

Page 9: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

Top Tier ExamplesNonbuffered, software triggered ADC

Buffered, hardware triggered ADC

Page 10: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

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)

Page 11: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

Middle Tier ExampleBuffered DAQ

Page 12: A Brief Overview of LabVIEW Data Acquisition (DAQ) J. Carroll 10/14/03

ExampleContinuous, Circular Buffered DAQ