Summary: In this section, you will learn about block diagrams.
![]() Figure 1:
1. Nodes,
2. Indicator Terminals,
3. Wires,
4. Control Terminals
|
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.
Case structures, For
Loops, or While Loops. The
Add and Subtract functions in Figure 1 are function nodes.
Basic Function Generator VI icon if
you want to conserve space on the block diagram. Use
expandable nodes, such as the Basic Function
Generator VI expandable node to make wiring easier
and to aid in documenting block diagrams. By default, subVIs
appear as icons on the block diagram, and Express VIs appear
as expandable nodes.
View As
Icon from the shortcut menu to remove the checkmark.
Positioning tool over the
node. Resizing handles appear at the top and bottom of the
node.
Basic Function
Generator VI as a resized expandable node.
![]() Figure 2 |
Front panel objects
appear as terminals on the block diagram. The terminals
represent the data type of the control or indicator. You can
configure front panel controls or indicators to appear as
icon or data type terminals on the block diagram. By
default, front panel objects appear as icon terminals. For
example, a knob icon terminal, shown at left, represents a
knob on the front panel. The DBL at the bottom of the
terminal represents a data type of double-precision,
floating-point numeric. To display a terminal as a data type
on the block diagram, right-click the terminal and select
View As Icon from the shortcut menu to remove
the checkmark. A DBL data type terminal, shown above at
left, represents a double-precision, floating-point numeric
control or indicator.
Terminals are entry and exit ports that exchange information
between the front panel and block diagram. Terminals are
analogous to parameters and constants in text-based
programming languages. Types of terminals include control or
indicator terminals and node terminals. Control and
indicator terminals belong to front panel controls and
indicators. Data you enter into the front panel controls
(Add and Subtract functions. When
the Add and Subtract functions
complete their internal calculations, they produce new data
values. The data flow to the indicator terminals, where they
exit the block diagram, reenter the front panel, and appear
in front panel indicators (
Add and
Subtract functions, shown in 5, have three node terminals. To display the
terminals of the function on the block diagram, right-click
the function node and select Visible
Items>>Terminals from the shortcut menu.
Add
and Subtract functions. Each wire has a single
data source, but you can wire it to many VIs and functions
that read the data. Wires are different colors, styles, and
thicknesses, depending on their data types. A broken wire
appears as a dashed black line with a red X in the
middle. The examples in Table 1 are the most
common wire types.
| Wire Type | Scalar | 1D Array | 2D Array | Color |
|---|---|---|---|---|
| Numeric |
|
|
|
Orange (floating-point), Blue (integer) |
| Boolean |
|
|
|
Green |
| String |
|
|
|
Pink |
The
dynamic data type stores the information generated or
acquired by an Express VI. The dynamic data type appears
as a dark blue terminal, shown at left. Most Express VIs
accept and/or return the dynamic data type. You can wire
the dynamic data type to any indicator or input that
accepts numeric, waveform, or Boolean data. Wire the
dynamic data type to an indicator that can best present
the data. Indicators include a graph, chart, or numeric
indicator.
Use the
Convert from Dynamic Data Express VI, shown at
left, to convert the dynamic data type to numeric,
Boolean, waveform, and array data types for use with other
VIs and functions. When you place the Convert from
Dynamic Data Express VI on the block diagram, the
Configure Convert from Dynamic Data dialog
box appears. The Configure Convert from Dynamic
Data dialog box displays options that let you
specify how you want to format the data that the
Convert from Dynamic Data Express VI returns.
Convert from
Dynamic Data Express VI on the block
diagram. Double-click the Convert from Dynamic
Data Express VI to open the Configure Convert
from Dynamic Data dialog box to control how the
data appears in the array.
Convert to Dynamic Data Express VI to
convert numeric, Boolean, waveform, and array data types
to the dynamic data type for use with Express VIs. When
you place the Convert to Dynamic Data Express
VI on the block diagram, the Configure Convert to
Dynamic Data dialog box appears. Use this dialog
box to select the kind of data to convert to the dynamic
data type.
Positioning
tool. You can adjust the automatic wiring settings by
selecting Tools>>Options and selecting
Block Diagram from the top pull-down menu.
Wiring tool over a
terminal, a tip strip appears with the name of the
terminal. In addition, the terminal blinks in the
Context Help window and on the icon to help
you verify that you are wiring to the correct terminal.
Comments, questions, feedback, criticisms?
"A full introductory course on programming with LabVIEW."