Professional Documents
Culture Documents
Week 1 - LabVIEW Student Ambassadors - v1
Week 1 - LabVIEW Student Ambassadors - v1
TOPICS
ni.com/training
Computer running
LabVIEW 2012 or later
and Windows XP or later
2
ni.com/training
File Locations
The course installer places the course files in the following
location:
Root Directory
Exercises
<or>
Solutions
LabVIEW
Core 1
ni.com/training
Instructional Methods
Demonstrations
Concept
Exercise
Quizzes
Lecture
Topic
Development
Exercise
ni.com/training
ni.com/training
New User
LabVIEW Core 1
Experienced User
Advanced User
LabVIEW Core 3
LabVIEW Core 2
LabVIEW Connectivity
Managing Software
Engineering in LabVIEW
Advanced Architectures
in LabVIEW
Object-Oriented Design
and Programming in LabVIEW
Certifications
Certified LV Associate
Developer Exam
LabVIEW Performance
Certified LabVIEW
Developer Exam
Certified LabVIEW
Architect Exam
Other Courses
LabVIEW Real-Time 1
LabVIEW Real-Time 2
LabVIEW FPGA
DAQ & Signal Conditioning
ni.com/training
Lesson 1
Lesson 4
Lesson 7
Navigating LabVIEW
Developing Modular
Applications
Lesson 2
Lesson 5
Lesson 8
Lesson 3
Lesson 6
Implementing a VI
ni.com/training
Course Goals
This course prepares you to do the following:
Solve problems using LabVIEW
Develop, debug, and test LabVIEW VIs
Use modular programming practices
Select, create, and leverage common data structures
Use data acquisition and instrument control in LabVIEW
applications
Effectively use a state-machine architecture
8
ni.com/training
Lesson 1
Navigating LabVIEW
TOPICS
A.
B.
C.
D.
E.
What Is LabVIEW?
Project Explorer
Parts of a VI
Front Panel
Block Diagram
ni.com/training
A. What Is LabVIEW?
10
ni.com/training
What Is LabVIEW?
A graphical programming environment used to develop
sophisticated measurement, test, and control systems.
LabVIEW:
Interfaces with wide
variety of hardware
Scales across
different targets and
OSs
Provides built-in
analysis libraries
11
ni.com/training
12
Graphical
Dataflow-oriented
Compiled
Multi-platform
Synchronous
LabVIEW Core 2
and Later Topics
Event-driven
Multi-threaded
Object-oriented
Multi-target
MemoryManaged
ni.com/training
B. Project Explorer
Project Explorer Window
Files Types
Project Folders
13
ni.com/training
Project Explorer
Find, access, and organize
project files
Prevent, detect, and resolve
incorrect links
Deploy or download files to
targets
Manage code for build options
Executables, installers, and zip files
14
ni.com/training
LabVIEW Files
Common LabVIEW file
extensions:
LabVIEW project .lvproj
Virtual instrument (VI) .vi
Custom control .ctl
15
ni.com/training
ni.com/training
C. Parts of a VI
Front Panel
Block Diagram
Icon
Connector Pane
17
ni.com/training
Parts of a VI
VIs have 3 main components:
Icon/Connector pane
Block diagram
Front panel
18
ni.com/training
19
ni.com/training
20
ni.com/training
ni.com/training
DEMONSTRATION
D. Front Panel
Controls and Indicators
Object Styles
Object Types
Boolean
Numeric
String
23
ni.com/training
Front Panel
24
ni.com/training
25
Indicators
Output devices
Graphs, LEDs
Display data the block diagram
acquires or generates
ni.com/training
26
ni.com/training
Numeric control
Increment/Decrement buttons
Numeric indicator
27
ni.com/training
28
Boolean
indicator
ni.com/training
Strings
The string data type is a sequence of ASCII characters .
Use string controls to receive text from the user, such as a
password or user name.
Use string indicators to display text to the user.
29
ni.com/training
E. Block Diagram
Terminals
Nodes
Wires
Context Help
30
ni.com/training
Block Diagram
31
ni.com/training
Block Diagram
Block diagram items:
Terminals
Constants
Nodes
Functions
SubVIs
Structures
Wires
Free labels
32
ni.com/training
Terminals
33
ni.com/training
34
ni.com/training
35
ni.com/training
Nodes
Nodes are objects on the block diagram that have inputs
and/or outputs and perform operations when a VI runs.
Nodes
36
ni.com/training
Function Nodes
Functions are:
Fundamental operating elements of LabVIEW.
Do not have front panels or block diagrams, but do have
connector panes.
Has a pale yellow background on its icon.
37
ni.com/training
SubVI Nodes
SubVIs :
Are VIs that you use on the block diagram of another VI.
Have front panels and block diagrams.
Use the icon from the upper-right corner of the front panel as
the icon that appears when you place the subVI on a block
diagram.
ni.com/training
Express VIs
Express VIs:
Are a special type of subVI.
Require minimal wiring because you configure them
with dialog boxes.
Save each configuration as a subVI.
39
ni.com/training
40
ni.com/training
Wires
Wires transfer data between block diagram objects.
Wires are different colors, styles, and thicknesses,
depending on their data types.
A broken wire appears as a dashed
black line with a red X in the middle.
Floating-point
Integer
String
Boolean
Scalar
1-D Array
2-D Array
41
ni.com/training
Context Help
Displays basic information
about wires and nodes when
you move the cursor over an
object.
Can be shown or hidden in
the following ways.
Select HelpShow Context
Help from the LabVIEW menu.
Press <Ctrl-H>.
Click the following button on the
toolbar:
42
ni.com/training
LabVIEW Help
Contains detailed descriptions and instructions for most
palettes, menus, tools, VIs, and functions.
Can be accessed by:
Selecting Help
LabVIEW Help from the
menu.
Clicking the Detailed help
link in the
Context Help window.
Right-clicking an object
and selecting Help from
the shortcut menu.
43
ni.com/training
Examples
LabVIEW includes
hundreds of example
VIs.
Use NI Example Finder
to browse and search
installed examples.
Select HelpFind
Examples in the menu.
44
ni.com/training
47
ni.com/training
48
ni.com/training
Controls Palette
Contains the controls and
indicators you use to create
the front panel.
Navigate the subpalettes or
use the Search button to
search the Controls palette.
49
ni.com/training
Functions Palette
Contains the VIs, functions,
and constants you use to
create the block diagram.
Navigate the subpalettes or
use the Search button to
search the Functions palette.
50
ni.com/training
51
ni.com/training
Global Search
Use the Search bar in the top right of the front panel and block
diagram windows to search palettes, LabVIEW Help, and
ni.com.
52
ni.com/training
DEMONSTRATION
Exercise 1-2
Concept: Locating Controls, Functions, and VIs
Exercise 1-2
Concept: Locating Controls, Functions, and VIs
DISCUSSION
G. Selecting a Tool
Selecting a Tool
Block Diagram Clean-Up
56
ni.com/training
Selecting a Tool
A tool is a special operating mode of the
mouse cursor.
Create, modify, and debug VIs using the
tools provided by LabVIEW.
By default, LabVIEW automatically selects
tools based on the context of the cursor.
If you need more control, use the Tools
palette to select a specific tool.
Select ViewTools Palette to open the
Tools palette.
57
ni.com/training
Wiring Tips
Press <Ctrl-B> to delete all broken wires.
Right-click and select Clean Up Wire to reroute the wire.
58
ni.com/training
59
ni.com/training
ni.com/training
DEMONSTRATION
Exercise 1-3
Concept: Selecting a Tool
Exercise 1-3
Concept: Selecting A Tool
H. Dataflow
64
ni.com/training
Dataflow
LabVIEW follows a dataflow model for running VIs.
A node executes only when data are available at all of its
required input terminals.
A node supplies data to the output terminals only when the
node finishes execution.
65
ni.com/training
Dataflow Quiz
Which node executes first?
a) Add
b) Subtract
c) Random Number
d) Divide
e) Sine
66
ni.com/training
67
ni.com/training
DISCUSSION
DISCUSSION
DISCUSSION
DISCUSSION
I. Building a Simple VI
73
ni.com/training
Building a Simple VI
74
ni.com/training
75
ni.com/training
76
ni.com/training
77
ni.com/training
78
ni.com/training
Scenario:
Acquire a sine waveform 0.1 seconds.
Determine the average value of the waveform.
Log the data.
Display the data to a graph.
79
GOAL
DISCUSSION
DISCUSSION
HOMEWORK
Exercise 1-5
Simple Acquire, Analyze, and Present VI
How do you determine the file path of the generated text file?
DISCUSSION
SummaryQuiz
1. Which function executes first:
Add or Subtract?
a) Add
b) Subtract
c) Unknown
8484
ni.com/training
SummaryQuiz Answer
1. Which function executes first:
Add or Subtract?
a) Add
b) Subtract
c) Unknown
8585
ni.com/training
SummaryQuiz
2. Which function executes first:
Sine or Divide?
a) Sine
b) Divide
c) Unknown
8686
ni.com/training
SummaryQuiz Answer
2. Which function executes first:
Sine or Divide?
a) Sine
b) Divide
c) Unknown
8787
ni.com/training
SummaryQuiz
3. Which of the following
functions executes first:
Random Number, Add or
Divide?
a)
b)
c)
d)
8888
Random Number
Divide
Add
Unknown
ni.com/training
SummaryQuiz Answer
3. Which of the following
functions executes first:
Random Number, Add or
Divide?
a)
b)
c)
d)
8989
Random Number
Divide
Add
Unknown
ni.com/training
SummaryQuiz
4. Which of the following
functions executes last:
Random Number, Subtract or
Add?
a)
b)
c)
d)
9090
Random Number
Subtract
Add
Unknown
ni.com/training
SummaryQuiz Answer
4. Which of the following
functions executes last:
Random Number, Subtract or
Add?
a)
b)
c)
d)
9191
Random Number
Subtract
Add
Unknown
ni.com/training
SummaryQuiz
5. What are the three parts of a VI?
a) Front panel
b) Block diagram
c) Project
d) Icon/Connector pane
92
ni.com/training
92
SummaryQuiz Answer
5. What are the three parts of a VI?
a) Front panel
b) Block diagram
c) Project
d) Icon/Connector pane
93
ni.com/training
93
End of Week 1
94
ni.com/training