You are on page 1of 30

Introduction to LabVIEW

Virtual Instrument(XXX.VI)
Equivalent to C file in C programming

Getting Started

Open a
New VI

Online
Resources

Recent VI
Help/Tutorial

Find &
Open
Saved VI

VI
Examples
3

Parts of a VI : Front Panel & Block


Diagram

Parts of a VI : Front Panel


LabVIEW program user interface.
Contain:
Control as input
Indicator as output

Parts of a VI : Block Diagram


LabVIEW graphical program code.
Contain:

Front panel control and indicator terminals


Constants
Functions
subVIs
Structures
Wires
6

Front Panel Toolbar

Run VI

Text Settings

Reorder
Objects

Resize
Objects

Run
Continuously
Abort
Execution

Distribute
Objects
Pause

Context Help

Align Objects

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.

Front Panel Controls Pallete


Search for Controls and
Indicators
Access by:
Right click on Front
Panel

Front Panel
Common Types of Controls and Indicators
Numeric
Boolean
String

10

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
11

Block Diagram-Common Types of Nodes


Constant Nodes
Boolean constant(True/False),Numeric Constant,
Text Constant

12

Block Diagram Functions Pallete


Search for functions
nodes, constants, VIs,
subVIs for programming
Access by:
Right click on Block
Diagram

13

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
14

Exercise
Creating Simple VI that contains basic types of
control, indicators and function nodes.

15

Block Diagram View As Icon

16

SubVIs
What is subVIs?
subVI = subFunction/subRoutine in text-based programming

DEMONSTRATION
17

SubVIs : Icon

Graphical representation of a VI

18

SubVI : Connector Pane

Inputs and outputs terminal map

19

Parts of a VI : Icon & Connector Pane

20

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

21

Exercise
Learn to create and use a SubVI.

22

SummaryQuiz
1. Which of the following are the parts of a VI?
a)
b)
c)
d)
e)

User Interface
Icon
Block Diagram
Connector Pane
Front Panel

23

SummaryQuiz

2. Which node executes first?


a) Add
b) Subtract

24

SummaryQuiz
3. Which of the
following node/nodes
execute first?
a)
b)
c)
d)

Divide
Add
Subtract
Sine

25

SummaryQuiz
4. Which of the following
node executes last?
a) Random Number
b) Subtract
c) Add

26

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/labviewcareer-network

27

LabVIEW Student Design Competition:


http://www.ni.com/studentdesign
Win cash prizes
Win a trip to Austin, US to attend NIWeek

28

Links(Facebook)
http://www.facebook.com/labviewu?sk=wall
http://www.facebook.com/NIWeek

29

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

30

You might also like