Floating Palettes


LabVIEW has three often-used floating palettes that you can place in a convenient spot on your screen: the Tools palette, the Controls palette, and the Functions palette. You can move them around by clicking on their title bar and dragging. Close them just like you would close any window in your operating system. If you decide you want them back, select the palette you want from the View menufor example, View>>Tools Palette opens the Tools palette.

Controls and Functions Palettes

You will be using the Controls palette a lot, because that's where you select the controls and indicators that you want on your front panel. You will probably use the Functions palette even more often, because it contains the functions and structures used to build a VI.

The Controls and Functions palettes are unique in several ways. Most importantly, the Controls palette is only visible when the front panel window is active, and the Functions palette is only visible when the block diagram window is active. Both palettes have subpalettes containing the objects you need to access. As you pass the cursor over each subpalette button in the Controls and Functions palettes, you will notice that the subpalette's name appears in a tip strip beneath the mouse pointer (see Figure 3.40).

Figure 3.40. Controls palette


To select an object in the subpalette, click the mouse button over the object, and then click on the front panel or block diagram to place it where you want it.

Palette Item Categories

At the top level of the palettes are several "Categories," such as Modern, System, Classic, Express, Addons, Favorites, and others. You can expand and close these categories, by clicking on them, to navigate the tree of items and subcategories that are available within the palette.

One great category is Favorites (this is only present on the Functions palette, not the Controls palette). You can use this to group together items that you access frequently. When you find a function, structure, VI, or subpalette that you really like, right-click on the object and select Add Item to Favorites from the shortcut menu. This will add the object to the Favorites category, for quick and easy access.

Showing and Hiding Palette Categories

You can choose which categories you want to appear on the Controls or Functions palettes by pressing the View button and then selecting categories from the Always Visible Categories submenu. If you want all of the categories to be visible, select the Show All Categories option from the Always Visible Categories submenu (see Figure 3.41).

Figure 3.41. The Always Visible Categories submenu of the palette View button


If a category is not selected in the Always Visible Categories, then you will not normally see it in the palette. However, you can temporarily display all of the categories by clicking on the double "down" arrows at the very bottom of the palette, as shown in Figure 3.42. You can hide those categories again by clicking on the double "up" arrows at the very bottom of the palette, as shown in Figure 3.43.

Figure 3.42. Functions palette with only the "always visible" categories visible


Figure 3.43. Functions palette with all categories visible


Reordering Palette Categories

You can reorder the palette categories by right-clicking on them and choosing Move this Category Up, Move this Category Down, or Move to Top (Expand by Default). Additionally, you can drag and drop the categories within the list by clicking on the two vertical grab-bars (||) to the left of the category text.

Palette View Formats

The way that you navigate the palettes can be changed by choosing a different palette View Format. Pressing the View button at the top of a palette will open a menu. In the View This Palette As submenu, you can choose from six different View Formats, as shown in Figure 3.44.

Figure 3.44. The View This Palette As submenu of the palette View button menu showing the currently selected (checked) palette view format


The following View Formats are available:

  • Category (Standard) is the default View Format, and the one shown throughout this book.

  • Category (Icons and Text), shown in Figure 3.45, is similar to Category (Standard), except that each item's name appears directly beneath its icon.

    Figure 3.45. "Category (Icons and Text)" palette view format

  • Icons, shown in Figure 3.46, is the format that most are familiar with from previous versions of LabVIEW. Each subpalette and item is represented by an icon. When you mouse-over an item, its name appears at the top of the palette.

    Figure 3.46. "Icons" palette view format

  • Icons and Text, shown in Figure 3.47, is similar to Icons, except that each item's name appears directly beneath its icon.

    Figure 3.47. "Icons and Text" palette view format

  • Text, shown in Figure 3.48, is minimal. It behaves like the Icons and Icons and Text formats, where clicking on a subpalette navigates down into that subpalette. Subpalettes are represented by folders with names, and items are represented by their name.

    Figure 3.48. "Text" palette view format

  • Tree, shown in Figure 3.49, is also minimal, having only folder icons and item names. However, it behaves more like the Category formats, having a tree hierarchy.

    Figure 3.49. "Tree" palette view format

The "Icons," "Icons and Text," and "Text" palette view formats all have an "up" button (see Figure 3.50), which, when pressed, returns you to the previous ("owning") palettesince these view formats are not a tree view. You can search for a specific item in a palette by clicking on the spyglass icon (see Figure 3.50).

Figure 3.50. The buttons at the top of each palette are used for navigation and configuration options.


There is another way to navigate palettes that some people find a little easier. Instead of each subpalette replacing the current palette, you can pass through subpalettes in a hierarchical manner without them replacing their parent palettes. You can do this by right-clicking (Windows) or control-clicking (Mac OS X) the subpalette icons (see Figure 3.51).

Figure 3.51. A floating subpalette created by right-clicking on a subpalette icon


Note that some subpalettes have subpalettes containing more objects; these are denoted by a little triangle in the upper-right corner of the icon and a raised appearance (see Figure 3.52). We'll discuss specific subpalettes and their objects in the next chapter.

Figure 3.52. Functions palette with two levels of floating subpalettes visible


The Controls and Functions palettes can also be accessed by popping up in an empty area of the front panel or block diagram. "Popping up" is defined as right-mouse-clicking. (On Mac OS X you can also pop up by <control>-clicking.) You can also pop up with the soon-to-be-discussed Pop-up tool.


The Thumbtack: "Pinning" Down Palettes

If you use a subpalette frequently, you may want to "tear it off" by releasing the mouse button over the thumbtack located at the upper left of the palettethe palette becomes pinned, meaning that it will remain open as a floating window until you close it. This thumbtack is available when you navigate hierarchically through palettes by right-clicking (Windows and Linux) or control-clicking (Mac OS X), as we just described. You now have a stand-alone window that you can position anywhere and then close when you're done with it. You can leave open as many subpalettes as you like.

When you pin a subpalette from a pop-up menu, it will be set to the Icon Palette View Format (which was described earlier) regardless of the Palette View Format of the palette it was created from.


Resizing (and Restoring) Palettes

You can resize a palette window, once it has been pinned (as described previously) and is floating freely, to suit your needs. After resizing a palette window, the Restore Palette Size button will appear in the toolbar at the top of the window (see Figure 3.53). Pressing this button will cause the palette window to resize to the default.

Restore Palette Size Button

Figure 3.53. A resized palette and the Restore Palette Size toolbar button


Customizing the Palettes

Because there are so many different objects on LabVIEW's numerous palettes, you may wish to customize your palettes. This section describes some of the ways you can do this.

Favorites

If you find that you are using certain functions or VIs often, you can make them more easily accessible by adding them to the Favorites category. You can add items to the Favorites category by right-clicking on the object and selecting Add Item to Favorites from the shortcut menu. You can remove items in the Favorites category, by right-clicking on the item within the Favorites category and selecting Remove Item from Favorites from the shortcut menu.

Editing the Palette

If LabVIEW's default organization of the Controls and Functions palettes doesn't fit your needs, you can customize them according to your whim. Access the palette editor by selecting Tools>>Advanced>>Edit Palette Set. . . from the menu. From here, you can customize the palettes by adding new subpalettes, hiding items, or moving them from one palette to another. For example, if you create a VI using trigonometric functions, you can place it in the existing Trigonometric subpalette for easy access. Editing the palettes is handy for placing your most frequently used functions at the top level for easy access and burying those pesky functions you never want to see again at the bottom of a subpalette.

User Libraries

If you have VIs that are shared across several projects, you can add them to the User Libraries palette category by placing them in the user.lib folder of the LabVIEW installation. LabVIEW will automatically add these VIs to the User Libraries category of the Functions palette. Similarly, custom controls placed in the user.lib folder will appear in the User Controls category of the Controls palette.

Tools Palette

A tool is a special operating mode of the mouse cursor. You use tools to perform specific editing and operation functions, similar to how you would use them in a standard paint program. The Tools palette (see Figure 3.54) is accessed from the View>>Tools Palette menu. From this palette you can select and configure tools.

Figure 3.54. Tools palette


Automatic Tool Selection allows LabVIEW to automatically choose the best tool from the Tools palette, depending on the location of your cursor relative to the object you are manipulating. You can disable automatic tool selection by clicking the Automatic Tool Selection button on the Tools palette, shown in Figure 3.54. Press the Automatic Tool Selection button on the Tools palette to enable automatic tool selection again. There is a LabVIEW option called Lock Automatic Tool Selection that locks your cursor to Automatic Tool Selection mode. If this option is enabled, then pressing the <Tab> key will not cycle through the various tools; rather it will enable the automatic tool selection again. If Lock Automatic Tool Selection is not enabled, then pressing the <Shift-Tab> key can be used enable automatic tool selection again after another tool was manually selected.

Automatic Tool Selection

The Operating tool lets you change values of front panel controls and indicators. You can operate knobs, switches, and other objects with the Operating toolhence the name. It is the only front panel tool available when your VI is running or in run mode (described shortly).

Operating Tool

The Positioning tool selects, moves, and resizes objects.

Positioning Tool

The Labeling tool creates and edits text labels.

Labeling Tool

The Wiring tool wires objects together on the block diagram. It is also used to assign controls and indicators on the front panel to terminals on the VI's connector.

Wiring Tool

The Color tool brightens objects and backgrounds by allowing you to choose from a multitude of hues. You can set both foreground and background colors by clicking on the appropriate color area in the Tools palette. If you pop up on an object with the Color tool, you can choose a hue from the color palette that appears.

Color Tool

The Pop-up tool opens an object's pop-up menu when you click on the object with it. You can use it to access pop-up menus instead of the standard method for popping up (right-clicking under Windows and Linux, and <control>-clicking on Mac OS X).

Pop-up Tool

The Scroll tool lets you scroll in the active window.

Scroll Tool

The Breakpoint tool sets breakpoints on VI diagrams to help you debug your code. It causes execution to suspend so you can see what is going on and change input values if you need to.

Breakpoint Tool

The Probe tool creates probes on wires so you can view the data traveling through them while your VI is running.

Probe Tool

Use the Color Copy tool to pick up a color from an existing object; then use the Color tool to paste that color onto other objects. This technique is very useful if you need to duplicate an exact shade but can't remember which one it was. You can also access the Color Copy tool when the Color tool is active by holding down the <control> key on Windows, <option> on Mac OS X, and <alt> on Linux.

Color Copy Tool

If the LabVIEW option Lock Automatic Tool Selection is not active, you can use the <tab> key to tab through the Tools palette instead of clicking on the appropriate tool button to access a particular tool. Or press the spacebar to toggle between the Operating tool and the Positioning tool when the panel window is active and between the Wiring tool and the Positioning tool when the diagram window is active. The <tab> and spacebar shortcuts cycle through the most frequently used tools for your conveniencetry using them, and see if they don't save you time!

You can also access a temporary copy of the Tools palette by pop-up clicking (<shift>-right click for Windows and Linux, and <control-shift>-click on Mac OS X).


Automatic Tool Selection

When Automatic Tool Selection is enabled, the cursor will appear as a cross with a small dot in the upper-right quadrant, as shown in Figure 3.55.

Figure 3.55. Mouse cursor with Automatic Tool Selection enabled


As you move the cursor over an object, it will change to the tool most appropriate for the job, based on the location of the cursor over the object being manipulated.

For example, if you move the cursor over the outer edge of numeric control, the cursor will become the Positioning tool (see Figure 3.56).

Positioning Tool

Figure 3.56. Automatic Tool Selection of the Positioning tool


If you move the cursor over the increment or decrement button of the numeric control, the cursor will become the Operating tool, allowing you to change the value of the numeric (see Figure 3.57).

Operating Tool

Figure 3.57. Automatic Tool Selection of the Operating tool


If you move the cursor over the text area of the numeric control, it will change to the Labeling tool, allowing you to edit the value using the keyboard (see Figure 3.58).

Labeling Tool

Figure 3.58. Automatic Tool Selection of the Labeling tool





LabVIEW for Everyone. Graphical Programming Made Easy and Fun
LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
ISBN: 0131856723
EAN: 2147483647
Year: 2006
Pages: 294

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net