Download G Programming Reference Manual

Transcript
Chapter 4
Executing and Debugging VIs and SubVIs
Debugging VIs
This section covers a range of solutions to errors and problems in
virtual instruments.
Fixing Broken VIs
A VI cannot compile or run if it is broken. The VI Run button typically
appears broken while you are creating or editing it, until you wire all the
icons in the diagram. If it still is broken after you finish wiring the icons,
try selecting Edit»Remove Bad Wires or selecting <Ctrl-b> (Windows);
<command-b> (Macintosh); <meta-b> (Sun); or <Alt-b> (HP-UX). Often,
this fixes a broken VI.
Broken Run
button
Warning
button
To find out why a VI is broken, click the Broken Run button. An Error List
window appears listing all the errors. This window is shown in the
following illustration.
You also can access this box by clicking the Warning button of a VI, or
by selecting Windows»Show Error List. The Warning button for a VI is
only visible if the VI has a warning (such as overlapping objects) and you
check Show Warnings in the Error List window. Use the Preferences
dialog box to configure G to show warnings by default.
To locate an error, double-click the text describing it. The error is displayed
by bringing the relevant window to the front and highlighting the object
© National Instruments Corporation
4-9
G Programming Reference Manual