Vous êtes sur la page 1sur 24

LabVIEW Training Days

Introduction to LabVIEW 2009

ni.com/training
Agenda

TOPICS
A. Virtual Instruments (VIs) F. Shift Register
B. Front Panel/Block G. Case structure
Diagram H. State Machine design
C. Dataflow I. LabVIEW toolkits &
D. LabVIEW Project module
E. While loop J. Where to find information
ni.com/training
A. Virtual Instruments (VIs)

Virtual Instrument (VI) – A LabVIEW


program

The appearance and operation of VIs imitate physical instruments,


such as oscilloscopes and digital multimeters.

ni.com/training
B. Parts of a VI

LabVIEW VIs contain three main components:


1. Front Panel 2. Block Diagram 3. Icon/Connector Pane

ni.com/training
B. Parts of a VI – Front Panel

Front Panel – User interface for the VI

You build the front panel


with controls (inputs) and
indicators (outputs)

ni.com/training
B. Parts of a VI – Block Diagram

Block Diagram – Contains the


graphical source code

Front panel objects


appear as terminals on
the block diagram

ni.com/training
B. 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 is inside of another VI
− Similar to a function in a text-based programming
language
Icon Connector Pane

ni.com/training
B. Starting a VI

Demonstrate using the


Getting Started dialog
box and the New dialog
box to start a VI.

ni.com/training
B. Front Panel – Controls Palette
• Contains the controls and indicators you use to
create the front panel
• Access from the front panel by selecting
View»Controls Palette

ni.com/training
B. Block Diagram – Functions Palette
Contains the VIs, functions, and constants
you use to create the block diagram

ni.com/training
C. Dataflow
LabVIEW follows a dataflow model for running VIs
• 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 finishes execution

ni.com/training
D. Project Explorer
Use LabVIEW Projects to:
• Group LabVIEW files and non-LabVIEW files
• Create build specifications
• Deploy or download files to targets

ni.com/training
E. While Loops

Repeat (code);
Until Condition met;
End;

LabVIEW While Loop Flowchart Pseudo Code

ni.com/training
E. While Loops

• Iteration terminal: returns number of times loop has


executed; zero indexed
• Conditional terminal: defines when the loop stops

Iteration Terminal Conditional Terminal

ni.com/training
E. While Loops – Tunnels

• Tunnels transfer data into and out of structures


• The tunnel adopts the color of the data type wired to the
tunnel
• Data pass out of a loop after the loop terminates
• When a tunnel
passes data into
a loop, the loop
executes only
after data arrive
at the tunnel

ni.com/training
F. Iterative Data Transfer

• When programming with loops, you often need to know the


values of data from previous iterations of the loop
• Shift registers transfer values from one loop iteration to the
next

ni.com/training
G. Case Structures
• Have two or more subdiagrams or cases
• Execute and displays only one case at a time
• An input value determines which subdiagram to execute
• Similar to c a s e statements or i f . . . t h e n . .. e ls e
statements in text-based programming languages

ni.com/training
G. Case Structures – Enum
• Gives users a list of items from which to select
• The case selector displays a case for each item in the
enumerated type control

ni.com/training
H. State Machines

• The state machine design pattern implements a state


diagram or flow chart
• When to use state machines?
− Commonly used to create user interfaces, where different user
actions send the user interface into different states
− Commonly used for process tests, where a state represents
each segment of the process

ni.com/training
H. State Machines – Infrastructure

• A state machine consists of a set of states and a transition


function that maps to the next state
• Each state can lead to one or multiple states or end the
process flow

While Loop

Shift Register Case Structure ni.com/training


Try the LabVIEW Platform
Try the 30-days full trial version of LabVIEW and more than 25 addon included

LabVIEW Development System Real-Time Execution Trace Toolkit


LabVIEW SignalExpress Real-Time Module
Adaptive Filter Toolkit Report Generation Toolkit for Microsoft Office
Advanced Signal Processing Toolkit Simulation Interface Toolkit
Control Design and Simulation Module SoftMotion Module
Database Connectivity Toolkit Sound and Vibration Suite
DataFinder Toolkit Statechart Module
Datalogging and Supervisory Control Module System Identification Toolkit
Desktop Execution Trace Toolkit Touch Panel Module
Digital Filter Design Toolkit Unit Test Framework Toolkit
FPGA Module VI Analyzer Toolkit
Internet Toolkit Vision Development Module
MathScript RT Module
Microprocessor SDK Also includes…
Mobile Module NI Device Drivers
NI Motion Assistant
PID Control Toolkit
ni.com/trylabview
ni.com/training
LabVIEW Core Training Path
New User Experienced User
LabVIEW Core 1 LabVIEW Core 3 Managing Software
Engineering in LabVIEW
LabVIEW Core 2
Skills learned: LabVIEW OOP System
• Modular application Design
Skills learned:
• LabVIEW environment development Advanced Architectures
navigation • Structured design and in LabVIEW
• Dataflow programming development practices
Skills learned:
• Use of common design • Inter-application • Manage a LabVIEW project from
techniques communication and design to deployment

• Event driven programming connectivity techniques • Object-oriented programming for


LabVIEW
• Programmatic UI control • Develop scalable applications and
reusable code
Certifications • Advanced design patterns for LabVIEW

Certified LV Associate Certified LabVIEW Certified LabVIEW


Developer Exam Developer Exam Architect Exam
Skills tested: Skills tested: Skills tested:
• LabVIEW environment • LabVIEW application • LabVIEW application
knowledge development expertise development mastery

ni.com/training
National Instruments
On-line Courses

Benefits
• Live certified Instructors
• Students can interact by microphone and chat
• Access to a remote PC with SW & HW for exercises
• Professional training without travel cost and at a lower price
• 4 hour per day format (morning or afternoon)

ni.com/training
Grazie per aver partecipato

Per maggiori informazioni sui corsi di formazione:


www.ni.com/training/i
Phone: 02/41309217
E-mail: italy.service@ni.com

ni.com/training

Vous aimerez peut-être aussi