LabVIEW - DAQ Data Acquisition Dr. M. Kostic NIU - Mechanical Engineering
What is LabVIEW - G • Virtual InstrumentEngineering Workbench • Full-featured Graphical Programming Software • Designed for Instrumentation and Data Acquisition Watch NI Demo
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
Input Output Virtual Instruments (VIs) • Front Panel • – Controls = Inputs • – Indicators = Outputs • BlockDiagram • Accompanying "program" for front panel • Components "wired" together
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...
DAQ or Data Acquisition
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.
Data Acquisition - DAQ • DAQ boards: • Analog I/O • Digital I/O • Counter/timer I/O • DAQ library supports all DAQ boards • LabVIEW uses the NI-DAQ driver-level software • Data Acquisition System Components COMPUTER with SOFTWARE: Control the DAQ board, process, store, and display data, as instructed by software program.Examples: LabVIEW application programs to acquire data, simulate instruments, and generate results, etc. SIGNAL CONDITIONING: Modify transducer signals to match DAQ board specs/ranges.Examples: amplification or attenuation, filtering, excitation, etc. 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. TRANSDUCERS: Sense the measured quantities and change their properties or generate corresponding electrical signals.Examples: strain gage, thermocouple, accelerometer, potentiometer, etc.
Transducers Sense Phenomena Produce Electrical Signal Examples: • Thermocouples, Thermistors • Strain Gauges, RTDs • Pressure Transducers, Load Cells • Accellerometers, Microphones • Potentiometers, Etc..
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.
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: (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
DAQ Hardware & SoftwareConfigurations 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.)
Analog Input Considerations • Single-Ended vs. Differential • Resolution • Range • Sampling Rate / Aliasing • Averaging / Noise reduction 8 10 V range . . 1X Gain 12 bit resolution Time Aliasing Adequately sampled Aliased due to undersampling 16-bit ADC 3-bit ADC
DAQ Software Architecture – Windows LabVIEW for Windows WDAQCONF.EXE DAQ Library VIs DAQDRV NI-DAQ for Windows DLL WDAQCONF.EXE DAQ Board Now, new operating systems and application software versions make CONFIGURATION ESEAR!
AI Sample Channel AO Update Channel Analog Input and Output VIs
Waveform Input and Output VIs AI Acquire Waveform AOGenerateWaveform
ReadfromDigitalLine Write to Digital Line ReadfromDigitalPort WritetoDigitalPort Digital Input and Output
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
Prof. M. Kostic Mechanical Engineering NORTHERN ILLINOIS UNIVERSITY The Art of Signal Sampling and Aliasing:Simulation with a LabVIEW™ Virtual Instrument "What We See is Not What It Is!"
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
Signal/Sampling Resolution Signal/Magnitude Resolution Sampling/Time Resolution (Speed)
There is NOsuch thing as... • …too large hard drive disk, or ... • …too large sampling resolution! • Well praised ... high-definition digital graphicsand CD-quality music • …are NOT good (true) enough!
(Under)Sampling & Aliasing ... • Under-sampling looses (important) wave details! • But it also may change the wave form/shape due to Aliasing !
Real measurements of a simple sine-harmonic How come this if the measured signal is a simple sine-harmonic wave?
Real signal Sampled signal
Real signal Sampled signal
Real signal Sampled signal
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) Stroboscope light If the Strobe speed is slower If the Strobe speed is faster Sampling RPM with Stroboscope
ZERO Aliasing NO Alias. Aliasing
Interactive Experiments ... LabVIEW Virtual Instruments Internet Interactive Experiment Animated Movie
NO SPEED LIMIT No Limits … The Future Belongs To… … Whoever Gets There First
Prof. M. Kostic Mechanical Engineering NORTHERN ILLINOIS UNIVERSITY Instrumentation with Computerized Data Acquisitionfor an Innovative Thermal Conductivity Apparatus
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 DesignTC Apparatus The main test-section dimensions: • D/d=2.598/ 2.488 in outer/inner cylinder diameters respectively • with the 0.055 inthick gap, filled with the test-fluid in-between
Mechanical and Electrical Design (Cont’d) Main and Guard Heaters Outer Cylinder Bearing with Dynamic Seal Inner Cylinder
Instrumentation and Measurements 3 1 1 2 2 • 16 Thermocouples • DC voltage drop(across the main heater and a precise current resistor for power meas.) • Set & control guard heating(Solid-state Relays) • Set & control cylinder rotational speed(motor drive and tachometer-sensor) 3 3 4 4
Instrumentation and Measurements(Cont’d) 2 4 3 1 6 5 2 • AT-MIO-16DE-10 data acquisition board • SCXI-1000 4-slot signal conditioning chassis • SCXI-1122 16-channel multiplexer-signal conditioning module for thermocouples • SCXI-1322 shielded terminal block (w/ CJC) • SCXI-1353 shielded cable assembly • Two CB-50 terminal blocks with NB-1 extensions 1 1 3 4 5 6
AT-MIO-16DE-10Data Acquisition BoardE 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 guard-heaters’ 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
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.