LabVIEW/DAQ by Dr. M. Kostic
LabVIEW - DAQ LabVIEW - DAQ Data AcquisitionData Acquisition
Dr. M. Kostic
NIU - Mechanical Engineering
LabVIEW/DAQ by Dr. M. Kostic
What is LabVIEW - GWhat is LabVIEW - G
VVirtual IInstrumentnstrument EEngineering WWorkbench Full-featured Graphical Programming Software Designed for Instrumentation and Data
Acquisition
Watch NI Demo
LabVIEW/DAQ by Dr. M. Kostic
What is Virtual Instrument-VIWhat 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)Virtual Instruments (VIs)• Front PanelFront Panel– Controls = Inputs
– Indicators = OutputsInputInput OutputOutput
• BlockBlock DiagramDiagram– Accompanying
"program" for front panel
– Components "wired" together
LabVIEW/DAQ by Dr. M. Kostic
(sub) VI as an Icon(sub) VI as an Icon
LV Basics 12 Mar 94
Creating the IconIcon/Subroutine
• Pop up in the icon pane
• It is recommended to create black and white icon
LabVIEW/DAQ by Dr. M. Kostic
Let’s Let’s switchswitch to LabVIEW to LabVIEW software software and playand play........
Show some ExamplesShow some Examples......
LabVIEW/DAQ by Dr. M. Kostic
Lab VIEW SummaryLab VIEW Summary Virtual Instruments (VIs)Virtual Instruments (VIs)
Front Panel Block Diagram Connector/Icon
Two windows to create a VITwo windows to create a VI Panel window (I/O) Diagram window (Program)
Pull-down menusPull-down menusControls 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 menusAll LabVIEW objects have pop-up menus Nonexecutable VIs indicated by...Nonexecutable VIs indicated by...
LabVIEW/DAQ by Dr. M. Kostic
DAQDAQor
Data AcquisitionData Acquisition
LabVIEW/DAQ by Dr. M. Kostic
About plug-in data acquisition (DAQ) boards.About plug-in data acquisition (DAQ) boards. About the organization of the DAQ VIs.About the organization of the DAQ VIs. How to acquire and display an analog signal.How to acquire and display an analog signal. How to perform a timed data acquisition.How to perform a timed data acquisition. How to acquire data from multiple analog How to acquire data from multiple analog
channels.channels. How to drive the digital I/O lines, and the How to drive the digital I/O lines, and the
basics of buffered data acquisition.basics of buffered data acquisition.
DAQ ScopeDAQ Scope
LabVIEW/DAQ by Dr. M. Kostic
DAQ boards:DAQ boards:Analog I/ODigital I/OCounter/timer I/O
DAQ library supports all DAQ boards DAQ library supports all DAQ boards LabVIEW uses the NI-DAQ driver-level softwareLabVIEW uses the NI-DAQ driver-level software
Data Acquisition System ComponentsData Acquisition System Components
PLUG-IN DAQ BOARD: PLUG-IN DAQ BOARD: Measures (acquires), processes, stores, and generates signals, as instructed by software program. Examples: Analog and digital
signals’ input and output, counters, timers, etc.
COMPUTER with SOFTWARE:COMPUTER with SOFTWARE: Control the DAQ board, process, store, and display data, as instructed by software
program. Examples: LabVIEW application programs to acquiredata, simulate instruments, and generate results, etc.
SIGNAL CONDITIONING: SIGNAL CONDITIONING: Modify transducer signals to match DAQ board specs/ranges. Examples: amplification
or attenuation, filtering, excitation, etc.
TRANSDUCERS: TRANSDUCERS: Sense the measured quantitiesand change their properties or generate corresponding electrical signals. Examples: strain gage, thermocouple,
accelerometer, potentiometer, etc.
Data Acquisition - DAQData Acquisition - DAQ
LabVIEW/DAQ by Dr. M. Kostic
TransducersTransducers
Sense Phenomena
Produce Electrical Signal
Examples: Thermocouples, ThermistorsThermocouples, Thermistors Strain Gauges, RTDsStrain Gauges, RTDs Pressure Transducers, Load CellsPressure Transducers, Load Cells Accellerometers, MicrophonesAccellerometers, Microphones Potentiometers, Etc..Potentiometers, Etc..
LabVIEW/DAQ by Dr. M. Kostic
Signal ConditioningSignal ConditioningCondition Transducer Signals
Make Signal Suitable for DAQ Board
Examples: Amplification/AttenuationAmplification/Attenuation Linearization/CalibrationLinearization/Calibration FilteringFiltering Multiplexing (up to 3,072 channels)Multiplexing (up to 3,072 channels) Isolation, Excitations, Etc.Isolation, Excitations, Etc.
LabVIEW/DAQ by Dr. M. Kostic
Typical DAQ BoardTypical DAQ BoardMain Features:
Analog I/O (Input/Output) Digital I/O Timer/Counter I/O, Triggering Accuracy, Flexibility, Reliability, Expandability
Typical Specifications: Computer Platform: (E)ISA, PCMCIA, PCI, NuBus Input Channels: 8-16 SEnd, 4-8 DIff Max. Sampling Rate: 50-500 (1,250) kHz Resolution: 8-16 bits Gains: 1,2,5,10,20,50,100 Times Range:2.5) 5, (0-5)0-10 Volt
LabVIEW/DAQ by Dr. M. Kostic
DAQ Hardware & SoftwareDAQ Hardware & Software
ConfigurationsConfigurationsHardware:
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 AcquisitionData Acquisition Data Analysis (Statistics, FFT, DSP, etc.)Data Analysis (Statistics, FFT, DSP, etc.) Data PresentationData Presentation (Graphing, Plotting, Tabulation, etc.)(Graphing, Plotting, Tabulation, etc.)
LabVIEW/DAQ by Dr. M. Kostic
Analog Input ConsiderationsAnalog Input Considerations• Single-Ended vs. DifferentialSingle-Ended vs. Differential
• • ResolutionResolution
• RangeRange
• Sampling Rate / AliasingSampling Rate / Aliasing
• Averaging / Noise reductionAveraging / Noise reduction
10
1 * 212= 2.4 mV
20
1 * 212= 4.8 mV
Adequately sampled
Aliased due to undersampling
8
3-bit ADC 16-bit ADC
Time
.
10 V range
12 bitresolution
1X Gain
Aliasing
.
LabVIEW/DAQ by Dr. M. Kostic
DAQ Software Architecture – WindowsDAQ Software Architecture – Windows
WDAQCONF.EXE LabVIEW for Windows
DAQ Library VIs
DAQDRVNI-DAQ for Windows
DLL
WDAQCONF.EXE
DAQ BoardNow, new operating systemsand application software versions
make CONFIGURATION ESEAR!
LabVIEW/DAQ by Dr. M. Kostic
Analog Input and Output VIsAnalog Input and Output VIs
AI Sample ChannelAI Sample Channel
AO Update ChannelAO Update Channel
LabVIEW/DAQ by Dr. M. Kostic
Waveform Input and Output VIsWaveform Input and Output VIs
AI Acquire WaveformAI Acquire Waveform
AOAO GenerateGenerate WaveformWaveform
LabVIEW/DAQ by Dr. M. Kostic
Digital Input and OutputDigital Input and Output
Write to Digital LineWrite to Digital Line ReadRead fromfrom DigitalDigital LineLine
WriteWrite toto DigitalDigital PortPort ReadRead fromfrom DigitalDigital PortPort
LabVIEW/DAQ by Dr. M. Kostic
DAQ SummaryDAQ Summary
Identify I/O Signal Types: Identify I/O Signal Types: Transducers/ControllersTransducers/Controllers
Choose a Signal Conditioning MethodChoose a Signal Conditioning Method Select a Data Acquisition (DAQ) DeviceSelect a Data Acquisition (DAQ) Device Choose Terminals/Cables for the HardwareChoose Terminals/Cables for the Hardware Select DAQ SoftwareSelect DAQ Software
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
The Art of The Art of Signal Sampling and Aliasing:Signal Sampling and Aliasing:
Simulation with a LabVIEWSimulation with a LabVIEW™™ Virtual Instrument Virtual Instrument
""What We See is Not What It Is!What We See is Not What It Is!""
Prof. M. KosticProf. M. Kostic Mechanical EngineeringMechanical Engineering
NORTHERN ILLINOIS UNIVERSITYNORTHERN ILLINOIS UNIVERSITY
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
W.W.S.W.W.S.N.N.W.I.I.W.I.I. ""What We See What We See is Notis Not What It Is! What It Is!""
It’s all about ...It’s all about ...… … Sampling and AliasingSampling and Aliasing!!
Even ...Even ...W.Y.S.W.Y.G.W.Y.S.W.Y.G. ""What You See is What You Get!What You See is What You Get!””
……is REALLY NOT true (the same)is REALLY NOT true (the same) on different Monitors and Printerson different Monitors and Printers
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Signal/Sampling ResolutionSignal/Sampling Resolution
SamplingSampling//Time Resolution Time Resolution ((SpeedSpeed))
Sig
nal
Sig
nal
// Mag
nit
ud
e M
agn
itu
de
Res
olu
tion
Res
olu
tion
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
There is NOThere is NOsuch thing as...such thing as...……too large hard drive disk, too large hard drive disk, or ...or ...……too large sampling resolutiontoo large sampling resolution!!
Well praised ... Well praised ... high-definition digital graphicshigh-definition digital graphicsand CD-quality musicand CD-quality music
……are NOT good (true) enoughare NOT good (true) enough!!
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
• Under-sampling looses Under-sampling looses (important) wave details(important) wave details !!
• But it also may change the wave But it also may change the wave form/shape due to Aliasing form/shape due to Aliasing !!
((UnderUnder))Sampling & Aliasing ...Sampling & Aliasing ...
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Real measurements Real measurements of a simple sine-harmonicof a simple sine-harmonic
How come this if the measured signalis a simple sine-harmonic wave?
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Sampled signal
Real signal
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Sampled signal
Real signal
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Sampled signal
Real signal
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Stroboscope light Rotating disk(RPM)
Sampling RPM with StroboscopeSampling RPM with Stroboscope
If RPM and Strobe speeds(frequencies) are the same
the reference mark willappear stationary (ZERO aliasing)
If the Strobe speed is fasterIf the Strobe speed is slower
If the Strobe speeds ishalf of RPM, the disk willturn twice and the mark
will appear stationary again!
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
NO
Ali
as. Aliasing
ZEROAliasing
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Interactive Experiments ...Interactive Experiments ...
LabVIEW Virtual InstrumentsLabVIEW Virtual Instruments
Internet Interactive ExperimentInternet Interactive Experiment
Animated MovieAnimated Movie
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
Who does the future belongs to ?Who does the future belongs to ?
© MCMXCIX* Prof. M. Kosticwww.kostic.niu.edu
No Limits …No Limits …
The Future The Future Belongs Belongs
To…To…
… … Whoever Whoever Gets There Gets There
FirstFirst
NOSPEED
LIMIT
Prof. Prof. M. KosticM. Kostic Mechanical EngineeringMechanical Engineering
NORTHERN ILLINOIS UNIVERSITYNORTHERN ILLINOIS UNIVERSITY
Instrumentation with Instrumentation with Computerized Data Computerized Data AcquisitionAcquisition for an for an Innovative Thermal Innovative Thermal Conductivity ApparatusConductivity Apparatus
IntroductionIntroductionWhich teaching/learning method is better…Which teaching/learning method is better…
theoretical vs. experimental,theoretical vs. experimental,...traditional vs. new-tech aided, ...traditional vs. new-tech aided, ...inductive vs. deductive…?...inductive vs. deductive…?
It’s like…which cold-medicine is the best…It’s like…which cold-medicine is the best…… “chicken or egg, which one came … “chicken or egg, which one came first”…?first”…?
There is NO the best…There is NO the best………”right-mixture” of all…is the best”right-mixture” of all…is the best!!
Introduction Introduction (Cont’d)(Cont’d)
This research application... This research application... ......looks complexlooks complex for undergraduates for undergraduates
But, simple and “in-principle” examplesBut, simple and “in-principle” examples...are ...are not enoughnot enough for good for good professional trainingprofessional training
Goal...Goal......To ...To work in-depthwork in-depth a “nice” complex a “nice” complex applicationapplication
Introduction Introduction (Cont’d)(Cont’d)
Computerized Computerized data acquisition data acquisition hardwarehardware and and LabVIEWLabVIEW development and application development and application software software ......in engineering curriculumin engineering curriculum at NIU at NIU ...starting with Experimental Methods I ...starting with Experimental Methods I and II ME coursesand II ME courses
ObjectivesObjectives
In addition to basics instrumentation, In addition to basics instrumentation, measurements...measurements...
...show students a purposeful, ...show students a purposeful, complex applicationcomplex application
……which was a real professional which was a real professional funded project, andfunded project, and
……which employs Computerized (“On-which employs Computerized (“On-Line”) Data AcquisitionLine”) Data Acquisition
Objectives Objectives (Cont’d)(Cont’d)
To demonstrate, analyze and discuss:To demonstrate, analyze and discuss:
•Engineering challenge -What is to be Engineering challenge -What is to be accomplished?accomplished?
•Mechanical and Electrical DesignMechanical and Electrical Design
•Instrumentation and MeasurementsInstrumentation and Measurements
•Computerization and Data AcquisitionComputerization and Data Acquisition
Engineering challengeEngineering challenge:: What is to be What is to be accomplished accomplished ??
•An innovative method and a novel An innovative method and a novel research apparatusresearch apparatus
• to measure the to measure the thermal conductivitythermal conductivity of a non-Newtonian fluid of a non-Newtonian fluid while it is while it is subjected to shearing flowsubjected to shearing flow, and, and
• to determine its dependence, if any, on to determine its dependence, if any, on shearing itself. shearing itself.
Engineering challenge Engineering challenge (Cont’d)(Cont’d)
This is This is contrary to the current state-of-contrary to the current state-of-the-artthe-art of measuring thermal conductivity of measuring thermal conductivity under the condition of motionless fluid,under the condition of motionless fluid,...to avoid convective heat transfer ...to avoid convective heat transfer influence on the results. influence on the results.
Mechanical and Electrical DesignMechanical and Electrical DesignTC ApparatusTC Apparatus
The main test-The main test-section section dimensions:dimensions:
• D/d=D/d=2.598/ 2.488 2.598/ 2.488 inin outer/inner outer/inner cylindercylinder diameters diameters respectively respectively
• with the with the 0.055 0.055 inin thick gapthick gap, filled , filled with the test-fluid with the test-fluid in-betweenin-between
Mechanical and Electrical Mechanical and Electrical Design Design (Cont’d)(Cont’d)
Main and Guard HeatersMain and Guard Heaters
Outer CylinderOuter CylinderInner CylinderInner Cylinder
Bearing withBearing with
Dynamic SealDynamic Seal
Instrumentation Instrumentation and and MeasurementsMeasurements 16 Thermocouples16 Thermocouples
DC voltage dropDC voltage drop (across the main heater (across the main heater and a precise current and a precise current resistor resistor for power for power meas.meas.))
Set & control guard Set & control guard heatingheating (Solid-state (Solid-state Relays)Relays)
Set & control cylinder Set & control cylinder rotational speedrotational speed(motor drive and (motor drive and
tachometer-sensor)tachometer-sensor)
11
22
44
33
22
11
33
33
44
Instrumentation Instrumentation and and MeasurementsMeasurements (Cont’d)(Cont’d) AT-MIO-16DE-10 data AT-MIO-16DE-10 data
acquisition boardacquisition board
SCXI-1000 4-slot signal SCXI-1000 4-slot signal conditioning chassisconditioning chassis
SCXI-1122 16-channel SCXI-1122 16-channel multiplexer-signal multiplexer-signal conditioning module for conditioning module for thermocouples thermocouples
SCXI-1322 shielded SCXI-1322 shielded terminal block (w/ CJC) terminal block (w/ CJC)
SCXI-1353 shielded SCXI-1353 shielded cable assemblycable assembly
Two CB-50 terminal Two CB-50 terminal blocks with NB-1 blocks with NB-1 extensionsextensions
11
22
3344
5566
11
11
22
33
44
55
66
AT-MIO-16DE-10AT-MIO-16DE-10Data Acquisition BoardData Acquisition BoardE Series architectureE Series architecture
•Up to 100 kSamples/sec Up to 100 kSamples/sec
•16 single-ended/8 differential 16 single-ended/8 differential channels, 12-bit channels, 12-bit analog inputsanalog inputs
• two 12-bit two 12-bit analog outputsanalog outputs
•32 32 digital I/Odigital I/O channels channels
• two 24-bit, 20 MHz two 24-bit, 20 MHz counter/timerscounter/timers
Computerization and Computerization and Data AcquisitionData Acquisition
• feed-back control for feed-back control for DC motor-DC motor-drivedrive using a calibrated using a calibrated tachometer-sensortachometer-sensor
• solid-state relays for efficient and solid-state relays for efficient and accurate feed-back control of accurate feed-back control of guard-heaters’ powerguard-heaters’ power
• comprehensive comprehensive over-heating over-heating protectionprotection
• interactive and comprehensive interactive and comprehensive monitoring for the monitoring for the kinematics kinematics and thermal steadinessand thermal steadiness of all of all processes and processes and
• convenience of increasing the convenience of increasing the number of thermocouple sensors number of thermocouple sensors for for more advanced more advanced measurementsmeasurements
Computerization and Data Acquisition Computerization and Data Acquisition (Cont’d)(Cont’d)
ConclusionConclusion•One of the objectivesOne of the objectives
...to utilize the latest powerful, yet ...to utilize the latest powerful, yet inexpensive, technological developments: inexpensive, technological developments: sensors and transducers, sensors and transducers,
•data acquisition and control integrated data acquisition and control integrated boards, boards,
•computers and application software, computers and application software,
......for research and teaching by examplefor research and teaching by example. .
Conclusion Conclusion (Cont’d)(Cont’d)
The designed, computerized measurement The designed, computerized measurement and data acquisition system, and data acquisition system, accomplishes the following objectives: accomplishes the following objectives:
acquire measured data with acquire measured data with high speed and accuracyhigh speed and accuracy
interactively process and analyzeinteractively process and analyze measured data for measured data for immediate use or future post-processing immediate use or future post-processing
provide provide interactive and accurate feed-backinteractive and accurate feed-back process process control - motor speed and guard-heating power, andcontrol - motor speed and guard-heating power, and
interactively displaysinteractively displays the raw/measured and the raw/measured and processed/analyzed data in graphical and/or numerical processed/analyzed data in graphical and/or numerical formsforms
Conclusion Conclusion (Cont’d)(Cont’d)
In addition this system allows for...In addition this system allows for...
easy modification and enhancementeasy modification and enhancementof so called of so called ““virtualvirtual (software) (software) instrumentsinstruments””...by modification of software ...by modification of software programs.programs.
Conclusion Conclusion (Cont’d)(Cont’d)
Will NewTech replace/endanger Will NewTech replace/endanger traditional values, humans? - Definitely traditional values, humans? - Definitely NOT! NOT! Should we use NewTech to our benefits - Should we use NewTech to our benefits - Definitely YES!Definitely YES!
Remember, the TV has never Remember, the TV has never endangered Printed Press; the both endangered Printed Press; the both have been enhancing each other!have been enhancing each other!
We do not have to change, but we have We do not have to change, but we have to adopt to changes (NewTech to adopt to changes (NewTech including)!including)!
Conclusion Conclusion (Cont’d)(Cont’d)
•New-TechNew-Technologynology developments developments...maturity, critical mass, wide use...maturity, critical mass, wide useprovide for new waysprovide for new ways to improve to improve engineering curriculum and engineering curriculum and enhance learningenhance learning environment environment
•Either Either lack of use, or abuselack of use, or abuse of modern of modern technological and computational toolstechnological and computational tools
•NewTech should be our Slave, NOT our NewTech should be our Slave, NOT our Master.Master.
Conclusion Conclusion (Cont’d)(Cont’d)
"Location, Location, and Location!" "Location, Location, and Location!" …as Realtors said.…as Realtors said.
"Access, Access, and Access!", "Access, Access, and Access!", …as Internet nerds said.…as Internet nerds said.
"Time, Time, and Time!", "Time, Time, and Time!", …as Businessmen said.…as Businessmen said.
"Quality, Quality, and Quality!”"Quality, Quality, and Quality!” …as it really matters.…as it really matters.
AcknowledgmentAcknowledgment• National Science Foundation support National Science Foundation support
(Grant No. CTS-9523519). (Grant No. CTS-9523519).
• Graduate School of Northern Illinois Graduate School of Northern Illinois University (NIU)University (NIU)
• Department of Mechanical EngineeringDepartment of Mechanical Engineering
• Mr. Haibo Tong, graduate student and Mr. Haibo Tong, graduate student and Mr. Al Metzger, for mechanical design and Mr. Al Metzger, for mechanical design and fabrication fabrication
• Mr. Bill Vickers, for electronics design and Mr. Bill Vickers, for electronics design and fabricationfabrication
You may contact Prof. Kostic You may contact Prof. Kostic at:at:
mailto: mailto: [email protected]@niu.edu
or on the Web:or on the Web:
http://http://www.kostic.niu.eduwww.kostic.niu.edu