2-LabVIEW Basics Updated (4th April 2012)

You might also like

You are on page 1of 38

2

Introduction to LabVIEW
Virtual Instrument(XXX.VI)
Equivalent to C file in C programming
3
Getting Started
Open a
New VI
Find &
Open
Saved VI
Recent VI
VI
Examples
Online
Resources
Help/Tutorial
4
Parts of a VI : Front Panel & Block
Diagram
5
Parts of a VI : Front Panel
LabVIEW program user interface.
Contain:
Control as input
Indicator as output
6
Parts of a VI : Block Diagram
LabVIEW graphical program code.
Contain:
Front panel control and indicator terminals
Constants
Functions
subVIs
Structures
Wires

7
Front Panel Toolbar
Run VI
Run
Continuously
Abort
Execution
Pause
Text Settings
Align Objects
Distribute
Objects
Resize
Objects
Reorder
Objects
Context Help
8
Front Panel Controls and Indicators
Controls
Inputs
Examples: button, knob, dials, sliders,
numeric/string controls.
Indicators
Outputs
Examples: LEDs, graphs, charts, meter,
numeric/string indicators.
9
Front Panel Controls Palette
Search for Controls and
Indicators
Access by:
Right click on Front
Panel
10
Front Panel
Common Types of Controls and Indicators
Numeric

Boolean

String


11
Block Diagram -
Common Types of Nodes
Function Nodes
Fundamental elements
No front panels & block diagrams, only have icon & connector panes
Pale yellow background icon
subVI Nodes
Any VI used in another VI
Have front panel, block diagram, icon, connector panes
White background icon
Express VI Nodes
Less wiring, dialog box configuration and saved as a subVI
Have front panel, block diagram, icon, connector panes
Pale blue background icon



12
Block Diagram-Common Types of Nodes
Constant Nodes
Boolean constant(True/False),Numeric Constant,
Text Constant


13
Block Diagram Functions Palette
Search for functions
nodes, constants, VIs,
subVIs for programming
Access by:
Right click on Block
Diagram
14
Exercise
Creating Simple VI that contains basic types of
control, indicators and function nodes.
15
Palette
Customize the palette
Pin the palette first.



16
Exercise
Palette Customization Demonstration
Control Palette :
Mostly use Modern and Express categories.
Function Palette :
Mostly use Programming and Express categories.



17
Dataflow
LabVIEW programming
VI execution based on Dataflow model
Dataflow model:
A node executes only when data are available at all
of its input terminals
A node supplies data to the output terminals only
when the node is finish executed
DEMONSTRATION
18
Block Diagram View As Icon
19
SubVIs
What is subVIs?
subVI = subFunction/subRoutine in text-based programming

DEMONSTRATION
20
SubVIs : Icon
Graphical representation of a VI
21
SubVI : Connector Pane
Inputs and outputs terminal map
22
SubVI : Icon & Connector Pane
23
SubVI : Connection
24
Exercise
SubVI Demonstration
Learn how to create subVI and use subVI.

25
Useful Shortcuts
CTRL+T: Distribute Block Diagram and Front
Panel evenly on the screen
CTRL+U: Arrange the icons on the Block
Diagram automatically
CTRL+B: Clean up the broken wires
26
Exercise
Shortcut Demonstration
27
Tools Palette
Coloring
Automatic Tool Selection
Tool Palette
28
Exercise
Tools Demonstration
29
Button Features:
Hide the Label
Add the Caption
Properties
Set Color
Set Enabled State
30
Exercise
Button Features Demonstration
31
SummaryQuiz
1. Which of the following are the parts of a VI?
a) User Interface
b) Icon
c) Block Diagram
d) Connector Pane
e) Front Panel
32
SummaryQuiz
2. Which node executes first?
a) Add
b) Subtract
33
SummaryQuiz
3. Which of the
following node/nodes
execute first?
a) Divide
b) Add
c) Subtract
d) Sine
34
SummaryQuiz
4. Which of the following
node executes last?
a) Random Number
b) Subtract
c) Add
35
Links
Join the NI Community:
http://decibel.ni.com/content/index.jspa
Then join groups:
http://decibel.ni.com/content/groups/loop
http://decibel.ni.com/content/groups/mmu-labview
http://decibel.ni.com/content/groups/labview-
career-network



36
LabVIEW Student Design Competition:

http://www.ni.com/studentdesign
Win cash prizes
Win a trip to Austin, US to attend NIWeek
37
Links(Facebook)
http://www.facebook.com/labviewu?sk=wall
http://www.facebook.com/NIWeek

38
Contact
Tan Han Hui
LabVIEW Student Ambassador
MMU, Cyberjaya
+6012-4796866
hanhuitan@gmail.com

You might also like