<< Chapter < Page | Chapter >> Page > |
After you build the front panel, you add code using graphical representations of functions to control the front panelobjects. The block diagram contains this graphical source code. Front panel objects appear as terminals, on the blockdiagram. Block diagram objects include terminals, subVIs, functions, constants, structures, and wires, which transfer dataamong other block diagram objects.
The VI in shows several primary block diagram objects-nodes, terminals, and wires.
The
Functions
palette is available only on the
block diagram. The
Functions
palette contains
the VIs and functions you use to build the block diagram. Select
Window>>Show Functions Palette
or right-click
the block diagram workspace to display the
Functions
palette. Tack down the
Functions
palette by clicking the thumbtack on the top left corner of
the palette. By default, the
Functions
palette
starts in the Express view.
LabVIEW uses colored icons to distinguish between Express VIs, VIs, and functions on the block diagram. By default, icons forExpress VIs appear on the block diagram as expandable nodes with icons surrounded by a blue field. Icons for VIs havewhite backgrounds, and icons for functions have pale yellow backgrounds.
By default, most functions and VIs on the block diagram appear as icons that are not expandable, unlike Express VIs.
Use Express VIs for common measurement tasks. Express VIs are nodes that require minimal wiring because you configurethem with dialog boxes. You can save the configuration of an Express VI as a subVI. Refer to Building the Block Diagram , of the LabVIEW User Manual for more information about creating subVIs from Express VIs.
When you place a VI on the block diagram, LabVIEW considers the VI to be a subVI. When you double-click a subVI, itsfront panel and block diagram appear, rather than a dialog box in which you can configure options. The front panelincludes controls and indicators. The block diagram includes wires, front panel icons, functions, possibly subVIs, andother LabVIEW objects.
The upper right corner of the front panel and block diagram displays the icon for the VI. This is theicon that appears when you place the VI on the block diagram.
You can create a VI to use as a subVI. Refer to Modular Programming for more information about creating VIs and configuring them as subVIs.
Functions are the fundamental operating elements of LabVIEW. Functions do not have front panels or blockdiagrams but do have connector panes. Double-clicking a function only selects the function.
Nodes are objects on the block diagram that have inputs and/or
outputs and perform operations when a VI runs. They areanalogous to statements, operators, functions, and subroutines
in text-based programming languages. Nodes can be functions,subVIs, or structures. Structures are process control
elements, such as
Case
structures,
For
Loops
, or
While Loops
. The
Add
and
Subtract
functions in
are function nodes.
Notification Switch
Would you like to follow the 'Labview graphical programming' conversation and receive update notifications?