Vous êtes sur la page 1sur 33

Hands-On:

Introduction to LabVIEW and


Data Acquisition
with NI CompactDAQ

uk.ni.com
ireland.ni.com
Agenda
What is Data Acquisition?
Components of a Data Acquisition System
Introduction to LabVIEW and DAQ Hardware
Bridging the Hardware/Software gap with DAQmx
Practicing concepts with hands-on measurement exercises

uk.ni.com
ireland.ni.com 2
What is Data Acquisition?

uk.ni.com
ireland.ni.com
Why Measure?
Engineers need to determine system behavior to optimize
performance
Signals from sensors indicate how the system is
operating
Engineers can use that information to modify
performance

uk.ni.com
ireland.ni.com 4
What Is Data Acquisition (DAQ)?

uk.ni.com
ireland.ni.com 5
What Is Data Acquisition (DAQ)?

uk.ni.com
ireland.ni.com 6
Components of a DAQ System

uk.ni.com
ireland.ni.com
Components of a DAQ System

uk.ni.com
ireland.ni.com 8
Components of a DAQ System

uk.ni.com
ireland.ni.com 9
Sensor Overview
Converts physical phenomena into a measurable electrical signal

Transducer
or
Sensor

Physical Signal
Phenomena

uk.ni.com
ireland.ni.com 10
Sensor Examples
Phenomena Transducers/Sensors Electrical Characteristics
Temperature Thermocouples, resistive Low voltage output, nonlinear
temperature devices (RTDs), Low resistance, nonlinear
thermistors

Light Vacuum tube, photo sensors Current loop output if current


type (typical 4 to 20 mA)

Sound Microphone Charge output, powered


converter
Force and pressure Strain gages, piezoelectric Low resistance, low
transducers sensitivity, nonlinear
Position and Potentiometers, linear voltage LVDTs: Inductive, requires
displacement differential transformer (LVDT), demodulation
optical encoder

Vibration Accelerometer Charge output, powered


converter
uk.ni.com
ireland.ni.com 11
Components of DAQ System

uk.ni.com
ireland.ni.com 12
Signal Conditioning
Improves a signal that is difficult for your DAQ device to
measure
Not always required

Signal
Conditioning

Noisy, Low-Level Signal Filtered, Amplified Signal

uk.ni.com
ireland.ni.com 13
Signal Conditioning Examples

Transducers/Signals Signal Conditioning


Thermocouple Amplification, linearization, cold-
junction compensation
RTD (resistance Current excitation, linearization
temperature detector)
Strain gage Voltage excitation, bridge
configuration, linearization
Common mode or high Isolation amplifier
voltage
Loads requiring AC Electromechanical relays or solid-
switching state relays
or large current flow
High frequency noise Lowpass filters

uk.ni.com
ireland.ni.com 14
Signal Classification

Analog Digital

Shape
State Rate

Level Frequency

uk.ni.com
ireland.ni.com 15
The Three Rs of Data Acquisition

Resolution Range Rate

Original Waveform

6-Bit Resolution

3-Bit Resolution

uk.ni.com
ireland.ni.com 16
The Three Rs of Data Acquisition

Resolution Range Rate

Original Waveform
Range
of
102 V to -10
-2 VV
3-Bit Resolution

uk.ni.com
ireland.ni.com 17
The Three Rs of Data Acquisition

Resolution Range Rate

Sampling Rate = 11 Hz
Original Waveform (10 Hz)
Sampling Rate = 25 Hz
uk.ni.com
ireland.ni.com
Sampling Rate
18
= 100 Hz
Components of DAQ System

uk.ni.com
ireland.ni.com 19
LabVIEW and DAQ Hardware

uk.ni.com
ireland.ni.com
Architecture of an Integrated Measurement System
LabVIEW is system design software that provides
engineers and scientists with the tools needed to
create and deploy measurement and control systems
through unprecedented hardware integration.

Sensor Measurement Device Software

Signal Analog-to-Digital Driver Software Application


Conditioning Converter Software

uk.ni.com
ireland.ni.com 21
LabVIEW Building Blocks Are Called Virtual Instruments (*.VI)

Icon / Connector Pane


Maps inputs and outputs

LabVIEW Front Panel


The user interface of a VI

LabVIEW Block Diagram


The source code of a VI

uk.ni.com Note: A *.vi file encapsulates all


ireland.ni.com 22
three elements
Front Panel
Decorations
Decorative elements and imagery
• Text
• Arrows
• Callouts
• Lines
• Images
• …and more

Customizable Indicators
Used to convey outputs to a user
• Graphs and Charts
• Progress Bars
• Gauges and Meters
• LEDs
• Numerics
• Strings and Paths
• …and more

Customizable Controls
Used to receive input from a user
• Knobs and Dials
• Sliders
• Buttons
• Numerics
• Strings and Paths
• …and more

uk.ni.com
ireland.ni.com 23
Exploring a LabVIEW Block Diagram

User Event Handling

Parallelism and
Multithreading

Signal Analysis

uk.ni.com
ireland.ni.com 24
With LabVIEW, You Can Program the Way You Think

uk.ni.com
ireland.ni.com 25
With LabVIEW, You Can Program the Way You Think

The graphical, dataflow-based G programming


language
is ideal for programming parallel data acquisition
uk.ni.com
hardware.
ireland.ni.com 26
Data Flow
Each block diagram node executes only when it receives all inputs
Each node produces output data after execution
Data flows along a path defined by wires
The movement of data determines execution order

Formula: Result = (A+B*C) / (D-E)


uk.ni.com
ireland.ni.com 27
NI Data Acquisition Hardware Families
PXI
System NI CompactDAQ
Optimised for high channel counts and Customize with a variety of chassis
tight synchronization and module types

Desktop DAQ Portable DAQ


Install in a desktop PC slot for maximum Easily connect to any laptop or
data throughput desktop with simple setup
Single
uk.ni.com Device
28
ireland.ni.com
Bridging the Hardware/Software Gap

uk.ni.com
ireland.ni.com
Bridging the Hardware and Software Gap with NI-DAQmx

NI-DAQmx is a single, free hardware driver that supports


various development languages and hundreds of NI data
acquisition hardware platforms.

The mark LabWindows is used under a license from Microsoft Corporation.


Windows is a registered trademark of Microsoft Corporation in the United States and other countries.

uk.ni.com
ireland.ni.com 30
Measurement & Automation Explorer (MAX)
Free, unified configuration management utility for NI hardware

Task and
Channel Creation
Configuration and
Connection
Management
Simulated Devices

Built-In Signal
Connection
Diagrams

Test Panel Windows

uk.ni.com
ireland.ni.com 31
NI-DAQmx API: Configuration-Based DAQ Assistant
Enables quick, configuration-
based measurements

Usable across multiple channels,


multiple devices

Maximum ease of use with some


sacrificed flexibility

Supported across multiple


programming languages

Automatically generates lower-


level code

uk.ni.com
ireland.ni.com 32
Hands-On Exercises
Select one of the following exercises:

•Temperature Measurement and Logging


• Difficulty Rating: 2 out of 5
•Combining Measurements from Light and Temperature
• Difficulty Rating: 3 out of 5
•Strain Gauge Measurement with User LED Feedback
• Difficulty Rating: 4 out of 5
•Audio Equaliser
• Difficulty Rating: 5 out of 5
•Measuring Vibration from an Accelerometer
• Difficulty Rating: 5 out of 5

uk.ni.com
ireland.ni.com 33

Vous aimerez peut-être aussi