Professional Documents
Culture Documents
ni.com/training
Despre mine
Alexandru Cpn
Facultatea de Inginerie Mecanic i Mecatronic,
specializarea Mecatronic i Robotic, anul IV
LabVIEW Student Ambassador la Universitatea
Politehnica din Bucureti
Certified LabVIEW Associate Developer
Intern la National Instruments n anul 2016
alexandru.capatina@ni.com
ni.com/training
Course Webpage
ni.com/upb
ni.com/training
National Instruments
Leader in data acquisition technology with
innovative modular instruments and
LabVIEW graphical programming software
Corporate headquarters in
Austin, TX
Offices in nearly 50
countries
35,000+ companies served
annually
ni.com/training
Platform-Based Approach
ni.com/training
Diversity of Applications
Advanced Manufacturing
Wireless
Consumer Electronics
Energy
Transportation
ni.com/training
ni.com/training
ni.com/training
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?
ni.com/training
Laboratory Virtual
Instrumentation Engineering
Workbench
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
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
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
Front panel
Block diagram
18
ni.com/training
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
Increment/Decrement
buttons
Numeric
control
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.
Use string indicators to display text to the user.
29
ni.com/training
E. Block Diagram
Terminals
Nodes
Wires
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
Structures
Structures in LabVIEW have the form of frames.
41
ni.com/training
Wires
Wires transfer data between block diagram objects.
Wires are different colors, styles, and thicknesses,
depending on their data types.
Floating-point
Integer
String
Boolean
Scalar
1-D Array
2-D Array
ni.com/training
Constants
Constants are the source of values just as control
terminals, but their value is fixed in the code.
You can create a constant of each data type.
43
ni.com/training
Free labels
A free label is a label (a text box) not attached to
any object.
Free labels can be put on the front panel or
block diagram. They are created by doubleclicking on empty space in the window.
They can serve as comments or instructions to
the user of the application.
44
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:
45
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.
46
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.
Click the example buttons in LabVIEW Help
topics.
47
ni.com/training
Group Exercise
Concept: Exploring a VI
49
ni.com/training
50
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.
51
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.
52
ni.com/training
53
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.
54
ni.com/training
DEMONSTRATION
Group Exercise
Concept: Locating Controls, Functions
and VIs
DISCUSSION
G. Selecting a Tool
Selecting a Tool
Block Diagram Clean-Up
57
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.
58
ni.com/training
Wiring Tips
Press <Ctrl-B> to delete broken wires.
Right-click and select Clean Up Wire to reroute
the wire.
59
ni.com/training
60
ni.com/training
ni.com/training
DEMONSTRATION
63
DEMONSTRATION
H. Dataflow
64
ni.com/training
Dataflow
ni.com/training
Dataflow Quiz
What are the nodes in this fragment of code?
Which node executes first?
66
ni.com/training
67
ni.com/training
Dataflow Quiz
Which node executes first?
a)
b)
c)
d)
e)
68
Add
Subtract
Random Number
Divide
Sine
ni.com/training
69
ni.com/training
Group Exercise
Concept: Dataflow
ni.com/training
Group Exercise
Concept: Dataflow
Group Exercise
Concept: Dataflow
Group Exercise
Concept: Dataflow
Group Exercise
Concept: Dataflow
I. Building a Simple VI
75
ni.com/training
Building a Simple VI
76
ni.com/training
77
ni.com/training
78
ni.com/training
Write to Measurement
File Express VI
DIAdem Report Express VI
ni.com/training
ni.com/training
Homework:
Navigating LabVIEW
Practice navigating the LabVIEW environment add things to the front panel and block diagram,
align and resize objects, use simple functions.
ni.com/training
Homework:
Simple AAP VI
Build a simple Acquire-Analyze-Present VI.
ni.com/training
Homework:
Simple AAP VI
Example: using Express VIs
ni.com/training
Homework:
Simple AAP VI
Example: without Express VIs
ni.com/training
Homework:
Simple AAP VI
Example scenario:
Acquire a sine waveform for 0.1 seconds.
Determine the average value of the waveform.
Log the data to a file.
Display the data to a graph.
ni.com/training