Sunteți pe pagina 1din 17

LabVIEW programming, part I

Introduction of virtual instrumentation and


LabVIEW
Three part of virtual instrumentation: front panel,
block diagram and connector pane.
Three LabVIEW palette: control palette, function
palette and tools palette.
LabVIEW controls and indicators on front panel
and block diagram.
Data flow in LabVIEW

BME313 Virtual Bioinstrumentation

Instructor: Wei

Introduction of virtual instrumentation and


LabVIEW
Virtual instrumentation can be defined as:
A layer of software and/or hardware added to
a general purpose computer in such a fashion
that users can interact with the computer as
though it were their own custom-designed
traditional electronic instrument.
From Virtual Bio-instrumentation by Jon B. Olansen and Eric Rosow

BME313 Virtual Bioinstrumentation

Instructor: Wei

Introduction of virtual instrumentation and


LabVIEW
Hardware:
Data acquisition hardware
Image acquisition hardware
Instrumentation control hardware

Software develop tool:


Any programming languages (c/c++, Visual
BASIC)
LabVIEW
BME313 Virtual Bioinstrumentation

Instructor: Wei

Data Acquisition Hardware


Examples from National Instruments

BME313 Virtual Bioinstrumentation

Instructor: Wei

Image Acquisition Hardware


Example from National Instruments

BME313 Virtual Bioinstrumentation

Instructor: Wei

Instrumentation control hardware


Examples from National Instruments

GPIB/IEEE488 Instrument control

BME313 Virtual Bioinstrumentation

Instructor: Wei

LabVIEW Introduction
http://www.ni.com/labview

LabVIEW Development System.


LabVIEW for PDA device
LabVIEW Real-time
LabVIEW for FPGA
LabVIEW for Machine Vision

BME313 Virtual Bioinstrumentation

Instructor: Wei

LabVIEW Programs Are Called Virtual


Instruments (VIs)
Front Panel
Controls = Inputs
Indicators = Outputs

Block Diagram
Accompanying program
for front panel
Components wired
together

BME313 Virtual Bioinstrumentation

Instructor: Wei

VI Front Panel
Front Panel
Toolbar

Icon

Boolean
Control

Graph
Legend

Waveform
Graph
Scale
Legend

Plot
Legend

BME313 Virtual Bioinstrumentation

Instructor: Wei

VI Block Diagram
Block
Diagram
Toolbar

Divide
Function

SubVI
Graph
Terminal
Wire
Data

While Loop
Structure

Numeric
Constant

Timing
Function

BME313 Virtual Bioinstrumentation

Boolean Control
Terminal

Instructor: Wei

Tools Palette
Floating Palette
Used to operate and modify
front panel and block diagram
objects.
Automatic Selection Tool
Operating Tool

Scrolling Tool

Positioning/Resizing Tool

Breakpoint Tool

Labeling Tool

Probe Tool

Wiring Tool

Color Copy Tool

Shortcut Menu Tool

Coloring Tool

BME313 Virtual Bioinstrumentation

Instructor: Wei

Controls and Functions Palettes


Controls Palette

(Front Panel Window)

Functions Palette

(Block Diagram Window)

BME313 Virtual Bioinstrumentation

Instructor: Wei

Create the Connector


Right click on the icon pane (front panel only)

BME313 Virtual Bioinstrumentation

Instructor: Wei

Assign Terminals

BME313 Virtual Bioinstrumentation

Instructor: Wei

Status Toolbar
Run Button
Continuous Run Button
Abort Execution

Additional Buttons on
the Diagram Toolbar

Pause/Continue Button
Text Settings
Align Objects
Distribute Objects

Execution Highlighting
Button
Step Into Button
Step Over Button
Step Out Button

Reorder
Resize front panel
objects
BME313 Virtual Bioinstrumentation

Instructor: Wei

Data flow in LabVIEW


The LabVIEW is executed when all the data at
its inputs are available. The data flow
determines the execution sequence of LabVIEW
program.

BME313 Virtual Bioinstrumentation

Instructor: Wei

Homework Assignment
What are the three main parts of a VI and
their functions?
What are the three palettes and their
functions?
How does LabVIEW program execute?
What is the difference between controls
and indicators?

BME313 Virtual Bioinstrumentation

Instructor: Wei

S-ar putea să vă placă și