Common Tools in LabVIEW

Included in the Section

In a graphical programming language such as LabVIEW software, the mouse is the main way to interact with the programming environment. That said, the mouse pointer must be able to accomplish many different tasks, such as selecting, wiring, highlighting text, and so on. This module examines not only the many functions that the mouse can accomplish in LabVIEW but also how to go about completing those tasks.

This module also covers a few other important ways of modifying your VIs: shortcut menus, property dialogs and the toolbar.

Selecting a Tool

You can create, modify, and debug VIs using the tools provided by LabVIEW. A tool is a special operating mode of the mouse cursor. The operating mode of the cursor corresponds to the icon of the tool selected. LabVIEW selects this tool based on the current location of the mouse.

Figure 1. Tools Palette

You can manually choose the tool you need by selecting it on the Tools palette. Select View»Tools Palette to display the Tools palette.

Automatic Tool Selector

The top item in the Tools palette is the Automatic Tool Selection button. When you select this, LabVIEW automatically chooses a tool based on the location of your cursor. You can turn off automatic tool selection by deselecting the item or by selecting another item in the palette.

If you were to compare the tools in LabVIEW to common household tools, the individual tools listed below would represent a screwdriver, knife, and corkscrew, and the automatic tool selector would be a Swiss army knife that is capable of accomplishing all tasks.

Figure 2.Individual Tools and Automatic Tool Selector

Listed below are some of the more common tools that you encounter in LabVIEW. Note that when the Automatic Tool Selection button is enabled, the mouse changes into one of the following tools to accomplish the most common tasks in LabVIEW.

Operating Tool

Use the Operating tool to change the values of a control. For example, in Figure 3 the Operating tool moves the pointer on the Horizontal Pointer Slide. When the mouse hovers over the pointer, the cursor automatically accesses the Operating tool.

Figure 3. Using the Operating Tool

The Operating tool is mostly used on the front panel window, but you also can use the Operating tool on the block diagram window to change the value of a Boolean constant.

Positioning Tool

Use the Positioning tool to select or resize objects. For example, in Figure 4 the Positioning tool selects the Number of Measurements numeric control. After selecting an object, you can move, copy, or delete the object. When the mouse hovers over the edge of an object, the cursor automatically accesses the Positioning tool.

Figure 4. Using the Positioning Tool to Select an Object

If the mouse hovers over a resizing node of an object, the cursor mode changes to show that you can resize the object, as shown in Figure 5. Notice that the cursor is hovering over a corner of the XY Graph at a resizing node, and the cursor mode changes to a double-sided arrow.

Figure 5. Using the Positioning Tool to Resize an Object

You can use the Positioning tool on both the front panel window and the block diagram.

Labeling Tool

Use the Labeling tool to enter text in a control, to edit text, and to create free labels. For example, in Figure 6 the Labeling tool enters text in the Number of Measurements numeric control. When the mouse hovers over the interior of the control, the cursor automatically accesses the Labeling tool. Click once to place a cursor inside the control. Then double-click to select the current text.

Figure 6. Using the Labeling Tool

When you are not in a specific area of a front panel window or block diagram window that accesses a certain mouse mode, the cursor appears as cross-hairs. If automatic tool selection is enabled, you can double-click any open space to access the Labeling tool and create a free label.

Wiring Tool

Use the Wiring tool to wire objects together on the block diagram. For example, in Figure 7, the Wiring tool wires the Number of Measurements terminal to the count terminal of the For Loop. When the mouse hovers over the exit or entry point of a terminal or over a wire, the cursor automatically accesses the Wiring tool.

Figure 7. Using the Wiring Tool

The Wiring tool works mainly with the block diagram window and when you create a connector pane on the front panel window.

Other Tools Accessed from the Palette

You can access the following additional tools on the palette:

Use the Object Shortcut Menu tool to access an object shortcut menu with the left mouse button. You also can access this menu by right-clicking any object in LabVIEW.

Use the Scrolling tool to scroll through windows without using scrollbars.

Use the Breakpoint tool to set breakpoints on VIs, functions, nodes, wires, and structures to pause execution at that location.

Use the Probe tool to create probes on wires on the block diagram. Also use the Probe tool to check intermediate values in a VI that produces questionable or unexpected results.

Use the Coloring tool to color an object. The Coloring tool also displays the current foreground and background color settings.

Use the Get Color tool to copy colors for pasting with the Coloring tool.

Shortcut Menus

All LabVIEW objects have associated shortcut menus, also known as context menus, pop-up menus, and right-click menus. As you create a VI, use the shortcut menu items to change the appearance or behavior of front panel and block diagram objects. To access the shortcut menu, right-click the object.

Figure 8. Shortcut Menu for a Meter

Property Dialog Boxes

Objects in the front panel window also have property dialog boxes that you can use to change the look or behavior of the objects. Right-click an object and select Properties from the shortcut menu to access the property dialog box for an object. Figure 9 shows the property dialog box for the meter shown in Figure 8. The options available on the property dialog box for an object are similar to the options available on the shortcut menu for that object.

Figure 9. Property Dialog Box for a Meter

You can select multiple objects on the front panel or the block diagram and edit any properties the objects share. To select multiple objects, use the Positioning tool to drag a selection rectangle around all of the objects you want to edit or hold down the <Shift> key while clicking each object. Right-click an object from the selection and select Properties from the shortcut menu to display the Properties dialog box. The Properties dialog box only displays tabs and properties that the objects you select share. Select similar objects to display more tabs and properties. If you select objects that do not share any common properties, the Properties dialog box does not display any tabs or properties.

Front Panel Window Toolbar

Each window has a toolbar associated with it. Use the front panel window toolbar buttons to run and edit the VI.

The following toolbar appears on the front panel window.

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, as shown at left. The solid white arrow 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 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 appearance changes as shown.

The Run button appears broken 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 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 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.

Caution: The Abort Execution button stops the VI immediately, before the VI finishes the current iteration. Aborting a VI that uses external resources, such as external hardware, might leave the resources in an unknown state by not resetting or releasing them properly. Design VIs with a stop button to avoid this problem.

Click the Pause button 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 Pause button again to continue running the VI.

Select the Text Settings pull-down menu to change the font settings for the selected portions of the VI, including size, style, and color.

Select the Align Objects pull-down menu to align objects along axes, including vertical, top edge, left, and so on.

Select the Distribute Objects pull-down menu to space objects evenly, including gaps, compression, and so on.

Select the Resize Objects pull-down menu to resize multiple front panel objects to the same size.

Select the Reorder pull-down menu 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.

The LabVIEW search can locate information in the LabVIEW Help, in the Controls and Functions palettes, and from NI support, community support, downloads, and product information sections on You can configure which categories you want LabVIEW to search by selecting Tools»Options and selecting Search from the Category list. 

Select the Show Context Help Window button to toggle the display of the Context Help window.

Enter Text appears to remind you that a new value is available to replace an old value. The Enter Text button disappears when you click it, press the <Enter> key, or click the front panel or block diagram workspace.

Block Diagram Window Toolbar

Click the Clean Up Diagram button to automatically reroute all existing wires and rearrange objects on the block diagram to generate a cleaner layout. To configure the clean up options, select Tools»Options to display the Options dialog box and select Block Diagram: Cleanup from the Category list.

The other buttons unique to the block diagram toolbar are primarily used for troubleshooting and are covered in the Debugging Tools document

Learn LabVIEW Basics in a New Way

Learn these LabVIEW concepts though our new, interactive experience.

Continue Learning

Prev Dataflow Programming Basics
Debugging Tools in LabVIEW Next