Documenting Your Work


It's important to document your VIs so that others can understand them and so you don't forget why you did something or how it works. This section discusses a few ways you can document your work in LabVIEW.

Creating Descriptions and Tips for Individual Objects

If you want to enter a description of a LabVIEW object, such as a control, indicator, structure, or function, choose Description and Tip . . . from the object's pop-up menu. Enter the description in the resulting Description and Tip dialog box, shown in Figure 5.24, and click OK to save it. You can also enter a tip in the Tip box.

Figure 5.24. Description and Tip dialog


LabVIEW displays the description text in the Help window whenever you pass the cursor over a front panel control or indicator. The tip is displayed as a "tool tip" whenever a cursor pauses over the front panel object if the VI is in run mode, regardless of whether the Help window is open.

In the Control and VI Descriptions, you can use the HTML bold tags (<B>Text that you want to be bold</B>) to make sections of text bold, in the Context Help window. Currently, bold is the only HTML tag supported.


The best way to set up online help for your VIs is to enter tips and descriptions for all of their controls, indicators, and functions.

For structures and functions on the block diagram, LabVIEW does not show the description text in the Help window when you pass the cursor over the structure or function, as it does for controls and indicators on the front panel. The only way to view the description of the block diagram objects is from the Description and Tip dialog box. Additionally, other programmers will not know to look for descriptions in block diagram objects, so these might go unnoticed if other measures are not taken. For this reason, you might consider changing the label of block diagram objects that have descriptions to state something like "see description," to indicate that there is more information available in the description. Figure 5.25 shows an example of this useful technique.

Figure 5.25. Using a structure's label to indicate that the description contains documentation



Documenting VIs in the VI Properties

LabVIEW also gives you an easy way to document an entire VI. Selecting VI Properties . . . from the File menu and choosing the Documentation dialog, as shown in Figure 5.26, displays the VI Documentation dialog box for the current VI.

Figure 5.26. VI Properties dialog with Documentation category visible


You can use the VI Properties dialog box to perform the following functions:

  • Enter a description of the VI in the Documentation category. The description area has a scrollbar so that you can edit or view lengthy descriptions. When you use the VI as a subVI, the Help window will display this description when the cursor is over its block diagram icon. You can optionally enter a Help tag and a path to an external Help file.

  • See a list of changes made to the VI since you last saved it by pressing the Revision History . . . button in the General category.

  • View the path of the VI (i.e., where it is stored) in the General category.

  • See how much memory the VI uses in the Memory Category. The memory usage portion of the information box displays the disk and system memory used by the VI. The figure applies only to the amount of memory the VI is using and does not reflect the memory used by any of its subVIs.

  • And other interesting things we'll leave for the "Advanced" section. . . .




LabVIEW for Everyone. Graphical Programming Made Easy and Fun
LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
ISBN: 0131856723
EAN: 2147483647
Year: 2006
Pages: 294

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net