Professional Documents
Culture Documents
System Overview
Transducer Overview
Topics
What is a Transducer?
Types of Transducers
What is a Transducer?
Physical
Phenomena
Signal
Signal Overview
Topics
Types of Signals
Information in a Signal
State, Rate, Level,
Shape, and Frequency
Signal Classification
Your Signal
Digital
Analog
Digital Signals
Your Signal
Digital
Two possible levels:
High/On (2 - 5 Volts)
Low/Off (0 - 0.8 Volts)
Analog Signals
Your Signal
Analog
Continuous signal
Can be at any value with
respect to time
Analysis
Required
Topics
Purpose of Signal Conditioning
Types of Signal Conditioning
Amplification
Used on low-level signals (i.e. thermocouples)
Maximizes use of Analog-to-Digital Converter (ADC) range and
increases accuracy
Increases Signal to Noise Ratio (SNR)
Noise
Instrumentation
Amplifier
+
_
Low-Level Signal
ADC
Lead Wires
External
Amplifier
DAQ Device
Topics
Types of DAQ Hardware
Components of a DAQ device
Configuration Considerations
Your Signal
DAQ Device
Cable
Terminal Block
Computer
Cable
Terminal Block
DAQ Device
Most DAQ devices have:
Analog Input
Analog Output
Digital I/O
Counters
DAQ Device
Computer
Configuration Considerations
Analog Input
Resolution
Range
Gain
Code Width
Mode (Differential, RSE, or NRSE)
Analog Output
Internal vs. External Reference Voltage
Bipolar vs. Unipolar
Resolution
Number of bits the ADC uses to represent a signal
Resolution determines how many different voltage
changes can be measured
Example: 12-bit resolution
# of levels = 2resolution = 212 = 4,096 levels
Resolution Example
3-bit resolution can represent 8 voltage levels
16-bit resolution can represent 65,536 voltage levels
16-Bit Versus 3-Bit Resolution
(5kHz Sine Wave)
10.00
8.75
111
7.50
110
6.25
101
Amplitude
5.00
(volts)
3.75
100
2.50
010
1.25
001
16-bit resolution
3-bit resolution
011
000
|
50
100
Time (s)
150
200
Range
Minimum and maximum voltages the ADC can digitize
DAQ devices often have different available ranges
0 to +10 volts
-10 to +10 volts
Range
10.00
Proper Range
Using all 8
levels to
represent your
signal
111
8.75
7.50
6.25
110
101
Amplitude
5.00
(volts)
3.75
2.50
3-bit resolution
100
011
010
001
1.25
0|
0
000
|
50
100
Time (s)
150
200
Amplitude
0
(volts)
-2.50
-5.00
-7.50
-10.00 |
Improper Range
111
110
3-bit resolution
101
100
011
010
001
000
|
50
100
Time (s)
150
200
Gain
Gain setting amplifies the signal for best fit in ADC
range
Gain settings are 0.5, 1, 2, 5, 10, 20, 50, or 100 for
most devices
You dont choose the gain directly
Choose the input limits of your signal in LabVIEW
Maximum gain possible is selected
Maximum gain possible depends on the limits of your
signal and the chosen range of your ADC
Gain Example
Input limits of the signal = 0 to 5 Volts
Range Setting for the ADC = 0 to 10 Volts
Gain Setting applied by Instrumentation Amplifier = 2
Gain = 2
7.50
6.25
Your Signal
Amplitude
5.00
(volts)
3.75
Gain = 1
2.50
1.25
0
50
100
Time (s)
150
200
Code Width
Code Width is the smallest change in the signal your
system can detect (determined by resolution, range, and
gain)
range
code width =
gain * 2 resolution
10
= 2.4 mV
12
1*2
20
1*2
12
10
100 * 2
12
= 4.8 mV
= 24 V
Grounding Issues
To get correct measurements you must properly
ground your system
How the signal is grounded will affect how we ground
the instrumentation amplifier on the DAQ device
Steps to proper grounding of your system:
Determine how your signal is grounded
Choose a grounding mode for your Measurement System
Signal
Source
VS
VM
-
Measurement
System
Floating
Vs
_
Vs
_
Signal is referenced to
a system ground
earth ground
building ground
Examples:
Power supplies
Signal Generators
Anything that plugs into
an outlet ground
Examples:
Batteries
Thermocouples
Transformers
Isolation Amplifiers
Floating
+
Vs
_
Measurement System
Three modes of
grounding for your
Measurement System
Differential
Referenced SingleEnded (RSE)
Non-Referenced SingleEnded (NRSE)
Measurement
System
-
Differential Mode
Differential Mode
Two channels used for each signal
ACH 0 is paired with ACH 8, ACH 1 is paired with ACH 9, etc.
ACH (n)
_ ACH (n + 8)
AISENSE
+
Instrumentation
Amplifier
AIGND
Measurement System
+
VM
_
RSE Mode
Referenced Single-Ended (RSE)
Measurement made with respect to system ground
One channel used for each signal
Doesnt reject common mode voltage
+
ACH (n)
ACH (n + 8)
VS
AISENSE
_
+
Instrumentation
Amplifier
AIGND
Measurement System
+
VM
_
NRSE Mode
Non-Referenced Single-Ended (NRSE)
Variation on RSE
One channel used for each signal
Measurement made with respect to AISENSE not system ground
AISENSE is floating
Doesnt reject common mode voltage
ACH (n)
ACH (n + 8)
VS
_
AISENSE
+
Instrumentation
Amplifier
AIGND
Measurement System
+
VM
_
Floating
+
Vs
_
+
Vs
_
Measurement System
Measurement System
Differential
RSE
NRSE
Differential
RSE
NRSE
Differential
BETTER
+ Rejects Common-Mode Voltage
- Cuts Channel Count in Half
NOT RECOMMENDED
RSE
NRSE
Differential
RSE
NRSE
BEST
+ Rejects Common-Mode Voltage
- Cuts Channel Count in Half
- Need bias resistors
BETTER
+ Allows use of entire channel count
+ Dont need bias resistors
- Doesnt reject Common-Mode Voltage
GOOD
+ Allows use of entire channel count
- Need bias resistors
- Doesnt reject Common-Mode Voltage
Topics
Levels of DAQ Software
NI-DAQ Overview
Measurement & Automation Explorer
(MAX) Overview
Levels of Software
User
DAQ
Device
What is NI-DAQ?
Driver level software
DLL that makes direct calls to your DAQ device
Microsoft C/C++
Visual Basic
Borland C++
Borland Delphi
What is MAX?
MAX stands for Measurement & Automation Explorer
MAX provides access to all your National Instruments
DAQ, GPIB, IMAQ, IVI, Motion, VISA, and VXI devices
Used for configuring and testing devices
Functionality broken into:
Data Neighborhood
Devices and Interfaces
Scales
Software
Icon on your
Desktop
Data Neighborhood
Provides access to the DAQ
Channel Wizard
Shows configured Virtual
Channels
Includes utilities for testing and
reconfiguring Virtual Channels
Properties
Basic Resource Test
Base I/O Address
Interrupts (IRQ)
Direct Memory Access
(DMA)
Device Number
Range and Mode (AI)
Polarity (AO)
Accessories
OPC
Test Panels
Utility for testing
Analog Input
Analog Output
Digital I/O
Counters
Scales
Provides access
to DAQ Custom
Scales Wizard
Shows configured
scales
Includes utility for
viewing and
reconfiguring your
custom scales
Sampling Considerations
Analog signal is continuous
Sampled signal is series of discrete
samples acquired at a specified
sampling rate
Faster we sample the more our
sampled signal will look like our
actual signal
Actual Signal
Sampled Signal
Aliasing
Adequately
Sampled
Signal
Aliased
Signal
Nyquist Theorem
Nyquist Theorem
You must sample at greater than 2 times the
maximum frequency component of your signal to
accurately represent the FREQUENCY of your
signal
NOTE: You must sample between 5 - 10 times greater
than the maximum frequency component of your
signal to accurately represent the SHAPE of your
signal
Nyquist Example
Aliased Signal
100Hz Sine Wave
Sampled at 100Hz
Adequately Sampled
for Frequency Only
(Same # of cycles)
Sampled at 200Hz
Sampled at 1kHz
Adequately Sampled
for Frequency and
Shape
Counter
Calibration and
Configuration
DAQ Channel
Name
Constant
Signal
Conditioning
Control
Terminal
Constant
Easy VIs
Convenient
groupings of
Intermediate VIs
Built out of
Utility VIs
+ Easy to use
- Less flexible
Advanced VIs
Building blocks
for other levels
Intermediate VIs
Built out of
Advanced VIs
+ Highly
recommended
+ Very flexible
Easy VIs
Intermediate VIs
Advanced VIs
Utility VIs
Single-Point AI VIs
Perform a software-timed, non-buffered acquisition
+ Good for battery testing, control systems
- Not good for rapidly changing signals due to software timing
AI Sample Channel
Acquires one point on one channel
AI Sample Channels
Acquires one point on multiple channels
AI Start
Starts your acquisition, configure triggers
AI Read
Returns data from the buffer
AI Clear
Clears resources assigned to the acquisition
AI Config
Interchannel Delay
Determines the time (in seconds)
between samples in a scan
Input Limits
Max and Min values for your signal
Used by NI-DAQ to set gain
Device
Number of the device (from MAX)
you are addressing
Channels
Chooses what channel(s) you are
addressing
Buffer Size
Number of scans the buffer
can hold
A scan acquires one sample
for every channel you specify
1000 scans x 2 channels =
2000 total samples
Task ID
Passes configuration
information to other VIs
Error In/Out
Receives/Passes any errors
from/to other VIs
Gain = 2
Gain = 20
Range = 0 to +10V
AI Start
Task ID In/Out
Receives/Passes configuration information to/from other VIs
Scan Rate
Chooses the number of scans per second
Error In/Out
Receives/Passes any errors from/to other VIs
Scan Backlog
Number of unread scans in the buffer
Waveform Data
Returns t0, dt (inverse of scan rate), and Y array for your data
Error Cluster
Cluster containing:
Boolean - tells if an error occurred
Numeric - tells the error code
String - tells the source of the error
Terminal
Clear
Resources
Start the
Acquisition
Display
Errors
Return Data
from the Buffer
Buffered Acquisition
Start the
Acquisition
Display
Errors
Return Data
from the Buffer
Done?
YES
Clear
Resources
NO
# of scans to acquire = 0
While loop around AI Read
Number of Scans to read does not = buffer size
Scan backlog tells how well you are keeping up
DAC
Channel 0
Channel 1
Channel 1
DAC
Easy VIs
Convenient
groupings of
Intermediate VIs
Built out of
Utility VIs
+ Easy to use
- Less flexible
Advanced VIs
Building blocks
for other levels
Intermediate VIs
Built out of
Advanced VIs
+ Highly
recommended
+ Very flexible
Easy VIs
Intermediate VIs
Advanced VIs
Utility VIs
Single-Point AO VIs
Perform a software-timed, non-buffered generation
+ Good for generating DC voltages, or control systems
- Not good for waveform generation because software timing is slow
AO Update Channel
Generates one point on one channel
AO Update Channels
Generates one point on multiple channels
AO Update Channels
Device
Number of the device (from
MAX) you are addressing
Ignored if using virtual channel
Channels
Chooses what channel(s) you
are addressing
Can either be a number or a
virtual channel name
Uses the DAQ Channel Name
control
Values
1-D array of data
The first element of the
array corresponds to
the first channel in your
channels input
AO Write
Writes data to the buffer
AO Start
Starts your generation
AO Wait
Waits until the generation is complete
AO Clear
Clears resources assigned to the
generation
Wait Until
Generation
Completes
Write Data
to the Buffer
Clear
Resources
Start the
Generation
Display
Errors
Buffered Generation
AO Write fills the buffer with waveform data
AO Start begins the generation
Without AO Wait the generation would start (AO Start) and
then end immediately after (AO Clear)
If error input is true then Config, Write, Start, and Wait pass
the error on but dont execute; Clear passes AND executes
Write Data
to the Buffer
Display
Errors
Start the
Generation
Done?
YES
Clear
Resources
NO
Continuous Generation
Differences from a buffered generation
number of buffer iterations = 0
No AO Wait
AO Wait would hang because the generation never completes