Introduction to LabVIEW For Scientists and Engineers - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Introduction to LabVIEW For Scientists and Engineers

Description:

Use simple voltmeter. Add thermocouple calculation ... Separate generator from voltmeter ... Exercise Better Voltmeters. Single Channel Multiple Measurement ... – PowerPoint PPT presentation

Number of Views:138
Avg rating:3.0/5.0
Slides: 43
Provided by: bradleyw4
Category:

less

Transcript and Presenter's Notes

Title: Introduction to LabVIEW For Scientists and Engineers


1
Introduction to LabVIEWFor Scientists and
Engineers
  • UTSI Short Course
  • Tullahoma, TN
  • September 10 - 12, 2001
  • Brad Winkleman, Ph. D.

2
Data Acquisition
  • Difficult because of the number of error sources
  • VI
  • LabVIEW installation
  • Hardware installation
  • Hardware configuration
  • Sensor or experimental setup
  • Operator error
  • Bugs

3
Overview of Data Acquisition
  • Hardware requirements
  • DAQ cards
  • Signal conditioners
  • Sensors
  • Communication link
  • Software
  • LabVIEW (usually all you need)
  • Specific drivers (for unique hardware)

4
Installed Data Acquisition Hardware
  • National instruments PCI - 6023
  • PCI bus
  • 200 kHz sample rate
  • 8/16 AI channels
  • 8 digital outputs
  • 2 timers
  • Also cable and termination board

5
The Data Acquisition Process
  • Configure hardware
  • Start acquisition
  • Read data
  • Once
  • Specified amount
  • Continuously
  • Process acquired data
  • Terminate the data acquisition process

6
Multiple Levels of Programming
  • Easy
  • Single VI does everything
  • Low Performance
  • Easy
  • Intermediate
  • A few VIs needed
  • High Performance
  • Moderate Difficulty
  • Advanced

7
Exercise - Simple Voltmeter
  • Must specify
  • Device
  • Channel
  • Output
  • Single data value
  • Waveform

8
Waveforms
  • Special datatype
  • New with 6.0
  • Measured data
  • Temporal data
  • Many useful routines
  • Simplify many operations
  • Now the default output from data acq
  • Many utility operations

9
A Signal to Measure
  • Thermocouple
  • Low level signal - millivolts
  • Requires gain for accurate measurements
  • Connected via terminal block

10
Exercise A Better Voltmeter
  • Data Acq hardware
  • Adjustable gain
  • Different ranges
  • Unipolar/Bipolar
  • Parameters set by setting signal range
  • High
  • Low
  • Given High and Low values LabVIEW determines the
    best way to set hardware parameters

11
Exercise Simple Thermometer
  • Use simple voltmeter
  • Add thermocouple calculation
  • Range setting necessary

12
MAX
  • Tedious keeping track of all the gains,
    conversion factors, channel assignments
  • MAX can help keep keep all this straight
  • I/O controls allow automatic scaling
  • Demo of MAX

13
Exercise Thermometer using I/O
  • Much simpler
  • No need to specify channel or device
  • Output is scaled (engineering units)
  • Drawback
  • Actual hardware output not available
  • Performance issues

14
Signal Processing
  • Thermocouple signal is noisy
  • Normal
  • Low level signal
  • Filtering reduces noise
  • Simple averaging
  • Digital filters
  • Analog filters

15
Exercise Filtered Thermometer
16
Exercise - A Signal Generator
  • Simple Idea
  • Use Pulse Train VI
  • Set Freq and Duty inside loop
  • Must make connections on termination board
  • Bad News This doesnt work

17
Debug Signal Generator
  • Open Pulse Train VI
  • Open its diagram
  • See what it is doing each loop

18
Exercise A Better Signal Generator
  • Separate generator from voltmeter
  • Use shift registers to remember last values of
    Frequency and Duty Cycle
  • Execute Pulse Train VI only when Frequency and
    Duty Cycle change

19
A Solution - A Better Signal Generator
  • Pulse Train only executes when parameters are
    changed
  • Delay slows the loop
  • Saves CPU cycles

20
Debugging Tools and Techniques
  • Execution Highlighting
  • Breakpoints
  • Probes
  • Interactive
  • Open Front Panels
  • Examine Controls
  • Open Block Diagrams
  • And so on

21
Types of Data Acquisition
  • Single Channel - Single Measurement
  • Multiple Channel Single Measurement
  • Single Channel Multiple Measurement
  • Multiple Channel Multiple Measurement
  • High Performance
  • Continuous
  • Buffered

22
Single Channel - Single Measurement
  • What weve been doing

23
Multiple Channel Single Measurement
  • Similar to Single Single Data Acq
  • Use multiple channel VI
  • Must specify multiple channels
  • Will also work with I/O inputs

24
Single Channel Multiple Measurement
  • Similar to Single Single Data Acq
  • Use multiple point VI
  • Must specify
  • Number of points or samples
  • Sampling frequency
  • Will also work with I/O inputs

25
Multiple Channel Multiple Measurement
  • Similar to Single Multiple Data Acq
  • Use multiple point multiple channel VI
  • Must specify
  • List of channels
  • Number of points or samples
  • Sampling frequency
  • Will also work with I/O inputs

26
Exercise Better Voltmeters
  • Single Channel Multiple Measurement
  • Multiple Channel Single Measurement
  • Multiple Channel Multiple Measurement

27
High Performance Data Acquisition
  • Previous Data Acq collects data in bursts
  • Data is lost in between the bursts
  • Useful for slow systems
  • Continuous Data Acq
  • No missing data
  • Requires buffers
  • More complex VI structure

28
Continuous Buffered Data Acq
  • Continuous buffered process
  • Configure hardware and process
  • Start Data Acq process
  • Read data
  • Process data
  • Stop Data Acq
  • Data always being acquired
  • Reading and processing must not get behind
  • Buffer overflows
  • Process errors and terminates

29
Configure
  • Identifies channels
  • Buffer size
  • Important parameter
  • Good rule 5 seconds of data
  • Generates a task ID

30
Start
  • Starts a configured data acq task
  • Uses task ID
  • Can set total amount of data acquired

31
Read
  • Gets data from buffer
  • Uses task ID to identify buffer
  • Must specify the amount of data desired
  • Delays until data ready
  • User response affected
  • Read frequently for best user experience

32
Stop
  • Stops the acquisition task
  • Clears the hardware

33
Putting The Process Together
  • Create a VI
  • Add the required VIs
  • Intermediate
  • Connect VIs
  • Wire in controls
  • Set values
  • Or use LabVIEW examples

34
High Performance Data Acq
35
High Performance Data Acq
36
Spectrum Analyzer
  • Add a Power Spectrum VI in High Performance Data
    Acq VI
  • Insert between Read and the display terminal
  • Difficulty
  • Read Output is an array of Waveform
  • Power Spectrum input is Waveform
  • Use Array Indexing or Loop structure

37
Saving Data
  • Use File I/O Routines as with Adder with save
  • For full performance
  • Open before loop begins
  • Write during loop (only Write VI inside loop)
  • Close after loop completion

38
Summary of Data Acq
  • Low Level
  • Burst data
  • Generally low performance
  • Intermediate
  • Buffered
  • Continuous
  • High performance

39
Working With Charts and Graphs
  • Modify components
  • Operate components

40
Modifying Charts and Graphs
  • Change most attributes
  • Labels
  • Scaling modes
  • Grid
  • Mapping
  • Precision
  • Update modes
  • Number styles
  • Marker styles
  • Marker spacing
  • Line styles, colors, types
  • Graph styles
  • And more

41
Operating Charts and Graphs
  • Set autoscaling
  • Zoom display area
  • Set precision
  • Select and move cursors
  • Read values
  • Copy and paste data
  • Use as control

42
Overall Summary
  • The basics of LabVIEW programming have been
    detailed
  • Data acquisition principles presented
  • High performance data acquisition techniques
    provided
  • LabVIEW proficiency requires
  • Familiarity with VI library
  • Practice and use
Write a Comment
User Comments (0)
About PowerShow.com