Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
32 views28 pages

LV Proficiency Workshop 1

Uploaded by

amirul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views28 pages

LV Proficiency Workshop 1

Uploaded by

amirul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Welcome!

Workshop
1 of 7
Topics
 What is LabVIEW?
 LabVIEW Environment
 LabVIEW Project
 Parts of a VI
 Menus & Palettes
 Configurations

 LabVIEW Data Types


 LabVIEW Data Flow
What is LabVIEW?
Laboratory Virtual Instrumentation Engineering Workbench

Compiled graphical development environment


Development time reduction of four to ten times
Tools to acquire, analyze, and present your data
Open and Run LabVIEW
Start»All Programs»National Instruments LabVIEW 2011
»

Start from a blank VI:


New»Blank VI

or
Start from an example:
Examples»Find Examples…
Project Explorer
Use LabVIEW Projects to:
• Group LabVIEW files and non-LabVIEW files
• Create build specifications (i.e. stand-alone applications)
• Deploy or download files to targets (i.e. FPGA target)

5
What is a Virtual Instrument (VI)?
Answer: a LabVIEW program
1. Front Panel * Conn. pane
available from
User interface (UI) FP only

– Controls = inputs
– Indicators = outputs

2. Block Diagram
Graphical source code
– Data travels on wires from control
terminals through functions to
indicator terminals
– Blocks execute by data flow

3. Icon/Connector Pane
• Graphical representation of a VI
• Means of connecting VIs (subVIs)
Front Panel Toolbar

It is best not to use the Abort button


because you run the risk of not closing
references or cleaning up memory
correctly
Run Continuously
Abort

Reorder
Run

Pause

Context Help
Text Settings

Align Objects

Distribute Objects

Resize Objects
Front Panel Controls and Indicators
Numeric Boolean Customize
Palette
View

String Right click!


Shortcut Menus and Properties Dialog
Right Click!
Run
Run Continuously
Abort

Block Diagram
Pause
Front Panel

Highlight Execution
Retain Wire Values
Step In
Step Over
Step Out

Text Settings
Block Diagram Toolbar

Align Objects
Distribute Objects
Resize Objects
Reorder
Clean Up Block Diagram
Context Help
Block Diagram
Terminals
• Block Diagram appearance of front panel objects
• Entry & exit ports that exchange information
between the front panel and block diagram
• Analogous to parameters and constants in text-
based programming languages

Wires
• Transfer data between block diagram objects
• Wires are different colors, styles, and DBL Integer
thicknesses, depending on data type Numeric Numeric String

• A broken wire appears as a dashed Scalar


black line with a red X in the middle 1D Array
2D Array
Block Diagram: Wiring Tips
• Press <Ctrl>-B to delete all broken wires
• Right-click and select Clean Up Wire to reroute the wire
• Use the Clean Up Diagram tool to reroute multiple wires and
objects to improve readability
Select a section of your block diagram
Click the Clean Up Diagram button on the block diagram toolbar
(or <Ctrl>-U)

12
Block Diagram
Nodes
• Objects on the block diagram that have inputs and/or
outputs and perform operations when a VI runs
• Analogous to statements, operators, functions, and
subroutines in text-based programming languages

Functions subVIs Structures


• Fundamental operating • VI that you build to use inside • While loops, for loops,
elements of LabVIEW another VI event structures
• Do not have front panels or • Any VI has potential to • More discussion later
block diagrams, but do become a subVI
have connector panes
• Double-clicking a subVI will
• Double-clicking a function open it (exception: Express
only selects the function – Vis- config. window opens)
does not open it like a VI
• Icon represents subVI in main
• Has a pale yellow VI
background on its icon
Common Data Types Found in LabVIEW
Numeric Controls and Functions
(Front Panel) From the (Block Diagram) From the
Controls»Modern»Numeric Functions»Programming»Nu
subpalette, select the meric subpalette, select the
Numeric Control icon. Add icon.
Mathematical Operations
(Block Diagram) From the Functions»Mathematics»Integration and
Differentiation subpalette, select the Derivative x(t).vi
Boolean Controls and Functions
(Front Panel) From the (Block diagram) From the
Controls»Modern»Boolean Function»Programming»Bool
subpalette, select the Push ean subpalette, select the OR
Button icon. icon.
String Controls and Functions
(Front Panel) From the (Block diagram) From the
Controls»Modern»String Function»Programming»String
subpalette, select the String subpalette, select the
Control icon. Concatenate icon.
Polymorphism
 Definition: a programming
language feature that allows
values of different data types
to be handled using a
uniform interface.
 In LabVIEW: the ability of
VIs and functions to
automatically adapt to
accept input data of different
data types
 i.e. Numeric Functions
 Useful when performing the
same operation on different
data types
Data Flow
 Block diagram execution is
dependent on the flow of data
 Block diagram does NOT
execute left to right
 Node executes when data is
available to ALL input terminals
 Nodes supply data to all output
terminals when done
 If the computer running this
code had multiple processors,
these two pieces of code could
run independently without
additional coding
Review Question 1
Which of the following are the three parts of a VI?
a) Front Panel
b) Project
c) Block Diagram
d) Connector Pane/Icon
Review Question 1
Which of the following are the three parts of a VI?
a) Front Panel
b) Project
c) Block Diagram
d) Connector Pane/Icon
Review Question 2
1. Which identifies the control or indicator on the
block diagram?
a) Caption
b) Location
c) Label
d) Value
Review Question 2
1. Which identifies the control or indicator on the
block diagram?
a) Caption
b) Location
c) Label
d) Value
Review Question 3
Which of the following are not a nodes?
a) Terminals
b) Structures (while loop, for loop)
c) subVIs
d) Wires
e) Functions
Review Question 3
Which of the following are not a nodes?
a) Terminals
b) Structures (while loop, for loop, etc.)
c) subVIs
d) Wires
e) Functions
Review Question 4

Which function executes first: Add or Subtract?


a) Add
b) Subtract
c) Unknown

27
Review Question 4

Which function executes first: Add or Subtract?


a) Add
b) Subtract
c) Unknown

28

You might also like