0% found this document useful (0 votes)
66 views

Week 1

The document provides an overview of the LabVIEW Core 1 training course. It introduces the LabVIEW programming environment and covers topics like the project explorer, parts of a VI, front panels, block diagrams, searching for controls and functions, selecting tools, and basic wiring. The goal of the course is to teach students how to solve problems, develop VIs, and perform tasks like instrument control using LabVIEW.

Uploaded by

Steven Yoon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Week 1

The document provides an overview of the LabVIEW Core 1 training course. It introduces the LabVIEW programming environment and covers topics like the project explorer, parts of a VI, front panels, block diagrams, searching for controls and functions, selecting tools, and basic wiring. The goal of the course is to teach students how to solve problems, develop VIs, and perform tasks like instrument control using LabVIEW.

Uploaded by

Steven Yoon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Session 1

ni.com

New User

LabVIEW Core 1

Experienced User

Advanced User

LabVIEW Core 3

LabVIEW Core 2
LabVIEW Connectivity

Managing Software
Engineering in LabVIEW
Advanced Architectures
in LabVIEW

Object-Oriented Design
and Programming in LabVIEW

Certifications

Certified LV Associate
Developer Exam

LabVIEW Performance

Certified LabVIEW
Developer Exam

Certified LabVIEW
Architect Exam

Other Courses
LabVIEW Real-Time 1
LabVIEW Real-Time 2

LabVIEW Instrument Control


LabVIEW Modular Instruments

LabVIEW FPGA
DAQ & Signal Conditioning

ni.com/training

Course Learning Map

Lesson 1

Lesson 4

Lesson 7

Navigating LabVIEW

Developing Modular
Applications

Using Sequential and State


Machine Algorithms

Lesson 2

Lesson 5

Lesson 8

Troubleshooting & Debugging


VIs

Creating and Leveraging Data


Structures

Solving Dataflow Challenges


with Variables

Lesson 3

Lesson 6

Implementing a VI

Managing File and Hardware


Resources

ni.com/training

Course Goals
This course prepares you to do the following:
Solve problems using LabVIEW
Develop, debug, and test LabVIEW VIs
Use modular programming practices
Select, create, and leverage common data structures
Use data acquisition and instrument control in LabVIEW
applications
Effectively use a state-machine architecture
3

ni.com/training

Lesson 1
Navigating LabVIEW
TOPICS
A.
B.
C.
D.
E.

What Is LabVIEW?
Project Explorer
Parts of a VI
Front Panel
Block Diagram

F. Searching for Controls, VIs


and Functions
G. Selecting a Tool
H. Dataflow
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
6

ni.com/training

LabVIEW Language Characteristics


LabVIEW Core 1
Topics

Graphical
Dataflow-oriented
Compiled
Multi-platform
Synchronous

LabVIEW Core 2
and Later Topics

Event-driven
Multi-threaded
Object-oriented
Multi-target
MemoryManaged

ni.com/training

B. Project Explorer
Project Explorer Window
Files Types
Project Folders

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

Integrate with source code


control providers

ni.com/training

LabVIEW Files
Common LabVIEW file
extensions:
LabVIEW project .lvproj
Virtual instrument (VI) .vi
Custom control .ctl

10

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
11

ni.com/training

C. Parts of a VI
Front Panel
Block Diagram
Icon
Connector Pane

12

ni.com/training

Parts of a VI
VIs have 3 main components:
Icon/Connector pane

Block diagram

Front panel
13

ni.com/training

D. Front Panel
Controls and Indicators
Object Styles
Object Types
Boolean
Numeric
String
14

ni.com/training

Front Panel

15

ni.com/training

Controls and Indicators


Controls
Input devices
Knobs, buttons, slides
Supply data to the block
diagram

16

Indicators
Output devices
Graphs, LEDs
Display data the block diagram
acquires or generates

ni.com/training

Numeric Controls and Indicators


The numeric data in a control or indicator can represent
numbers of various types, such as integer or floating-point.

Numeric control
Increment/Decrement buttons
Numeric indicator

17

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
control

18

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, such as a
password or user name.
Use string indicators to display text to the user.

19

ni.com/training

E. Block Diagram
Terminals
Nodes
Wires
Context Help

20

ni.com/training

Block Diagram

21

ni.com/training

Block Diagram
Block diagram items:
Terminals
Constants
Nodes
Functions
SubVIs
Structures

Wires
Free labels
22

ni.com/training

Terminals

Same label name

23

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.

24

ni.com/training

View Terminals as Icons


By default, View as Icon option
enabled.
Deselect View as Icon for a more
compact view.

25

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

26

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.

27

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.
28

ni.com/training

Parts of a VI Icon/Connector Pane


Icon Graphical representation of a VI
Connector Pane Map of the inputs
and outputs of a VI
Icons and connector panes are necessary to use a VI as a
subVI.
A subVI is a VI that appears on the block diagram of another VI.
A subVI is similar to a subroutine or function in a text-based
programming language.
29

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.

30

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.
Floating-point

Integer

String

Boolean

Scalar
1-D Array
2-D Array

31

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:
32

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.
33

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.

34

ni.com/training

Group Exercise
Exploring a VI (Flight Delays)

Identify the parts of an existing VI.


GOAL

F. Searching for Controls, VIs, and


Functions
Palettes
Quick Drop
NI Global Search

36

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.

37

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.

38

ni.com/training

Searching with Quick Drop


Lets you quickly find controls,
functions, VIs, and other
items by name.
Press the <Ctrl-Space> keys
to display the Quick Drop
dialog box.

39

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.

40

ni.com/training

G. Selecting a Tool
Selecting a Tool
Block Diagram Clean-Up

41

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.

42

ni.com/training

Wiring Tips
Press <Ctrl-B> to delete all broken wires.
Right-click and select Clean Up Wire to reroute the wire.

43

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.

44

ni.com/training

Cloning and Moving Items


Clone an object in Windows 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.
45

ni.com/training

H. Dataflow

46

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.

47

ni.com/training

Dataflow
Which node executes first?
a) Add
b) Subtract
c) Random Number
d) Divide
e) Sine

48

ni.com/training

Group Exercise
Dataflow

Identify dataflow execution order in the following block


diagrams.
GOAL

Group Exercise 1-4


Concept: Dataflow

Which Express VI executes last?

DISCUSSION

Group Exercise 1-4


Concept: Dataflow

Which Express VI executes last?

DISCUSSION

I. Building a Simple VI

52

ni.com/training

Building a Simple VI

53

ni.com/training

Acquire Express VIs


DAQ Assistant Express VI
Instrument I/O Assistant Express VI
Simulate Signal Express VI
Read from Measurement File Express VI

54

ni.com/training

Analyze Express VIs


Amplitude and Level Measurements Express VI
Statistics Express VI

Spectral Measurements Express VI


Tone Measurements Express VI
Filter Express VI

55

ni.com/training

Present Express VIs and Indicators


Display Message Express VI

Play Waveform Express VI


Report Express VI
Write Measurement File Express VI

56

ni.com/training

Building and Running a VI


1.
2.
3.
4.

Place Express VI on the block diagram.


Configure the dialog box that opens.
Wire Express VIs together.
Save and run the VI.

The Run button appears broken when the VI you


are creating or editing contains errors.

57

ni.com/training

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.
58
GOAL

Group Exercise
Simple Acquire, Analyze, and Present Design

Which Express VI would you use for following tasks?


Acquiring a sine wave from a data acquisition device
Determining the average value
Logging data to a file
Displaying data to a graph
Displaying average value

DISCUSSION

Wrap-up

60

ni.com/training
60

You might also like