Flylib.com

Books Software

 
 
 

Chapter 3. The LabVIEW Environment


3. The LabVIEW Environment

Overview

Key Terms

Front Panels

Block Diagrams

LabVIEW Projects

SubVIs, the Icon, and the Connector

Activity 3-1: Getting Started

Alignment Grid

Pull-Down Menus

Floating Palettes

The Toolbar

Pop-Up Menus

Help!

Express VIs

Displaying SubVIs as Expandable Nodes

A Word About SubVIs

Activity 3-2: Front Panel and Block Diagram Basics

Wrap It Up!



Overview

In this chapter, you will investigate the LabVIEW VI and learn how its three partsthe front panel, block diagram, and icon/connectorwork together. When all three main components are properly developed, you have a VI that can stand alone or be used as a subVI in another program. You will also learn about the LabVIEW environment: the LabVIEW Project Explorer, pull-down and pop-up menus , floating palettes and subpalettes, the Toolbar, and how to get help. To finish up, we will discuss the power of subVIs and why you should use them.

Goals

  • Understand and practice using the front panel, block diagram, and icon/connector

  • Learn the difference between controls and indicators

  • Be able to recognize the difference between the block diagram terminals of controls and indicators

  • Understand the principle of dataflow programming

  • Learn about the LabVIEW Project Explorer and how to manage your project files

  • Become familiar with LabVIEW menus, both pop-up and pull-down

  • Learn about the capabilities and uses of the Toolbar, Tools palette, Controls palette, Functions palette, and subpalettes

  • Learn why the Help windows can be your most valuable ally

  • Understand what a subVI is and why it's useful

  • Work through the activities to get a feel for how LabVIEW works



Key Terms

  • Control

  • Indicator

  • Wire

  • SubVI

  • Express VI

  • Terminal

  • Node

  • Dataflow

  • Pop-up menus

  • Toolbar

  • Palette

  • Subpalette

  • Help window



Front Panels

Simply put, the front panel is the window through which the user interacts with the program. When you run a VI, you must have the front panel open so that you can input data to the executing program. You will also find the front panel indispensable because that's where you see your program's output. Figure 3.1 shows an example of a LabVIEW front panel.

Figure 3.1. LabVIEW front panel


Controls and Indicators

The front panel is primarily a combination of controls and indicators. Controls simulate typical input objects you might find on a conventional instrument, such as knobs and switches. Controls allow the user to input values; they supply data to the block diagram of the VI. Indicators show output values produced by the program. Consider this simple way to think about controls and indicators:

Controls = Inputs from the User = Source of Data

Indicators = Outputs to the User = Destinations or "Sinks" for Data

They are generally not interchangeable, so make sure you understand the difference.

You "drop" controls and indicators onto the front panel by selecting them from a subpalette of the floating Controls palette window and placing them in a desired spot. Once an object is on the front panel, you can easily adjust its size , shape, position, color , and other properties.

You will later learn (when we discuss local variables , in Chapter 13, "Advanced LabVIEW Structures and Functions," and the Value property accessible using control references, in Chapter 15, "Advanced LabVIEW Features") that you can both read and write the values of both controls and indicators from the block diagram, programmatically. In this case, the control vs. indicator read vs. write distinction is blurred.