1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments...
-
Upload
berniece-gray -
Category
Documents
-
view
219 -
download
0
Transcript of 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments...
![Page 1: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/1.jpg)
1
![Page 2: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/2.jpg)
2
LabVIEW Intro, Basics, Tips, Tricks
Doug Norman & Stephanie BriertyNational Instruments
January 8, 2010
![Page 3: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/3.jpg)
3
What is LabVIEW?
• Speak G Graphical programming
language• Go with the flow
Dataflow programming• Easy writing
Easy to learn Powerful debugging tools
![Page 4: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/4.jpg)
4
The LabVIEW Language
• A LV program consists of one or more Virtual Instruments (VIs)
• A VI is like a function or a procedure or a subroutine – except that it has a richer interface
![Page 5: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/5.jpg)
5
Each VI has 2 Windows
Front Panel• User Interface (UI)
– Controls = Inputs– Indicators = Outputs
Block Diagram• Graphical Code
– Data travels on wires from controls through functions to indicators
– Blocks execute by Dataflow
LabVIEW Programs Are Called Virtual Instruments (VIs)
5
![Page 6: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/6.jpg)
6
• Block diagram execution– Dependent on the flow of data– Block diagram does NOT execute
left to right• Node executes when data is
available to ALL input terminals• Nodes supply data to all output
terminals when done
Dataflow Programming
6
![Page 7: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/7.jpg)
7
Controls Palette (Controls & Indicators)
7
Indicator:Numeric Slide
Control:Numeric
Customize Palette View
![Page 8: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/8.jpg)
8
Functions (and Structures) Palette
8
(Place items on the Block Diagram Window)
Structure:While Loop
![Page 9: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/9.jpg)
9
LabVIEW Nodes• While loop• For loop• Boolean logic• PID Control• Arrays• Signal processing• Mathematics• Timing
![Page 10: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/10.jpg)
10
LabVIEW Types
• Floating point
• Integer
• Boolean
• String
• Array – note wire thickness
• Cluster
![Page 11: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/11.jpg)
11
LabVIEW Tasks
• Multiple tasks in parallel• Data flow still applies• Loops 1, 2, and 3 will run• Loop 4 runs after 3 stops
![Page 12: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/12.jpg)
12
Debugging Techniques• Finding Errors
• Execution Highlighting
• Probes
Click on broken Run button.Window showing error appears.
Click on Execution Highlighting button; data flow is animated using bubbles. Values are displayed on wires.
Right-click on wire to display probe and it shows data as it flows through wire segment.
You can also select Probe tool from Tools palette and click on wire.
12
![Page 13: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/13.jpg)
13
Context Help Window• Help»Show Context Help or press <Ctrl+H>• Hover cursor over object to update window
13
Additional Help– Right-Click on the VI icon and
choose Help, or– Choose “Detailed Help.” on the
context help window
![Page 14: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/14.jpg)
14
LabVIEW Tips and Tricks
• Icon editing• LabVIEW is Polymorphic• Race conditions• Shift when copying or moving• Ctrl drag mouse to make space• Edit>>Create SubVI• Right-click terminal>>Create• Edit>>Make Current Values Default
![Page 15: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/15.jpg)
15
LabVIEW Shortcuts and Tools• Ctrl-R: Run the VI• Ctrl-E: Swap between front panel and block diagram• Ctrl-H: Turn on context help• Ctrl-B: Remove broken wires• Ctrl-Z: Undo
• View>>Navigation Window or Ctrl-Shift-N• Tools>>CompactRIO Imaging Tool…• Tools>>Setup Axis Camera• Tools>>Options
![Page 16: 1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649ebe5503460f94bc8616/html5/thumbnails/16.jpg)
16
Conclusion
• LabVIEW is easy to learn yet incredibly powerful• Shortcuts can speed up development time• To learn more, visit ni.com/first
Questions?