Professional Documents
Culture Documents
Topics
– DAQ Overview
– Transducers
– Signals
– Signal Conditioning
DAQ System Overview
Transducer Overview
•
– What is a Transducer?
– Types of Transducers
What is a Transducer?
Physical
Phenomenon Signal
6
Signal Overview
•
– 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)
• Two types of information:
– State
– Rate
Digital Signal Information
Your Signal
Digital
State Example
Position of
the switch
determines the
state of the signal
Rate Example
– Motor shaft spins
– Encoder converts rotation into
two digital pulse trains
– Measure rate of pulse train to
determine motor shaft speed
Analog Signals
• Your Signal
Analog
• Continuous signal
Can be at any value with
respect to time
• Three types of information:
- Level
- Shape
- Frequency (Analysis required)
Analog Signal Information
• Your Signal
Analog
(Analysis Required)
Level Examples
• Common examples
• of level
measurements
Shape Examples
• Common examples
• of shape measurements
Frequency Examples
• Common
examples
• of frequency
• measurements
(Analysis Required)
Five Ways to Measure the Same Signal
Analog Digital
(Analysis Required)
Signal Conditioning Overview
•
– Purpose of signal conditioning
– Types of signal conditioning
Why Use Signal Conditioning?
Noise
Instrumentation
Amplifier
+
_ ADC
Lead Wires
Amplify External
and DAQ Device .01 V x10 .001 V x10 1.01 V 100
Amplify only
Externally .01 V x100 .001 V None 1.001 V 1000
Other Types of Signal Conditioning
• Transducer Excitation
– External voltage or current applied to
transducer
– Provided by signal conditioning hardware
• Linearization
– Most transducers are not linear
– Can be done in hardware or software
• Isolation
– Protects hardware from high voltages and currents
– Used in systems with high common-mode voltages
23
Other Types of Signal
Conditioning
• Filtering
26
DAQ Hardware and Software
Topics
• DAQ Hardware Overview
• DAQ Software Overview
DAQ Hardware Overview
•
– Types of DAQ hardware
– Components of a DAQ device
– Configuration considerations
Terminal Block and Cable
50-pin connector
Your Signal
Cable
Terminal Block
– Terminal block and cable route your signal
to specific pins on your DAQ device.
– Terminal block and cable can be a combination
of 68-pin or 50-pin.
DAQ Device
Channel n
Instrumentation
Multiplexer Amplifier
Components of a DAQ Device
(cont.) • ADC
– Converts analog signal to
digital number
– Used for analog input
– Applications:
• Circuit testing
• Power supply testing
• Dynamometer testing
• Weather station monitor
• Geophysical studies
• Filter analysis
Analysis Required
Components of a DAQ Device
(cont.) • DAC
– Converts digital number
to analog signal
– Used for analog output
– Applications
• Control systems
• Function generator
• Tone generator
• Servomotor control
• Valve control
No Analysis Required
Components of a DAQ Device
(cont.) • Digital I/O Circuitry
– Can input or output
digital signals
– Not suitable for
measuring rate
• No handshaking or
timing circuitry
– Applications
• Switch sensing
• Relay control
• Controlling LEDs
Components of a DAQ Device
(cont.) • Counter Circuitry
– Can input or output
digital signals
– Suitable for measuring
rate
• Built in timing signals
– Applications
• Stepper motor control
• Measuring frequency
of a rotating shaft
• Oscillator testing
Configuration Considerations
– Analog Input
• Resolution
• Range
• Gain
• Code width
• Mode: differential, referenced single-ended (RSE),
or non-referenced single-ended (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
number resolution
of levels = 2resolution = 212 = 4,096 levels
•
– Larger resolution = more precise representation of
your signal
Resolution Example
– 3-bit resolution can represent 23 = 8 voltage levels
– 16-bit resolution can represent 216 = 65,536 voltage levels
16-Bit versus 3-Bit resolution
(5kHz Sine Wave)
10.00
111
8.75
110 16-bit resolution
7.50
101
6.25
Amplitude 100 3-bit resolution
(volts) 5.00
011
3.75
010
2.50
001
1.25
000
0 | | | | |
0 50 100 150 200
Time (s)
39
Range
– Minimum and maximum voltages the ADC can digitize
– DAQ devices often have different available ranges
• 0 to +10 volts
• -10 to +10 volts
– Pick a range that your signal fits in
– Smaller range = more precise representation of your signal
• Allows you to use all of your available resolution
Range = 0 to +10 volts
(5 kHz Sine Wave)
Range
10.00
8.75
111
110
• Proper Range 7.50
101
6.25
3-bit resolution
• Using all eight Amplitude
5.00
100
(volts) 011
levels to 3.75
010
2.50
represent your 001
1.25
signal 0|
000
| | | |
0 50 100 150 200
Time (s)
20
Increase range: = 4.8 mV
1*2 12
10
Increase gain: = 24 V
100 * 2 12
Grounding Issues
– To get correct measurements, you must properly ground
your system
– How the signal is grounded affects how you ground the
instrumentation amplifier on the DAQ device
– Steps to properly grounding your system:
• Determine how your signal is grounded
• Choose a grounding mode for your measurement
+
Signal Measurement
Source Vs Vm System
-
Signal Source Categories
Signal Source
Grounded Floating
+ +
Vs Vs
_ _
Grounded Signal Source
Signal Source
– Signal is referenced to a
system ground:
Grounded • Earth ground
• Building ground Grounded
Outlet
+ – Examples:
Vs
_ • Power supplies
• Signal generators
• Anything that plugs into
a grounded outlet
Floating Signal Source
Signal Source
• Referenced Single-Ended
(RSE)
• Non-Referenced Single-
Ended (NRSE) DAQ device
– The mode you choose cable
depends on how your
signal is grounded.
terminal block
Differential Mode
• Differential Mode
– Two channels used for each signal
• ACH 0 is paired with ACH 8, ACH 1 is paired with ACH 9; and so on.
– Rejects common-mode voltage and common-mode noise
ACH (n)
+
VS
+
_ ACH (n + 8)
Instrumentation +
Amplifier
AISENSE
_
VM
AIGND
_
Measurement System
Differential Mode (cont.)
RSE Mode
• Referenced Single-Ended (RSE)
– Measurement made with respect to system ground
– One channel used for each signal
– Doesn’t reject common-mode voltage
ACH (n)
+
ACH (n + 8) +
Instrumentation +
VS Amplifier
AISENSE
_
VM
_ AIGND
_
Measurement System
NRSE Mode
• Non-Referenced Single-Ended (NRSE)
– Variation on RSE
– One channel used for each signal
– Measurement made with respect to AISENSE not ground
– AISENSE is floating
– Doesn’t reject common-mode voltage
ACH (n)
+
ACH (n + 8) +
Vs
Instrumentation +
Amplifier
AISENSE
_ _
Vm
AIGND
_
Measurement System
Choosing Your Measurement
System
Signal Source
Grounded Floating
+ +
Vs Vs
_ _
• GOOD
+ allows use of entire channel count
– doesn’t reject common-mode voltage
NRSE
Bias Resistors
Signal Source Measurement System
+
+ Bias current injected
R1
- into system by the
- instrumentation amp
R2
AIGND
BETTER
+ allows use of entire channel count
+ doesn’t need bias resistors
RSE - doesn’t reject common-mode voltage
GOOD
+ allows use of entire channel count
- needs bias resistors
NRSE - doesn’t reject common-mode voltage
Analog Output Considerations
– Reference Voltage (Vref)
• Can be either internal or external signal
• Used to set the range of the DAC
• Internal reference voltage is +10 V
– Bipolar
• Sets DAC range at -Vref to +Vref
– Unipolar
• Sets DAC range at 0 V to +Vref
– Choose the correct setting based on the limits of the
signal you want to generate
DAQ Software Overview
•
– Levels of DAQ software
– NI-DAQ overview
– Measurement & Automation
Explorer (MAX) overview
Levels of Software
User
DAQ
Device
– Driver-level software
What is NI-DAQ?
• DLL that makes direct calls to your DAQ device
– NI-DAQ does not support 3rd party DAQ devices. The device vendor
can provide you with a driver.
– Supports the following National Instruments software:
• LabVIEW
• Measurement Studio
– Also supports the following 3rd party languages:
• Microsoft C/C++
• Visual Basic
• Borland C++
• Borland Delphi
What is MAX?
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 Icon on your
Desktop
• Software
Software Architecture for Windows
DAQ VIs in LabVIEW Windows Device Manager
nidaq32.dll
MAX
Windows Registry
DAQ device
Summary
– Typical DAQ Hardware: terminal block, cable, and DAQ device
– Typical DAQ device has connectors, ADC, DAC, digital I/O lines,
and counters
– Code Width - smallest voltage change a DAQ device can detect
based on resolution, range, and gain
– DAQ device grounding modes: Differential, RSE, and NRSE
– Choice of Differential, RSE, or NRSE mode is based on whether
signal source is grounded or floating
– LabVIEW talks to your device through NI-DAQ
– MAX has virtual channels, test panels, custom scales, and software
updates to help configure and test your system
Analog Input
Topics
– Analog Input Considerations
– DAQ Functionality in
LabVIEW
– Single-Point Acquisition
– Buffered Acquisition
– Continuous Acquisition
– Triggered Acquisition
Sampling Considerations
– Actual analog input signal is
continuous with respect to time.
– Sampled signal is series of
discrete samples acquired at a
specified sampling rate.
– The faster you sample, the more Actual Signal
your sampled signal looks like the
actual signal.
– If not sampled fast enough, a
problem known as aliasing occurs.
Sampled Signal
– Misrepresentation of the signal frequency
Aliasing
• Caused by undersampling
– Sine wave shown below goes through three cycles in time shown
• Adequately sampled signal also goes through three cycles
• Aliased signal only goes through one cycle
Adequately
Sampled
Signal
Aliased
Signal
Nyquist Theorem
• Nyquist Theorem
You must sample at greater than two times the
maximum frequency component of your signal to
accurately represent the frequency of your
signal.
Adequately sampled
for frequency only
(same # of cycles)
Adequately sampled
for frequency and
shape
100 Hz Sine Wave Sampled at 1 kHz
Nyquist Frequency
Alias frequency =
|(closest integer multiple of sampling frequency - signal frequency)|
Aliasing Example
Signals
before
acquisition
Signals after
acquisition
71
Preventing
Ideal Filter
Aliasing
– Oversampling
+ Increases your Nyquist
1.0
Frequency
Vout - ADC may not go that fast
Vin
– Low Pass Filtering
0.0
Nyquist Frequency + Eliminates most frequencies
Real Filter above cutoff
Passband Transition Region - Transition region still allows
1.0 Frequencies some frequencies to alias
attenuated
Vout but still
passed
– Best Solution
Vin • Both oversampling and low
0.0 pass filtering
Cutoff Frequency
DAQ Device Architectures
• One amplifier and Channel 0
A/D Converter for
MUX AMP ADC
ALL channels
– Cost effective Channel n
– Used on most
E series devices Interval and Round-Robin Sampling Architecture
Channel 0 Channel 0
Channel 1 Channel 1
Channel 2 Channel 2
Channel 3 Channel 3
DMA/IRQ
– FIFO stands for First In First Out
• FIFO is used to hold data until it can be transferred to the
PC buffer.
– PC buffer and LabVIEW buffer are memory locations
to store your data.
PC Buffer
(AI Config)
Buffer Transfer
Incoming data from the End of Data
Device to the PC (AI End of Data
Start.vi)
1 2
PC Buffer PC Buffer
End of Acquisition
PC Buffer
3
Data transferred from
PC buffer to LabVIEW
buffer (AI Read.vi)
LabVIEW Buffer
Bucket Analogy
NO
Start the Done?
acquisition
YES
1 2
PC Buffer PC Buffer
Data transferred from
LabVIEW Buffer PC buffer to LabVIEW
buffer (AI Read.vi)
Current Read Mark End of Data End of Data Current Read Mark
>>>> >>>>
3 4
PC Buffer PC Buffer
LabVIEW
Bucket
Overwrite Error
• Overwrite Error (-10846)
• Indicates that you are not reading data from the
PC buffer fast enough
• Consequence:
– Newer data will overwrite your unread data
• How to prevent an overwrite error:
– Increase the buffer size
– Decrease the scan rate
– Increase the number of scans to read
– Return binary data (AI Read is a Polymorphic VI)
– Remove any extra processing that is inside the loop with AI Read
Overflow Error
• Overflow Error (-10845)
• Indicates that NI-DAQ was unable to retrieve
data from the FIFO buffer on the DAQ device
fast enough
• Consequence:
– The data in the FIFO will be overwritten
• How to avoid an overflow error:
• Use DMA instead of IRQ
• Decrease the scan rate
• Purchase a device with a larger FIFO
• Purchase a faster computer with a faster bus
Triggering
– Starting your acquisition with an external signal
– Trigger signal can be either digital or analog
• Digital
Rising Edge Falling Edge Trigger off either
the rising edge or
falling edge
• Time Limit
– Determines how long AI Read will
wait for data to be available
Timeout is only a warning not an
error so error Boolean stays false
Triggered Buffered Acquisition
Configure Return data from
the device the buffer
Start the
acquisition Clear resources
NO
YES
Trigger? Display errors
Digital Triggered Acquisition
– PFI0/TRIG1 is the default trigger pin for a digital start trigger
– Digital Trigger on DAQ Signal Accessory connects to PFI0
Analog Triggered Acquisition
– You can trigger off any analog input channel or PFI0
Note: The analog channel you trigger off must be the first in your channel list
Summary
– Undersampling causes aliasing
• Use Nyquist Theorem to determine how fast to sample
– DAQ Channel Name and Waveform Data Type make DAQ
programming easy and flexible
– Single-Point Acquisition is software-timed, non-buffered,
and good for slow changing signals
– Choice of Round-Robin, Interval, or Simultaneous Sampling
affects phase relationship of signals
– Buffered Acquisition is hardware-timed with a regular buffer
– Continuous Acquisition is hardware-timed with a circular buffer
– Buffered or Continuous Acquisition can be triggered with either
digital or analog signal
• If device doesn’t support analog trigger use conditional retrieval
– Stream data to disk for later analysis and presentation
Signal Conditioning
•SCXI
Why use SCXI?
Signal Conditioning eXtension for
Instrumentation
• Chassis
• Modules
• Terminal blocks
• Cable assemblies
• DAQ Device
Components of an SCXI System
• SCXI chassis:
– Slots where modules plug in (1,2,…)
– Slot 0 (control circuitry and power supply)
– Backplane bus (connects slots together)
Components of an SCXI System
– Chassis Types
• SCXI-1000 4-slots
• SCXI-1000DC 4-slots, DC powered
• SCXI-1001 12-slots and multi-chassis configuration
• SCXI-2000 4-slots, RS-232/485 serial communication
(Obs.)
• PXI-1010 4-slots, PXI and SCXI combined
• PXI-1011 4-Slot PXI, 8-Slot SCXI
Components of an SCXI System
• SCXI modules:
– Analog Input
• 1100, 1102 (B & C) , 1120 (D), 1121, 1122,
1140, 1141, 1520, 1530, 1531, 1540
– Analog Output
• 1124
Components of an SCXI System
– Frequency
• 1126, CTC8*, FRQ8*
– Digital
• 1160, 1161 (relays)
– Digital Input
• 1162, 1162HV, 1163R
– Digital Output
• 1163
*third party modules
Components of an SCXI System
– Accessory
• 1180 (Feed-through Panel)
• 1181 (Breadboard)
– Analog, Digital and Timing
• 1200 (parallel port communication) (Obs)
– Serial Communication
• 2400 (RS-232/485 serial communication interface)
(Obs)
Components of an SCXI System
• Terminal Blocks
– Provide screw terminals for signal connections
– Mount onto SCXI modules
– Terminal blocks only work with certain modules
– May include signal conditioning or CJC sensor
– BNC and TC terminal blocks available
Components of an SCXI System
• DAQ Device
– Plug-in DAQ board or DAQCard
– PXI Module
– SCXI-1200 (Obs)
Parallel vs. Multiplexed
Operation
SCXI modules can be configured in two modes:
Note: SCXI modules allow parallel configuration, if there are boards with enough
channels to support the board-module one-to-one channel configuration.
Multichassis Configuration
• 1 chassis multiplexed through channel 0
• Chassis 1,2 & 3 multiplexed through ch0, ch1 and ch2
• Multichassis configuration needs SCXI-1346 adapter
• SCXI-1100
• SCXI-1121
• SCXI-1120/1141 cascaded
• SCXI-1140
• SCXI-1160
• SCXI-1162HV
• Remote SCXI-1000/1200/2400
SCXI-1100
• 32-channel differential-input multiplexer with onboard
programmable-gain instrumentation amplifier.
• Voltage or Current inputs.
• Input Range ±10V.
• Jumper selectable lowpass filters of 4 Hz and 10 kHz.
• Software-selectable gains of 1, 2, 5, 10, 20, 50, 100, 200,
500, 1000, 2000.
• Only works in multiplexed mode and drives channels 0
and 1 on the MIO board.
• Configuration: differential mode
SCXI-1121
• 4-channel isolation amplifier with excitation.
• 1,500 Vrms isolation per channel.
• Current or voltage excitation.
• Input range of ±5V, 240 Vrms common-mode voltage.
• Jumper-selectable lowpass three-pole RC filters (4 Hz
and 10 kHz).
• Individually configurable jumper-selectable channel
gains of 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 and
2000.
• Configuration: differential mode
SCXI-1120
• 8-channel isolation amplifier.
• 1,500 Vrms isolation per channel.
• Input range of ±5V, 240 Vrms common-mode
voltage.
• Jumper-selectable lowpass filters (4 Hz and 10
kHz).
• Individually configurable jumper-selectable
channel gains of 1, 2, 5, 10, 20, 50, 100, 200, 500,
1000 and 2000.
• Configuration: differential mode.
SCXI-1520
• Universal Strain Gauge Module
• 8 Ch Strain Gauge input and Excitation for
Quarter, Half, Full bridges
• Simultaneous Sampling
• Only works with SCXI-1314 Terminal Block
• Requires NI-DAQ 6.9 or later
SCXI-1530, 1531
• 4 (1530) or 8 (1531) Channel Accelerometer input
and Excitation
• Provide constant current excitation (4mA)
• Simultaneous sampling
• Accepts ICP type (Piezoelectric) Accelerometer
(normally specified as mV/g, V/G, mV/m/s2, V/m/s2)
• BNC connectors in front
SCXI-1540
• 8 Channel LVDT input and Excitation
• 1 or 3 Vrms excitation
• Simultaneous sampling
• Only works with SCXI-1315 terminal block