l2 Labview Programming I
l2 Labview Programming I
LabVIEW programming I
LabVIEW basics
Spring 2013 Lecture #2
Bekkeng 8.1.2013
Virtual Instruments
LabVIEW programs are called virtual instruments, or VIs, because their appearance and operation imitate physical instruments, such as oscilloscopes and multimeters.
A LabVIEW program has the file ending *.vi, e.g. test.vi
LabVIEW contains a comprehensive set of tools for acquiring, analyzing, displaying, and storing data, as well as tools to help you troubleshoot code you write. In LabVIEW a VI is:
A LabVIEW program when it is the top-file A SubVI when a VI is used in another VI A SubVI is similar to a function in other programming languages
LabVIEW Start up
Click Blank VI or select File New VI
The front panel is the user interface (GUI) of a VI. You build the front panel by using controls and indicators
Tools palette
Used on Block Diagram & Front Panel
Write Text
LabVIEW demo
Express VI
LabVIEW demo
Indicators
Control
LabVIEW - Indicators
Select the wiring tool
Right-click the VIs I/O connections
Front Panel
Block Diagram
LabVIEW - Controls
Right-click the While Loops stop symbol
Front Panel
Block Diagram
Right-click
LabVIEW demo
Integer
String Dynamic Boolean
The dynamic data type is a special type for use with Express VIs. Because dynamic data undergoes an automatic conversion to match the indicator to which it is wired, Express VIs can slow down the block diagram execution speed
Use the Convert from/to Dynamic Data Express VI to convert dynamic data to/from numeric, Boolean, waveform, and array data for use with other VIs and functions
While Loop:
Loops
Functions Programming Structures:
For Loop:
Start (RUN) program button Program Running indicator Broken arrow error in program Abort Execution button
Single-stepping
Probe
Right-click wire
Breakpoints
LabVIEW demo
LabVIEW Help I
Select HelpShow Context Help from the front panel or the block diagram Move the cursor over to the graphical symbol to see the help information Very useful when looking at functions in the Functions palette:
LabVIEW demo
LabVIEW Help II
NI Example Finder
Search or browse through example programs Modify an existing example program to fit your application Copy and paste from an example into your own program
Getting Started with LabVIEW pdf file LabVIEW Fundamentals pdf file