Summary: In this section, you will learn about the LabVIEW environment.
When you launch LabVIEW, the navigation dialog box appears that includes introductory material and common commands.
![]() |
The LabVIEW dialog box includes the following components:
File>>Exit.
New button to create a new
VI. Click the arrow on the New button to
choose to open a blank VI or to open the New
dialog box.
Open button to open an existing
VI. Click the arrow on the Open button to
open recent files.
Configure button to configure your
data acquisition devices. Click the arrow on the
Configure button to configure LabVIEW.
Help button to launch the
LabVIEW Help. Click the arrow on the
Help button for other Help options, including
the NI Example Finder.
When you click the New button in the
LabVIEW dialog box, the New dialog
box appears. You also can select File>>New to
display this dialog box. When you select a template in the
Create new list, previews of the VI appear in the
Front panel preview and the Block diagram
preview sections, and a description of the template
appears in the Description section. Figure 2 shows the New dialog box and the
SubVI with Error Handling VI template.
![]() |
Click the OK button to open the template. You
also can double-click the name of the template VI in the
Create new list to open the template. If no
template is available for the task you want to create, you can
start with a blank VI and create a VI to accomplish the
specific task. In the LabVIEW dialog box, click
the arrow on the New button and select
Blank VI from the shortcut menu or press the
Ctrl-N keys to open a blank VI.
Blank
VI from the Create new list in the
New dialog box or by selecting File>>New
VI.
Use the New dialog box to create different
components in LabVIEW to help you build an application. You
can start with a blank VI to write a VI from scratch, or
start with a template to simplify the programming. The
New dialog box includes the following
components:
OK
button to start building a VI or other LabVIEW document.
Browse dialog box so you can navigate to a
VI, control, or template. If you previously have browsed
for and selected a template from this dialog box, use the
pull-down menu of the Browse button to select
a template to reopen it.
Create
new list.
Create new list.
Create new list
if the template includes a description.
You load a VI into memory by selecting
File>>Open. In the Choose the VI to
open dialog box that appears, navigate to the VI you
want to open.
The VIs you edit in this course are located in the
C:\Exercises\LabVIEW Basics I directory.
As the VI loads, a status dialog box similar to Figure 3 might appear.
![]() |
The Loading section lists the subVIs of the VI
as they are loaded into memory. Number Loaded
is the number of subVIs loaded into memory so far. You can
cancel the load at any time by clicking the
Stop button.
If LabVIEW cannot immediately locate a subVI, it begins
searching through all directories specified by the VI
Search Path. You can edit the VI Search
Path by selecting Tools>>Options and
selecting Paths from the top pull-down
menu. The Searching section lists directories
or VIs as LabVIEW searches through them. You can have
LabVIEW ignore a subVI by clicking the Ignore
SubVI button, or you can click the
Browse button to search for the missing subVI.
Select Save, Save As, Save
All, or Save with Options from the
File menu to save VIs as individual files or
group several VIs together and save them in a VI library. VI
library files end with the extension
.llb. National Instruments recommends that you
save VIs as individual files, organized in directories,
especially if multiple developers are working on the same
project.
LabVIEW uses the native file dialog boxes so they act
similar to other applications on the computer. You can
disable this feature by selecting
Tools>>Options and selecting
Miscellaneous from the top pull-down menu. If
you disable native file dialogs, LabVIEW uses its own
platform-independent file dialog boxes with some convenient
features, such as providing a list of recent paths and
reducing the steps necessary to save VIs in VI libraries.
You can transfer VIs from one platform to another, such as from Mac OS to Windows. LabVIEW automatically translates and recompiles the VIs on the new platform.
Because VIs are files, you can use any file transfer method or utility to move VIs between platforms. You can port VIs over networks using FTP, Z or XModem protocols, or similar utilities. Such network transfers eliminate the need for additional file translation software. If you port VIs using magnetic media, such as floppy disks or a moveable external hard drive, you need a generic file transfer utility program, such as the following:
Refer to the Porting and Localizing LabVIEW VIs
Application Note, available by selecting Help>>Search
the LabVIEW Bookshelf, for more information about
porting VIs.
The menus at the top of a VI window contain items common to
other applications, such as Open,
Save, Copy, and Paste,
and other items specific to LabVIEW. Some menu items also list
shortcut key combinations.
(Mac OS) The menus appear at the top of the screen.
(Windows and UNIX)
The menus display only the most recently used items by
default. Click the arrows at the bottom of a menu to display
all items. You can display all menu items by default by
selecting Tools>>Options and selecting
Miscellaneous from the top pull-down menu.
File menu contains items used for basic
file operations, such as opening, closing, saving, and
printing files.
Edit menu contains items that allow you to
search for and modify LabVIEW files and their components.
Operate menu contains items you use to
control the operation of VIs.
Tools menu contains items for configuring
LabVIEW, your projects, and your VIs.
Browse menu contains items that allow you
to view aspects of the current VI and its hierarchy.
Window menu contains items that allow you
to configure the appearance of the current windows and
palettes. You also can access the Error List
window and view the contents of the clipboard.
Help menu contains items to explain and
define LabVIEW features and other components, provide full
LabVIEW documentation, and access National Instruments
technical support.
When you open a blank VI, an untitled front panel window appears. This window displays the front panel and is one of the two LabVIEW windows you use to build a VI. The other window contains the block diagram. The illustration in Figure 4 shows a front panel and its corresponding block diagram with front panel and block diagram components.
![]() |
Use the toolbar buttons to run and edit a VI. The toolbar in Figure 5 appears on the front panel.
![]() |
Click the
Run button to run a VI. LabVIEW compiles the VI,
if necessary. You can run a VI if the Run button appears as a
solid white arrow. The solid white arrow, shown above, also
indicates you can use the VI as a subVI if you create a
connector pane for the VI.
While the VI runs,
the Run button appears as shown at left if the VI
is a top-level VI, meaning it has no callers and therefore is
not a subVI.
If the VI that
is running is a subVI, the Run button appears as
shown at left.
The
Run button appears broken, shown at left, when
the VI you are creating or editing contains errors. If the
Run button still appears broken after you finish
wiring the block diagram, the VI is broken and cannot
run. Click this button to display the Error list
window, which lists all errors and warnings.
Click the
Run Continuously button, shown at left, to run
the VI until you abort or pause execution. You also can click
the button again to disable continuous running.
While the VI
runs, the Abort Execution button, shown at left,
appears. Click this button to stop the VI immediately if there
is no other way to stop the VI. If more than one running
top-level VI uses the VI, the button is dimmed.
Abort Execution button to stop a
VI. Either let the VI complete its data flow or design a
method to stop the VI programmatically. By doing so, the VI is
at a known state. For example, place a button on the front
panel that stops the VI when you click it.
Click the
Pause button, shown at left, to pause a running
VI. When you click the Pause button, LabVIEW
highlights on the block diagram the location where you paused
execution, and the Pause button appears
red. Click the button again to continue running the VI.
Select the
Text Settings pull-down menu, shown at left, to
change the font settings for the selected portions of the VI,
including size, style, and color.
Select the
Align Objects pull-down menu, shown at left, to
align objects along axes, including vertical, top edge, left,
and so on.
Select the
Distribute Objects pull-down menu, shown at left,
to space objects evenly, including gaps, compression, and so
on.
Select the
Resize Objects pull-down menu, shown at left, to
resize multiple front panel objects to the same size.
Select the
Reorder pull-down menu, shown at left, when you
have objects that overlap each other and you want to define
which one is in front or back of another. Select one of the
objects with the Positioning tool and then select from
Move Forward, Move Backward,
Move To Front, and Move To Back.
Select the
Show Context Help Window button, shown at left,
to toggle the display of the Context Help window.
Type
appears to remind you that a new value is available to replace
an old value. The Enter button disappears when you click it,
press the Enter key, or click the front panel or
block diagram workspace.
When you run a VI, buttons appear on the block diagram toolbar that you can use to debug the VI. The toolbar in Figure 6 appears on the block diagram.
![]() |
Click the
Highlight Execution button, shown at left, to
display an animation of the block diagram execution when you
click the Run button. see the flow of data
through the block diagram. Click the button again to disable
execution highlighting.
Click the
Step Into button, shown at left, to open a node
and pause. When you click the Step Into button
again, it executes the first action and pauses at the next
action of the subVI or structure. You also can press the
Ctrl and down arrow keys. Single-stepping through
a VI steps through the VI node by node. Each node blinks to
denote when it is ready to execute. By stepping into the node,
you are ready to single-step inside the node.
Click the
Step Over button, shown at left, to execute a
node and pause at the next node. You also can press the
Ctrl and right arrow keys. By stepping over the
node, you execute the node without single-stepping through the
node.
Click the
Step Out button, shown at left, to finish
executing the current node and pause. When the VI finishes
executing, the Step Out button becomes
dimmed. You also can press the Ctrl and up arrow
keys. By stepping out of a node, you complete single-stepping
through the node and go to the next node.
The
Warning button, shown at left, appears if a VI
includes a warning and you placed a checkmark in the
Show Warnings checkbox in the Error
List window. A warning indicates there is a potential
problem with the block diagram, but it does not stop the VI
from running.
LabVIEW has graphical, floating palettes to help you create
and run VIs. The three palettes include the
Tools, Controls, and
Functions palettes. You can place these palettes
anywhere on the screen.
You can create, modify, and debug VIs using the tools
located on the floating Tools
palette. The Tools palette is available on both
the front panel and the block diagram. A tool is a special
operating mode of the mouse cursor. The cursor corresponds
to the icon of the tool selected in the Tools
palette. Use the tools to operate and modify front panel and
block diagram objects.
Select Window>>Show Tools Palette to display
the Tools palette.
Shift key and right-click to display
a temporary version of the Tools palette at the
location of the cursor.
![]() |
If automatic tool selection is enabled and you move the
cursor over objects on the front panel or block diagram,
LabVIEW automatically selects the corresponding tool from
the Tools palette. You can disable automatic
tool selection and select a tool manually by clicking the
tool you want on the Tools palette.
If you want to
use the Tab key to cycle through the four most
common tools on the Tools palette, click the
Automatic Tool Selection button, shown at left,
on the Tools palette to disable automatic tool
selection. Press the Shift-Tab keys or click
the Automatic Tool Selection button to enable
automatic tool selection again. You also can manually select
a tool on the Tools palette to disable
automatic tool selection. Press the Tab or
Shift-Tab keys or click the Automatic
Tool Selection button on the Tools
palette to enable automatic tool selection again. If
automatic tool selection is disabled, you can press the
spacebar to switch to the next most useful tool.
Use the Operating
tool, shown at left, to change the values of a control or
select the text within a control. The Operating tool changes
to the icon shown at left when it moves over a text control,
such as a numeric or string control.
Use the
Positioning tool, shown at left, to select, move, or resize
objects. The Positioning tool changes to resizing handles
when it moves over the edge of a resizable object.
Use the
Labeling tool, shown at left, to edit text and
create free labels. The Labeling tool changes
to the following icon when you create free labels.
Use the
Wiring tool, shown at left, to wire objects
together on the block diagram.
Use the
Object Shortcut Menu, shown at left, tool to
access an object shortcut menu with the left mouse button.
Use the
Scrolling tool, shown at left, to scroll
through windows without using scrollbars.
Use the
Breakpoint tool, shown at left, to set
breakpoints on VIs, functions, nodes, wires, and structures
to pause execution at that location.
Use the
Probe tool, shown at left, to create probes on
wires on the block diagram. Use the Probe tool
to check intermediate values in a VI that produces
questionable or unexpected results.
Use the
Color Copy tool, shown at left, to copy colors
for pasting with the Coloring tool.
Use the
Coloring tool, shown at left, to color an
object. It also displays the current foreground and
background color settings.
The Controls and Functions
palettes contain subpalettes of objects you can use to
create a VI. When you click a subpalette icon, the entire
palette changes to the subpalette you selected. To use an
object on the palettes, click the object and place it on the
front panel or block diagram.
The Controls palette, shown in Figure 8, is available only on the front panel. The
Controls palette contains the controls and
indicators you use to build the front panel. Refer to the
Front Panel section for more
information about the using the Controls
palette on the front panel. The controls and indicators
located on the Controls palette depend on the
palette view currently selected.
![]() |
The Functions palette, shown in the Figure 9, is available only on the block diagram. The
Functions palette contains the VIs and
functions you use to build the block diagram. Refer to the
Block Diagram section of this
lesson for more information about using the
Functions palette on the block diagram. The VIs
and functions located on the Functions palette
depend on the palette view currently selected. The VIs and
functions are located on subpalettes based on the types of
VIs and functions.
![]() |
Use the Options button on the
Controls or Functions palette
toolbar to change to another palette view or format:
Click the
Options button, shown at left, on the
Controls or Functions palette
toolbar to display the
Controls/Functions Palettes page
of the Options dialog box.
Palette View
pull-down menu.
Format pull-down
menu, such as Standard, All
Icons, All Text, or Icons and
Text.
OK button. The
Controls and Functions palettes
change to the palette view and format you selected.
Use the following navigation buttons on the
Controls and Functions palettes to
navigate and search for controls, VIs, and functions:
Navigates up one
level in the palette hierarchy.
Changes the palette to search mode. In search mode, you
can perform text-based searches to locate controls, VIs,
or functions on the palettes.
For example, if you want to find the Random
Number function, click the Search
button on the Functions palette toolbar and
start typing Random Number in the text box at
the top of the palette. LabVIEW lists all matching items
that either start with or contain the text you typed. You
can click one of the search results and drag it to the
block diagram, as shown in Figure 10.
![]() |
Double-click the search result to highlight its location on
the palette. You then can click the Up to Owning
Palette button to view the hierarchy of where the
object resides.
The most often-used menu is the object shortcut menu. All LabVIEW objects and empty space on the front panel and block diagram have associated shortcut menus. Use the shortcut menu items to change the look or behavior of front panel and block diagram objects. To access the shortcut menu, right-click the object, front panel, or block diagram. The shortcut menu for a meter is shown in Figure 11.
![]() |
Front panel objects also have property dialog boxes that you
can use to change the look or behavior of front panel
objects. Right-click a front panel object and select
Properties from the shortcut menu to access the
property dialog box for an object. Figure 12
shows the property dialog box for the meter in the previous
figure. The options available on the property dialog box for
an object are similar to the options available on the
shortcut menu for that object.
![]() |
"A full introductory course on programming with LabVIEW."