EET 159 PowerPoint Slides

EET 2259 Unit 3
Editing and Debugging VIs



Read Bishop, Chapter 3.
Lab #3 and Homework #3 due next
week.
Quiz #2 next week.
Floyd, Digital Fundamentals, 10th ed
Editing Techniques

Editing techniques include
Creating controls & indicators on block diagram
 Selecting objects
 Moving objects
 Deleting objects
 Duplicating objects
 Resizing objects
 Labeling objects
 Changing text font, style, size, color
 Working with wires
 Aligning, distributing, and resizing objects
 Coloring objects
 Cleaning up the block diagram
Floyd, Digital Fundamentals, 10 ed

th
(Bishop, pp. 112-140)
Creating Controls & Indicators
From the Block Diagram
 After
placing a function or subVI on
block diagram, right-click on one of
its terminals and select Create >
Control or Create > Indicator.
 This adds a control or indicator to
the front panel and automatically
wires it on the block diagram.
Floyd, Digital Fundamentals, 10th ed
(Bishop, p. 112)
Tools Palette
• Lets you operate and modify
objects on front panel or block
diagram.
Automatic Selection Tool
Operating Tool
Scrolling Tool
Positioning/Resizing Tool
Breakpoint Tool
Labeling Tool
Probe Tool
Wiring Tool
Color Copy Tool
Shortcut Menu Tool
Coloring Tool
Floyd, Digital Fundamentals, 10th ed
(Bishop, p. 23)
Selecting Objects
To move, delete, or copy an object on
the front panel or block diagram, you
must first select the object.
 The easiest way to select an object or
objects is to drag a box around them.
 You can also select an object by clicking
it with the positioning tool, and you can
select multiple objects by shift-clicking.

(Bishop, p. 114)
Floyd, Digital Fundamentals, 10th ed
Moving Objects

After selecting an object or objects,
move by dragging with the mouse or
using the arrow keys.
(Bishop, p. 116)
Floyd, Digital Fundamentals, 10th ed
Deleting Objects

After selecting an object or objects,
delete by pressing Delete or
Backspace key, or by Edit > Clear on
pull-down menus.
(Bishop, p. 117)

If you make a mistake, you can undo
your last step by using Edit > Undo
or pressing Ctrl+Z.
Floyd, Digital Fundamentals, 10th ed
Duplicating Objects

After selecting an object or objects,
duplicate by Edit > Copy and Edit >
Paste on pull-down menus (or use
Ctrl+C and Ctrl+V shortcut keys).
(Bishop, p. 117)
Floyd, Digital Fundamentals, 10th ed
Resizing Objects
To resize an object on the front panel,
drag the blue resize handles that appear
when you move the positioning tool over
the object.
 Most block-diagram objects cannot be
resized.

(Bishop, p. 117)
Floyd, Digital Fundamentals, 10th ed
Labels




There are two kinds of labels: free labels
and owned labels.
Create a free label by using the labeling tool
on the tools palette or by double-clicking on
blank area of front panel or block diagram.
Show or hide an object’s owned label by
using short-cut menu’s Visible Items >
Label.
Edit any label by double-clicking.
Floyd, Digital Fundamentals, 10th ed
(Bishop, p. 119)
Changing Text Font, Style, Size,
Color

Use the Text Settings drop-down box on
the toolbar to change text appearance.
(Similar to word processors.)

You can change text appearance on the
front panel or on the block diagram.
(Bishop, p. 120)
Floyd, Digital Fundamentals, 10th ed
Working with Wires
Wiring “Hot Spot”
Click To Select Wires
Clean Up Wiring
Floyd, Digital Fundamentals, 10th ed
(Bishop, pp. 122-127)
Broken Wires
Remove a single broken wire by
selecting the wire and pressing the
Delete key, or by right-clicking the wire
and selecting Delete Wire Branch.
 Remove all broken wires by using Edit >
Remove Broken Wires pull-down menu
(or Ctrl+B shortcut key).

(Bishop, p. 125)
Floyd, Digital Fundamentals, 10th ed
Aligning, Distributing, and Resizing
Objects

After selecting two or more front-panel
objects, use buttons on the toolbar to align
them with each other, space them evenly
apart, or make them all the same size.
(Bishop, p. 128)
Align

Distribute
Resize
The block diagram’s toolbar has Align and
Distribute buttons, but not a Resize button.
Floyd, Digital Fundamentals, 10th ed
Coloring Objects

Use the coloring tool on the Tools
Palette to change colors of objects.

For many front-panel objects, you can
also change the color by choosing
Properties on the object’s shortcut
menu.
(Bishop, p. 130)
Floyd, Digital Fundamentals, 10th ed
Cleaning Up the Block Diagram


This feature will automatically rearrange
your block diagram and reroute the wires to
make everything look clean and wellordered.
On the block diagram pull-down menu, click
Edit > Clean Up Diagram; or you can just
press CTRL+U; or you can just click the
Clean Up button:
(Bishop, p. 137)
Floyd, Digital Fundamentals, 10th ed
Debugging Techniques

Debugging techniques include
Using Broken Run button to find errors
 Execution highlighting
 Single-stepping
 Breakpoints
 Probes
(Bishop, pp. 141-152)

Floyd, Digital Fundamentals, 10th ed
Broken Run Button

When the block diagram contains an
error that prevents the VI from running,
the Broken Run button appears in place
of the normal Run button.
(Bishop, p. 142)
Click the Broken Run button to open window
listing errors.
Floyd, Digital Fundamentals, 10th ed
Execution Highlighting

To monitor the execution of the block
diagram, click Highlight Execution
button on block diagram’s toolbar and
then run the VI.
(Bishop, p. 144)
Click the Highlight Execution button; data
flow is animated using bubbles. Values are
displayed on wires.
Floyd, Digital Fundamentals, 10th ed
Single-Stepping

To execute block diagram one node at a
time, use one of the single-stepping buttons
on block diagram’s toolbar.
(Bishop, p. 146)
Step Into button executes current node. If current
node is a subVI, its first step is executed.
Step Over button executes current node. If current
node is a subVI, entire subVI is executed.
Floyd, Digital Fundamentals, 10th ed
Step Out button executes until current subVI (or
entire program) finishes.
Execution Highlighting and SingleStepping

Usually when you single-step, you’ll also
want to have execution highlighting
turned on so that you can see the effect
of each step.
(Bishop, p. 146)
Floyd, Digital Fundamentals, 10th ed
Breakpoints
Set a breakpoint in block diagram by
using Breakpoint tool on tools palette or
by right-clicking on an object.
 When you run VI, execution will stop
when it reaches the breakpoint.

(Bishop, p. 147)
Floyd, Digital Fundamentals, 10th ed
Probes
Place a probe in block diagram by using
Probe tool on tools palette or by rightclicking on wire.
 When you run VI, window displays value
at the point where the probe is placed.

(Bishop, p. 148)
Floyd, Digital Fundamentals, 10th ed
Property Nodes


Property nodes are block-diagram objects
that let you read or set the properties of
front-panel objects.
To create a property node, right-click a frontpanel objects and then select Create >
Property Node.
(Bishop, p. 153)

Property nodes are powerful, advanced
features that will become more valuable to
you as you gain more LabVIEW experience.
Floyd, Digital Fundamentals, 10th ed
Some Shortcut Keys






Ctrl+B removes broken wires.
Ctrl+E switches between front panel & block
diagram.
Ctrl+T tiles front panel & block diagram side by
side.
Ctrl+H turns help window on or off.
Ctrl+U cleans up the block diagram.
Plus standard Windows shortcuts:
Ctrl+O to open file.
 Ctrl+S to save file.
 Ctrl+C to copy.
 Ctrl+V to paste.
Floyd, Digital Fundamentals,
10 ed to undo.
 Ctrl+Z

th
(Bishop, p. 155)