What is LabVIEW - G LabVIEW - DAQ Data Acquisition Dr. M. Kostic NIU - Mechanical Engineering l Virtual Instrument Engineering Workbench l Full-featured Graphical Programming Software l Designed for Instrumentation and Data Acquisition LabVIEW/DAQ by Dr. M. Kostic LabVIEW/DAQ by Dr. M. Kostic Virtual Instruments (VIs (VIs)) What is Virtual InstrumentInstrument-VI A software designed program to simulate an instrument (Virtual Instrument) l Versatile as our creativity l It is stored in a file any_name.vi extension l It could be used as a subroutine or main program • Front Panel – Controls = Inputs – Indicators = Outputs l Input Output • Block Diagram – Accompanying "program" for front panel – Components "wired" together LabVIEW/DAQ by Dr. M. Kostic (sub) VI as an Icon Creating the Icon/Subroutine Icon • Pop up in the icon pane LabVIEW/DAQ by Dr. M. Kostic Let’ Let’s switch to LabVIEW software and play.... play.... Show some Examples... Examples... • It is recommended to create black and white icon LV Basics 1 2 Mar 94 LabVIEW/DAQ by Dr. M. Kostic LabVIEW/DAQ by Dr. M. Kostic Lab VIEW Summary l Virtual Instruments (VIs (VIs)) v Front Panel v Block Diagram v Connector/Icon DAQ l Two windows to create a VI v Panel window (I/O) v Diagram window (Program) l PullPull-down menus v Controls menu to place controls/indicators (I/O) in Panel window v Functions menu to place program nodes in Diagram window or Data Acquisition l All LabVIEW objects have poppop-up menus l Nonexecutable VIs indicated by... LabVIEW/DAQ by Dr. M. Kostic LabVIEW/DAQ by Dr. M. Kostic Data Acquisition - DAQ DAQ Scope l About plugplug-in data acquisition (DAQ) boards. l About the organization of the DAQ DAQ boards: FCOMPUTER Analog I/O BOARD: SIGNAL CONDITIONING: Modify transducer with SOFTWARE: Control the DAQ signals board, PLUG-IN DAQ Measures (acquires), PLUG TRANSDUCERS: Sense the measured quantities FDigital 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 FCounter/timer I/O or Examples: attenuation, filtering, excitation, etc. to acquire program. Examples: LabVIEW application programs by software program. and digital electrical signals. Examples: strainAnalog gage, thermocouple, n DAQ library supports all DAQ boards data, and simulate instruments, and signals’accelerometer, input output, counters, timers, etc. results, etc. potentiometer, etc.-generate n LabVIEW uses the NIlevel software NI-DAQ driverdriver n VIs. VIs. l How to acquire and display an analog signal. Data Acquisition System Components l How to perform a timed data acquisition. l How to acquire data from multiple analog channels. l How to drive the digital I/O lines, and the basics of buffered data acquisition. LabVIEW/DAQ by Dr. M. Kostic LabVIEW/DAQ by Dr. M. Kostic Transducers Signal Conditioning Sense Phenomena Produce Electrical Signal Condition Transducer Signals Make Signal Suitable for DAQ Board Examples: Examples: l l l l l Thermocouples, Thermistors Strain Gauges, RTDs Pressure Transducers, Load Cells Accellerometers, Accellerometers, Microphones Potentiometers, Etc.. LabVIEW/DAQ by Dr. M. Kostic l l l l l Amplification/Attenuation Linearization/Calibration Filtering Multiplexing (up to 3,072 channels) Isolation, Excitations, Etc. LabVIEW/DAQ by Dr. M. Kostic DAQ Hardware & Software Typical DAQ Board Configurations Main Features: F F F F Hardware: Analog I/O (Input/Output) Digital I/O Timer/Counter I/O, Triggering Accuracy, Flexibility, Reliability, Expandability F F F Typical Specifications: F F F F F F 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 ( ± 2.5) ±5, (0-5) 0-10 Volt 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: F F F Set-up and Configuration Programs Drivers: Interface between DAQ Board and Computer DAQ Application Software (LabVIEW, C, Basic, etc.) K K K LabVIEW/DAQ by Dr. M. Kostic Data Acquisition Data Analysis (Statistics, FFT, DSP, etc.) Data Presentation (Graphing, Plotting, Tabulation, etc.) LabVIEW/DAQ by Dr. M. Kostic Analog Input Considerations DAQ Software Architecture – Windows • SingleSingle-Ended vs. Differential 8 10 V range WDAQCONF.EXE • Resolution 10 • Range 1* 212 LabVIEW for Windows 20 . = 2.4. mV 1* 212 1X Gain = 4.8 mV DAQ Library VIs 12 bit resolution • Sampling Rate / Aliasing Time DAQDRV NI-DAQ for Windows DLL Aliasing Adequately sampled WDAQCONF.EXE Aliased due to undersampling • Averaging / Noise reduction 3-bit ADC 16-bit ADC LabVIEW/DAQ by Dr. M. Kostic Analog Input and Output VIs AI Sample Channel AO Update Channel LabVIEW/DAQ by Dr. M. Kostic Now, new operating systems and application software versions make CONFIGURATION ESEAR! DAQ Board 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 DAQ Summary l Identify I/O Signal Types: Write to Digital Line Read from Digital Line Write to Digital Port Read from Digital Port Transducers/Controllers l Choose a Signal Conditioning Method l Select a Data Acquisition (DAQ) Device l Choose Terminals/Cables for the Hardware l Select DAQ Software LabVIEW/DAQ by Dr. M. Kostic LabVIEW/DAQ by Dr. M. Kostic The Art of Signal Sampling and Aliasing: W.W.S.N.W.I.I. " What We See is Not What It Is!" Simulation with a LabVIEW Virtual Instrument ™ "What We See is Not What It Is!" Prof. M. Kostic Mechanical Engineering ⇒It’ It’s all about ... … Sampling and Aliasing! ⇒Even ...W.Y.S.W.Y.G. ...W.Y.S.W.Y.G. "What You See is What You Get!” ⇒…is REALLY NOT true (the same) on different Monitors and Printers NORTHERN ILLINOIS UNIVERSITY www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic Signal//Magnitude Resolution Signal Signal/Sampling Resolution www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic There is NO such thing as... ⇒…too large hard drive disk, or ... ⇒…too large sampling resolution! resolution! Sampling/ Sampling/Time Resolution (Speed) Speed) www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic ⇒Well praised ... highhigh-definition digital graphics and CDCD-quality music ⇒…are NOT good (true) enough! enough! www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic (Under) Under)Sampling & Aliasing ... Real measurements of a simple sinesine-harmonic • UnderUnder-sampling looses (important) wave details ! • But it also may change the wave form/shape due to Aliasing ! © MCMXCIX* Prof. M. Kostic www.kostic.niu.edu How come this if the measured signal is a simple sine-harmonic wave? Real signal Real signal Samp led sig nal Samp led sig nal © MCMXCIX* Prof. M. Kostic www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic www.kostic.niu.edu 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) Real signal Samp led sig nal t e ligh oscop b o r t S If the Strobe speed is faster www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic www.kostic.niu.edu 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 slower © MCMXCIX* Prof. M. Kostic Interactive Experiments ... LabVIEW Virtual Instruments Internet Interactive Experiment Animated Movie NO Alias. ZERO Aliasing www.kostic.niu.edu Aliasi ng © MCMXCIX* Prof. M. Kostic Who does the future belongs to ? © MCMXCIX* Prof. M. Kostic www.kostic.niu.edu No Limits … NO The Future Belongs To… To… www.kostic.niu.edu © MCMXCIX* Prof. M. Kostic Instrumentation with Computerized Data Acquisition for an Innovative Thermal Conductivity Apparatus Prof. M. Kostic Mechanical Engineering NORTHERN ILLINOIS UNIVERSITY SPEED LIMIT www.kostic.niu.edu … Whoever Gets There First © MCMXCIX* Prof. M. Kostic Introduction Which teaching/learning method is better… better… theoretical vs. experimental, ...traditional vs. newnew-tech aided, ...inductive vs. deductive… deductive…? It’ It’s like… like…which coldcold-medicine is the best… best… … “chicken or egg, which one came first”… ? first”…? There is NO the best… best… …”rightright-mixture” mixture” of all… all…is the best! best! Introduction (Cont’ (Cont’d) This research application... ...looks ...looks complex for undergraduates But, simple and “inin-principle” principle” examples ...are not enough for good professional training Goal... ...To work inin-depth a “nice” nice” complex application Objectives In addition to basics instrumentation, measurements... ...show students a purposeful, complex application …which was a real professional funded project, and …which employs Computerized (“ (“OnOn-Line” Line”) Data Acquisition Engineering challenge: challenge: What is to be accomplished ? • An innovative method and a novel research apparatus • to measure the thermal conductivity of a nonnon-Newtonian fluid while it is subjected to shearing flow, flow, and • to determine its dependence, if any, on shearing itself. Introduction (Cont’ (Cont’d) Computerized data acquisition hardware and LabVIEW development and application software ...in ...in engineering curriculum at NIU ...starting with Experimental Methods I and II ME courses Objectives (Cont’ (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 (Cont’ (Cont’d) This is contrary to the current statestate-ofof-thethe-art of measuring thermal conductivity under the condition of motionless fluid, ...to avoid convective heat transfer influence on the results. Mechanical and Electrical Design Mechanical and Electrical Design TC Apparatus (Cont’ (Cont’d) The main testtest-section dimensions: Main and Guard Heaters • D/d=2.598/ D/d=2.598/ 2.488 in outer/inner cylinder diameters respectively • with the 0.055 in Outer Cylinder thick gap, gap, filled with the testtest-fluid ininbetween Instrumentation and Measurements 1 16 Thermocouples 2 DC voltage drop (across Instrumentation and Measurements 3 (Cont’ (Cont’d) 1 1• AT-MIO-16DE-10 data acquisition board the main heater and a precise current resistor for power meas.) meas.) 3 Set & control guard heating (Solid(Solid-state multiplexer-signal conditioning module for thermocouples 3 4• SCXI-1322 shielded terminal block (w/ CJC) 5• SCXI-1353 shielded cable 4 assembly (motor drive and 6j Two CB-50 terminal blocks tachometertachometer-sensor) ATAT-MIOMIO-16DE16DE-10 Data Acquisition Board with NB-1 extensions Computerization and Data Acquisition • feed-back control for DC motor-drive using a calibrated tachometer-sensor • Up to 100 kSamples/sec • 16 singlesingle-ended/8 differential channels, • solid-state relays for efficient and accurate feed-back control of guardheaters’ power • • two 1212-bit analog outputs • 32 digital I/O channels • two 2424-bit, 20 MHz counter/timers 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 E Series architecture 1212-bit analog inputs 2 4 6 conditioning chassis 3• SCXI-1122 16-channel Set & control cylinder rotational speed Inner Cylinder 2• SCXI-1000 4-slot signal 2 Relays) 4 Bearing with Dynamic Seal 1 3 5 Computerization and Data Acquisition (Cont’ (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’ (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 postpost-processing provide interactive and accurate feedfeed-back process control - motor speed and guardguard-heating power, and Conclusion (Cont’ (Cont’d) In addition this system allows for... easy modification and enhancement of so called “virtual (software) instruments” instruments” ...by modification of software programs. interactively displays the raw/measured and processed/analyzed data in graphical and/or numerical forms Conclusion (Cont’ (Cont’d) Conclusion (Cont’ (Cont’d) • Will NewTech replace/endanger traditional • NewNew-Technology Technology developments 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)! ...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’ (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!” Quality!” …as it really matters. You may contact Prof. Kostic at: mailto: kostic@niu.edu or on the Web: http://www.kostic.niu.edu http://www.kostic.niu.edu Acknowledgment • National Science Foundation support (Grant No. CTSCTS-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