LabVIEW-Data Qcquisition Overview - Kostic

Download Report

Transcript LabVIEW-Data Qcquisition Overview - Kostic

LabVIEW - DAQ
Data Acquisition
Dr. M. Kostic
NIU - Mechanical Engineering
LabVIEW/DAQ by Dr. M. Kostic
What is LabVIEW - G
Watch NI Demo
Virtual Instrument Engineering Workbench
 Full-featured Graphical Programming Software
 Designed for Instrumentation and Data
Acquisition

LabVIEW/DAQ by Dr. M. Kostic
What is Virtual Instrument-VI
A software designed program to simulate an
instrument (Virtual Instrument)
 Versatile as our creativity
 It is stored in a file any_name.vi extension
 It could be used as a subroutine or main
program

LabVIEW/DAQ by Dr. M. Kostic
Virtual Instruments (VIs)
• Front Panel
– Controls = Inputs
– Indicators = Outputs
Input
• Block Diagram
– Accompanying
"program" for front
panel
– Components "wired"
together
LabVIEW/DAQ by Dr. M. Kostic
Output
(sub) VI as an Icon
LabVIEW/DAQ by Dr. M. Kostic
Let’s switch to LabVIEW
software and play....
Show some Examples...
LabVIEW/DAQ by Dr. M. Kostic
Lab VIEW Summary

Virtual Instruments (VIs)
 Front Panel 

Block Diagram  Connector/Icon
Two windows to create a VI
Panel window (I/O) Diagram window (Program)

Pull-down menus
Controls menu to place controls/indicators (I/O) in Panel
window
Functions menu to place program nodes in Diagram
window
All LabVIEW objects have pop-up menus
 Nonexecutable VIs indicated by...

LabVIEW/DAQ by Dr. M. Kostic
DAQ
or
Data Acquisition
LabVIEW/DAQ by Dr. M. Kostic
DAQ Scope
About plug-in data acquisition (DAQ) boards.
 About the organization of the DAQ VIs.
 How to acquire and display an analog signal.
 How to perform a timed data acquisition.
 How to acquire data from multiple analog
channels.
 How to drive the digital I/O lines, and the
basics of buffered data acquisition.

LabVIEW/DAQ by Dr. M. Kostic
Data Acquisition - DAQ
DAQ boards:

Analog
I/O BOARD:
SIGNAL
CONDITIONING:
Modify
transducer
signals
COMPUTER
with SOFTWARE:
Control
the DAQ board,
PLUG-IN
DAQ
Measures
(acquires),
TRANSDUCERS:
Sense
the
measured
quantities
Digital
I/Ostore,
to
match
DAQ
board
specs/ranges.
Examples:byamplification
process,
and
display
data,as
asinstructed
instructed
software
processes,
stores,
and
generates
signals,
and change
their
properties
or
generate
corresponding
Counter/timer I/O
or Examples:
attenuation,
filtering,
excitation,
etc. to acquire
program.
Examples:
LabVIEW
application
programs
by
software
program.
Analog
and
digital
electrical
signals.
Examples:
strain
gage,
thermocouple,
 DAQ library supports all DAQ boards
data, and
simulate
instruments,
and
generate
signals’accelerometer,
input
output,
counters, timers,
etc. results, etc.
potentiometer,
etc.
 LabVIEW uses the NI-DAQ driver-level software

Data Acquisition System Components
LabVIEW/DAQ by Dr. M. Kostic
Transducers
Sense Phenomena
Produce Electrical Signal
Examples:





Thermocouples, Thermistors
Strain Gauges, RTDs
Pressure Transducers, Load Cells
Accellerometers, Microphones
Potentiometers, Etc..
LabVIEW/DAQ by Dr. M. Kostic
Signal Conditioning
Condition Transducer Signals
Make Signal Suitable for DAQ Board
Examples:





Amplification/Attenuation
Linearization/Calibration
Filtering
Multiplexing (up to 3,072 channels)
Isolation, Excitations, Etc.
LabVIEW/DAQ by Dr. M. Kostic
Typical DAQ Board
Main Features:




Analog I/O (Input/Output)
Digital I/O
Timer/Counter I/O, Triggering
Accuracy, Flexibility, Reliability, Expandability
Typical Specifications:






Computer Platform:
Input Channels:
Max. Sampling Rate:
Resolution:
Gains:
Range:
(E)ISA, PCMCIA, PCI, NuBus
8-16 SEnd, 4-8 DIff
50-500 (1,250) kHz
8-16 bits
1,2,5,10,20,50,100 Times

5, (0-5) 0-10 Volt
2.5)
LabVIEW/DAQ by Dr. M. Kostic
DAQ Hardware & Software
Configurations
Hardware:



Setting DIP Switches and Jumpers for Particular
Options/Applications
Newer and Plug-and-Play Boards are Software
Configured
Cabling, Signal Conditioning, Terminal Blocks, etc.
Software:



Set-up and Configuration Programs
Drivers: Interface between DAQ Board and Computer
DAQ Application Software (LabVIEW, C, Basic, etc.)



Data Acquisition
Data Analysis (Statistics, FFT, DSP, etc.)
Data Presentation (Graphing, Plotting, Tabulation, etc.)
LabVIEW/DAQ by Dr. M. Kostic
Analog Input Considerations
• Single-Ended vs. Differential
10 V range
• Resolution
10
• Range
1 * 212
20
.
= 2.4. mV
1X Gain
1 * 212
= 4.8 mV
12 bit
resolution
• Sampling Rate / Aliasing
Aliasing
8
Time
Adequately sampled
Aliased due to undersampling
• Averaging / Noise reduction
3-bit ADC
LabVIEW/DAQ by Dr. M. Kostic
16-bit ADC
DAQ Software Architecture – Windows
WDAQCONF.EXE
LabVIEW for Windows
DAQ Library VIs
DAQDRV
NI-DAQ for Windows
DLL
WDAQCONF.EXE
Now, new operating systems
and application software versions
make CONFIGURATION ESEAR!
LabVIEW/DAQ by Dr. M. Kostic
DAQ Board
Analog Input and Output VIs
AI Sample Channel
AO Update Channel
LabVIEW/DAQ by Dr. M. Kostic
Waveform Input and Output VIs
AI Acquire Waveform
AO Generate Waveform
LabVIEW/DAQ by Dr. M. Kostic
Digital Input and Output
Write to Digital Line
Read from Digital Line
Write to Digital Port
Read from Digital Port
LabVIEW/DAQ by Dr. M. Kostic
DAQ Summary
 Identify
I/O Signal Types:
Transducers/Controllers
 Choose a Signal Conditioning Method
 Select a Data Acquisition (DAQ) Device
 Choose Terminals/Cables for the Hardware
 Select DAQ Software
LabVIEW/DAQ by Dr. M. Kostic
The Art of
Signal Sampling and Aliasing:
Simulation with a LabVIEW™ Virtual Instrument
"What
We See is Not What It Is!"
Prof. M. Kostic
Mechanical Engineering
NORTHERN ILLINOIS UNIVERSITY
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
W.W.S.N.W.I.I.
"What
We See is Not What It Is!"
It’s all about ...
… Sampling and Aliasing!
Even ...W.Y.S.W.Y.G.
"What You See is What You Get!”
…is REALLY NOT true (the same)
on different Monitors and Printers
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
Signal/Magnitude Resolution
Signal/Sampling Resolution
Sampling/Time Resolution (Speed)
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
There is NO
such thing as...
…too large hard drive disk, or ...
…too large sampling resolution!
Well praised ...
high-definition digital graphics
and CD-quality music
…are NOT good (true) enough!
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
(Under)Sampling & Aliasing ...
• Under-sampling looses
(important) wave details !
• But it also may change the wave
form/shape due to Aliasing !
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
Real measurements
of a simple sine-harmonic
How come this if the measured signal
is a simple sine-harmonic wave?
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
Sampling RPM with Stroboscope
If RPM and Strobe speeds
(frequencies) are the same
the reference mark will
appear stationary
(ZERO aliasing)
If the Strobe speeds is
half of RPM, the disk will
turn twice and the mark
will appear stationary again!
Rotating disk
(RPM)
If the Strobe speed is faster
www.kostic.niu.edu
If the Strobe speed is slower
© MCMXCIX* Prof. M. Kostic
NO
Alias.
ZERO
Aliasing
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
Interactive Experiments ...
LabVIEW Virtual Instruments
Internet Interactive Experiment
Animated Movie
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
Who does the future belongs to ?
www.kostic.niu.edu
© MCMXCIX* Prof. M. Kostic
No Limits …
NO
The Future
Belongs
To…
www.kostic.niu.edu
SPEED
LIMIT
… Whoever
Gets There
First
© MCMXCIX* Prof. M. Kostic
Instrumentation with
Computerized Data
Acquisition for an Innovative
Thermal Conductivity Apparatus
Prof. M. Kostic
Mechanical Engineering
NORTHERN ILLINOIS UNIVERSITY
Introduction
Which teaching/learning method is better…
theoretical vs. experimental,
...traditional vs. new-tech aided,
...inductive vs. deductive…?
It’s like…which cold-medicine is the best…
… “chicken or egg, which one came first”…?
There is NO the best…
…”right-mixture” of all…is the best!
Introduction (Cont’d)
This research application...
...looks complex for undergraduates
But, simple and “in-principle” examples
...are not enough for good professional
training
Goal...
...To work in-depth a “nice” complex
application
Introduction (Cont’d)
Computerized data acquisition hardware and
LabVIEW development and application
software
...in engineering curriculum at NIU
...starting with Experimental Methods I and II
ME courses
Objectives
In addition to basics instrumentation,
measurements...
...show students a purposeful, complex
application
…which was a real professional funded
project, and
…which employs Computerized (“On-Line”)
Data Acquisition
Objectives (Cont’d)
To demonstrate, analyze and discuss:
• Engineering challenge -What is to be
accomplished?
• Mechanical and Electrical Design
• Instrumentation and Measurements
• Computerization and Data Acquisition
Engineering challenge:
What is to be accomplished ?
• An innovative method and a novel research
apparatus
• to measure the thermal conductivity of a
non-Newtonian fluid while it is subjected to
shearing flow, and
• to determine its dependence, if any, on
shearing itself.
Engineering challenge (Cont’d)
This is contrary to the current state-of-the-art
of measuring thermal conductivity under the
condition of motionless fluid,
...to avoid convective heat transfer influence on
the results.
Mechanical and Electrical Design
TC Apparatus
The main test-section
dimensions:
• D/d=2.598/ 2.488 in
outer/inner cylinder
diameters respectively
• with the 0.055 in
thick gap, filled with
the test-fluid inbetween
Mechanical and Electrical Design
(Cont’d)
Main and Guard Heaters
Outer Cylinder
Bearing with
Dynamic Seal
Inner Cylinder
Instrumentation
and Measurements
1
16 Thermocouples
2
DC voltage drop (across
3
3
1
the main heater and a
precise current resistor for
power meas.)
Set & control guard
heating (Solid-state
2
3
Relays)
4
Set & control cylinder
rotational speed
(motor drive and
tachometer-sensor)
4
Instrumentation
and Measurements
(Cont’d)
1 AT-MIO-16DE-10 data
acquisition board
2
4
3
6
2 SCXI-1000 4-slot signal
conditioning chassis
3 SCXI-1122 16-channel
multiplexer-signal
conditioning module for
thermocouples
4 SCXI-1322 shielded terminal
block (w/ CJC)
5 SCXI-1353 shielded cable
assembly
6Two CB-50 terminal blocks
with NB-1 extensions
1
5
AT-MIO-16DE-10
Data Acquisition Board
E Series architecture
• Up to 100 kSamples/sec
• 16 single-ended/8 differential channels,
12-bit analog inputs
• two 12-bit analog outputs
• 32 digital I/O channels
• two 24-bit, 20 MHz counter/timers
Computerization and
Data Acquisition
•
feed-back control for DC motor-drive
using a calibrated tachometer-sensor
•
solid-state relays for efficient and
accurate feed-back control of guardheaters’ power
•
comprehensive over-heating
protection
•
interactive and comprehensive
monitoring for the kinematics and
thermal steadiness of all processes
and
•
convenience of increasing the number of
thermocouple sensors for more
advanced measurements
Computerization and Data Acquisition
(Cont’d)
Conclusion
• One of the objectives
...to utilize the latest powerful, yet
inexpensive, technological developments:
sensors and transducers,
• data acquisition and control integrated
boards,
• computers and application software,
...for research and teaching by
example.
Conclusion (Cont’d)
The designed, computerized measurement and
data acquisition system, accomplishes the
following objectives:




acquire measured data with high speed and accuracy
interactively process and analyze measured data for
immediate use or future post-processing
provide interactive and accurate feed-back process
control - motor speed and guard-heating power, and
interactively displays the raw/measured and
processed/analyzed data in graphical and/or numerical forms
Conclusion (Cont’d)
In addition this system allows for...
easy modification and enhancement
of so called
“virtual (software) instruments”
...by modification of software programs.
Conclusion (Cont’d)
 Will NewTech replace/endanger traditional
values, humans? - Definitely NOT!
Should we use NewTech to our benefits Definitely YES!
 Remember, the TV has never endangered
Printed Press; the both have been
enhancing each other!
 We do not have to change, but we have to
adopt to changes (NewTech including)!
Conclusion (Cont’d)
• New-Technology developments
...maturity, critical mass, wide use
provide for new ways to improve
engineering curriculum and
enhance learning environment
• Either lack of use, or abuse of modern
technological and computational tools
• NewTech should be our Slave, NOT our Master.
Conclusion (Cont’d)
"Location, Location, and Location!"
…as Realtors said.
"Access, Access, and Access!",
…as Internet nerds said.
"Time, Time, and Time!",
…as Businessmen said.
"Quality, Quality, and Quality!”
…as it really matters.
Acknowledgment
• National Science Foundation support (Grant No.
CTS-9523519).
• Graduate School of Northern Illinois University
(NIU)
• Department of Mechanical Engineering
• Mr. Haibo Tong, graduate student and
Mr. Al Metzger, for mechanical design and
fabrication
• Mr. Bill Vickers, for electronics design and
fabrication
You may contact Prof. Kostic at:
mailto: [email protected]
or on the Web:
http://www.kostic.niu.edu