Beruflich Dokumente
Kultur Dokumente
TOPICS
ni.com/training
What You Need to Get Started
ni.com/training
File Locations
Exercises LabVIEW
Root Directory <or>
Solutions Core 1
ni.com/training
Instructional Methods
Demonstrations
Concept
Quizzes
Exercise
Development
Lecture Topic Exercise
ni.com/training
Getting the Most out of this Course
• Ask questions!
• Experiment with hands-on exercises to understand the
methods used
• Explore solutions
• Implementations explore a possible solution—you may find
a better one
ni.com/training
New User Experienced User Advanced User
LabVIEW Performance
Certifications
Certified LV Associate Certified LabVIEW Certified LabVIEW
Developer Exam Developer Exam Architect Exam
Other Courses
ni.com/training
Course Learning Map
Lesson 1 Lesson 4 Lesson 7
Developing Modular Using Sequential and State
Navigating LabVIEW
Applications Machine Algorithms
Lesson 3 Lesson 6
Managing File and Hardware
Implementing a VI
Resources
ni.com/training
Course Goals
ni.com/training
Lesson 1
Navigating LabVIEW
TOPICS
A. What Is LabVIEW? F. Searching for Controls, VIs
B. Project Explorer and Functions
C. Parts of a VI G. Selecting a Tool
D. Front Panel H. Dataflow
E. Block Diagram I. Building a Simple VI
ni.com/training
A. What Is LabVIEW?
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
ni.com/training
LabVIEW Language Characteristics
ni.com/training
B. Project Explorer
Project Explorer Window
Files Types
Project Folders
ni.com/training
Project Explorer
ni.com/training
LabVIEW Files
ni.com/training
Adding Folders to a Project
• Virtual folder
− Organizes project items and
does not represent files on
disk
• Auto-populating folder
− Adds a directory on disk to the
project
− LabVIEW continuously
monitors and updates the
folder according to changes
made in the project and on
disk
ni.com/training
C. Parts of a VI
Front Panel
Block Diagram
Icon
Connector Pane
ni.com/training
Parts of a VI
VIs have 3 main components:
Icon/Connector pane
Block diagram
Front panel
ni.com/training
Parts of a VI – Front Panel
ni.com/training
Parts of a VI – Block Diagram
Block Diagram – Contains the
graphical source code
ni.com/training
Parts of a VI – Icon/Connector Pane
Icon – Graphical representation of a VI
ni.com/training
Using the Project Explorer and Starting a VI
DEMONSTRATION
D. Front Panel
Controls and Indicators
Object Styles
Object Types
Boolean
Numeric
String
ni.com/training
Front Panel
ni.com/training
Controls and Indicators
Controls Indicators
− Input devices − Output devices
− Knobs, buttons, slides − Graphs, LEDs
− Supply data to the block − Display data the block diagram
diagram acquires or generates
ni.com/training
Front Panel Object Styles
ni.com/training
Numeric Controls and Indicators
Numeric control
Increment/Decrement buttons
Numeric indicator
ni.com/training
Boolean Controls and Indicators
• The Boolean data type represents data that has only two
options, such as True/False or On/Off.
• Use Boolean controls and indicators to enter and display
Boolean (TRUE/FALSE) values.
• Boolean objects simulate switches, push buttons, and LEDs.
Boolean Boolean
control 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.
ni.com/training
E. Block Diagram
Terminals
Nodes
Wires
Context Help
ni.com/training
Block Diagram
ni.com/training
Block Diagram
ni.com/training
Terminals
ni.com/training
Terminals for Front Panel Objects
• Terminals are:
– Entry and exit ports that exchange information between the
front panel and block diagram.
– Analogous to parameters in text-based programming
languages.
• Double-click a terminal to locate the corresponding front
panel object.
ni.com/training
View Terminals as Icons
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
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.
• Double-clicking a function only selects the function.
• Functions do not open like VIs and subVIs.
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.
• When you double-click a subVI, the front panel and block
diagram open.
• Any VI has the potential to be used as a subVI.
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.
• Icons for Express VIs appear on the block diagram
as icons surrounded by a blue field.
ni.com/training
Node View Options
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.
Scalar
1-D Array
2-D Array
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 Help»Show Context
Help from the LabVIEW menu.
− Press <Ctrl-H>.
− Click the following button on the
toolbar:
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.
ni.com/training
Examples
• LabVIEW includes
hundreds of example
VIs.
• Use NI Example Finder
to browse and search
installed examples.
− Select Help»Find
Examples in the menu.
• Click the example buttons in LabVIEW Help topics.
ni.com/training
Group Exercise 1-1
Concept: Exploring a VI
DISCUSSION
F. Searching for Controls, VIs, and
Functions
Palettes
Quick Drop
NI Global Search
ni.com/training
Searching for Controls, VIs, and Functions
ni.com/training
Controls Palette
ni.com/training
Functions Palette
ni.com/training
Searching with Quick Drop
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.
ni.com/training
Search for Controls, VIs, and Functions
DEMONSTRATION
Exercise 1-2
Concept: Locating Controls, Functions, and VIs
DISCUSSION
G. Selecting a Tool
Selecting a Tool
Block Diagram Clean-Up
ni.com/training
Selecting a Tool
ni.com/training
Wiring Tips
• Press <Ctrl-B> to delete all broken wires.
• Right-click and select Clean Up Wire to reroute the wire.
ni.com/training
Wiring Tips – Clean Up Diagram
Use the Clean Up Diagram tool to reroute multiple wires and
objects and to improve readability.
1. Select a section of your block diagram.
2. Click the Clean Up Diagram button on the block diagram
toolbar.
ni.com/training
Cloning and Moving Items
• Clone an object in LabVIEW using the following steps:
1. Select the Positioning tool.
2. Press the <Ctrl> key while clicking an object.
3. Drag the copy to new location.
• Move an object using the following steps:
1. Select the Positioning tool.
2. Click and drag the object to new location.
Note: Avoid cutting and pasting objects as this can impact related items.
For example, cutting and pasting a block diagram terminal also moves the
front panel object.
ni.com/training
Selecting, Editing, Resizing and Wiring
DEMONSTRATION
Exercise 1-3
Concept: Selecting a Tool
DISCUSSION
H. Dataflow
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.
ni.com/training
Dataflow – Quiz
ni.com/training
Dataflow – Quiz Answers
ni.com/training
Group Exercise 1-4
Concept: Dataflow
GOAL
Group Exercise 1-4
Concept: Dataflow
DISCUSSION
Group Exercise 1-4
Concept: Dataflow
DISCUSSION
Group Exercise 1-4
Concept: Dataflow
DISCUSSION
Group Exercise 1-4
Concept: Dataflow
DISCUSSION
I. Building a Simple VI
ni.com/training
Building a Simple VI
ni.com/training
Acquire Express VIs
ni.com/training
Analyze Express VIs
• Statistics Express VI
• Filter Express VI
ni.com/training
Present Express VIs and Indicators
• Report Express VI
ni.com/training
Building and Running a VI
ni.com/training
Exercise 1-5, Part A – Group Exercise
Simple Acquire, Analyze, and Present Design
Scenario:
• Acquire a sine waveform 0.1 seconds.
• Determine the average value of the waveform.
• Log the data.
• Display the data to a graph.
GOAL
Exercise 1-5, Part A – Group Exercise
Simple Acquire, Analyze, and Present Design
DISCUSSION
Exercise 1-5, Part A – Group Exercise
Simple Acquire, Analyze, and Present Design
DISCUSSION
Exercise 1-5, Part B
Simple Acquire, Analyze, and Present VI
How do you determine the file path of the generated text file?
DISCUSSION
Summary—Quiz
1. Which function executes first:
Add or Subtract?
a) Add
b) Subtract
c) Unknown
ni.com/training
Summary—Quiz Answer
1. Which function executes first:
Add or Subtract?
a) Add
b) Subtract
c) Unknown
ni.com/training
Summary—Quiz
2. Which function executes first:
Sine or Divide?
a) Sine
b) Divide
c) Unknown
ni.com/training
Summary—Quiz Answer
2. Which function executes first:
Sine or Divide?
a) Sine
b) Divide
c) Unknown
ni.com/training
Summary—Quiz
3. Which of the following
functions executes first:
Random Number, Add or
Divide?
a) Random Number
b) Divide
c) Add
d) Unknown
ni.com/training
Summary—Quiz Answer
3. Which of the following
functions executes first:
Random Number, Add or
Divide?
a) Random Number
b) Divide
c) Add
d) Unknown
ni.com/training
Summary—Quiz
4. Which of the following
functions executes last:
Random Number, Subtract or
Add?
a) Random Number
b) Subtract
c) Add
d) Unknown
ni.com/training
Summary—Quiz Answer
4. Which of the following
functions executes last:
Random Number, Subtract or
Add?
a) Random Number
b) Subtract
c) Add
d) Unknown
ni.com/training
Summary—Quiz
ni.com/training
Summary—Quiz Answer
ni.com/training