Title: LabVIEW in 3 Hours
1LabVIEW in 3 Hours
2What is Test Measurement?
Acoustic Quality
RF Signal Analysis
Keypad Functionality
LCD Testing
Sound Quality
Battery Test
3Engineering Industries
Manufacturing
Telecom
Electronics
Automotive
Test Industries
Semiconductor
Chemical Processing
Aerospace
Transportation
Military
Biomedical
4Instrumentation
5Instrumentation
6Data Acquisition
7Virtual Instrumentation
Application Software
Hardware and Driver Software
Network
8Virtual Instrumentation Architecture
LabVIEW
Instrument / Data Acquisition Drivers
9Section I The LabVIEW Environment
- LabVIEW terms
- Components of a LabVIEW application
- LabVIEW programming tools
- Creating an application in LabVIEW
10LabVIEW Programs Are Called Virtual Instruments
(VIs)
11LabVIEW Programs Are Called Virtual Instruments
(VIs)
2 Work areas
1. Front Panel Controls Inputs to the computer
12LabVIEW Programs Are Called Virtual Instruments
(VIs)
2 Work areas
1. Front Panel Controls Inputs to the
computer Indicators Outputs from the computer
13LabVIEW Programs Are Called Virtual Instruments
(VIs)
2 Work areas
1. Front Panel Controls Inputs to the
computer Indicators Outputs from the computer
2. Block Diagram Instruction set for controls,
indicators Source Code
14LabVIEW Graphical Development Environment
15VI Front Panel
Panel Toolbar
Pull-down menu
Boolean Control
Double Indicator
Waveform Graph
16VI Block Diagram
Pull-down menu
Thermometer Terminal
Data Acquisition Function
Temperature Indicator
Delay
While Loop
Stop Loop Terminal
Stop Button Terminal
17Controls and Functions Palettes
Functions Palette (Block Diagram Window)
Controls Palette (Front Panel Window)
Graphical, floating palettes Used to place
controls indicators on the front panel, or to
build the block diagram
18Tools Palette (Front Panel)
19Tools Palette (Block Diagram)
20Status Toolbar
Run Button Continuous Run Button Abort
Execution Pause/Continue Button Text
Settings Align Objects Distribute
Objects Reorder
Additional Buttons on the Diagram Toolbar
Execution Highlighting Button Step Into
Button Step Over Button Step Out Button
21Status Toolbar
Run Button Continuous Run Button Abort
Execution Pause/Continue Button Text
Settings Align Objects Distribute
Objects Reorder
Additional Buttons on the Diagram Toolbar
Execution Highlighting Button Step Into
Button Step Over Button Step Out Button
22Open a Virtual Instrument
Basic Spectral Measurement.vi
23Template Browser
24Create a New VI
25Creating a VI Front Panel
Front Panel Window
26Creating a VI Front Panel
Front Panel Window
27Creating a VI Block Diagram
Block Diagram
Front Panel Window
28LabVIEWs Context Help
29Creating a VI Adding Functions
30Creating a VI Adding Functions
31Creating a VI Wiring
32Creating a VI Adding Functions
33Creating a VI Adding Functions
34Express Functions
Same overall functionality
35Section II
- What is a subVI?
- Creating a subVI
- Using a VI as a subVI
36SubVIs
- LabVIEW is modular
- Any VI can be used as a subroutine (or subVI) to
other programs - Advantages
- Modular
- Easier to debug
- Dont have to recreate code
37Creating a SubVI
- Create code
- Select code for use in subVI
- Click Edit-Create subVI
38Editing a SubVI
39Insert the SubVI into a Top Level VI
Accessing user-made subVIs Functions gtgt Select a
VI Or Drag icon onto target diagram
40Create SubVI from your code
41View your subVI
42Section III Data Acquisition
- Data acquisition (DAQ) basics
- Connecting Signals
- Simple DAQ application
43DAQ Data Acquisition
- Plug-in board for a computer with
- Analog input channels
- Analog output channels
- Counters
- Digital I/O
- Controlled by a suite of LabVIEW VIs
- FunctionsgtgtData Acquisition
44DAQ DataAcquisition
45Hardware Connections
BNC-2120
SC-2075
SCB-68
46Channel Connections
Signal
Motor
Single-Ended Measurement
Ground
Battery
Signal 1
Differential Measurement
-
Signal 2
47Analog Signals
Data Acquisition System
1.659487387 volts
1010100111110
ADC
48Digital Signals
49Measurement Automation Explorer
50Channel Connections
Channel Connections
- Single-Ended Mode ACHx and AIGND used to
connect signal to channel x - Differential Mode ACHx, ACHx8 used to connect
signal to channel x
51Section IV Loops and Charts
- For Loop
- While Loop
- Charts
- Graphs
52Loops
- While Loops
- Terminated by condition
- Always Runs Once
- Delay between iterations may be added
- For Loops
- Terminate after N iterations
- N specified on block diagram
53Loops (cont.)
- Select the loop
- Enclose Code to Repeat
While Loop
54Charts and Graphs
- Waveform Charts display a history of values over
time - - Strip Chart (continuous scrolling)
- - Scope Chart (repeatedly redraws over the same
region) - - Sweep Chart (redraws curve to the right of
the old curve)
Waveform Graphs and X-Y Graphs - Wavefrom
Graphs plot Y for regular increments of X - X-Y
Graphs plot Y vs. X for any X-Y sets (non-regular)
55Charts
- Waveform chart special numeric indicator that
can display a history of values - Controls gtgt Graphs gtgt Waveform Chart
56Wiring Data into Charts
57Combining data onto one graph
58File I/O Using The LVM Express Function
59File I/O Using Traditional Functions
Easy File I/O VIs
- Read/write to spreadsheet file
- Read/write characters to file (ASCII)
- Read lines from file
- Read/write binary file
60Conclusion
- See www.ni.com for more help, examples