Appendix E LabVIEW /DAQ Tips and Tricks

1.   Avoid redundant code. If you come back later and change one piece of code, you might forget to change the other. Sub VIs are helpful in this regard.

2.   Back up your work often (File»Save All is helpful). Hard drives often die after a few years, so back up all your important work frequently, not just LabVIEW code. Backing it up at a physically different site gives you automatic fire and theft protection, and coincidentally, free storage sites on the Internet abound. If you create three backup disks daily, and store them in your office, then the building burns down, that’s no good. If you choose to back up via the Internet, zipping your files and password-protecting them is a good idea.

3.   Did you make a mistake white building your VI? Use the Edit»Undo… feature <Ctrl-Z> when needed, or the File»Revert… menu item to return to the last saved version of your VI.

4.   Simplify your block diagrams as much as possible—use sub VIs wires where needed (to avoid redundant code and to reduce block diagram clutter), and avoid crossing wires. Make big block diagrams tall or wide, but never both. See item 7.

5.   If doing DAQ, buy Nl’s DAQ devices.

6.   Use the keyboard, rather than your mouse, whenever possible.

7.   Use a big monitor with a minimum resolution of 800 x 600 pixels. Make your front panel and especially your block diagram no larger than 800 x 600 pixels, if there is any likelihood that the VI will ever be used by someone with a smaller monitor. If you cannot do this on the block diagram, then expand either in the horizontal direction or vertical direction, but NEVER both, as it would become very difficult to navigate your block diagram. For development, I recommend using the largest monitor possible for LabVIEW in terms of screen resolution, not necessarily physical size.

8.   Use a good mouse. Optical mice are nice, except for their price. They do not “gunk up” and require cleaning, like even the best mechanical mice. Speaking of good mechanical mice, I’ve had the best results from Logitech and Microsoft mice. Use a fabric topped-mouse pad for good traction; a slick plastic top on a mouse pad is worthless to the user once the mouse becomes the slightest bit sticky, but it saves the manufacturer a few cents. If your mouse starts sticking, clean the gunk from the internal rollers with audiocassette cleaning solution and a Q-Tip (or “cotton bud”), or use whatever it takes if the gunk is too thick for this to work quickly. I’ve had to scrape it off with a knife before!

9.   <Ctrl-F> helps you find LabVIEW objects and/or text.

10.   <Ctrl-T> tiles your windows, which is useful if your window is off screen.

11.   Like most Microsoft applications, you can single-, double-, and triple-click text for different effects. Single-clicking places a cursor between characters, double-clicking selects an entire word, and triple-clicking selects an entire paragraph.

12.   Have plenty of fuses laying around for your DAQ device.

13.   Don’t electrocute yourself when working with high voltages.

14.   Don’t electrocute your DAQ device when working with any voltage level—watch out for static electricity when handling your DAQ device.

15.   If LabVIEW requires a login, you may want to disable this through the Tools»Options…»Revision History menu item’s window. Setting the radio buttons therein to Login automatically with the LabVIEW Registration name, provided you have such a registration name, should eliminate this login box.

16.   If using Microsoft Windows, you can capture the active window, such as a LabVIEW front panel or block diagram, to the Windows clipboard via the <Alt-Print Screen> key, then paste it to Paint or any other drawing program for printing or for use in other documents. This “quick and dirty” technique can be done, given similar trickery, on non-Windows LabVIEW platforms as well. There exist shareware packages that allow you to print the foremost window directly, without the need for an external drawing program.

17.   For faster file I/O, use SCSI drives.

18.   Become familiar with the Speed of Execution tips in Chapter 6, Section 6.6.

19.   Always select This Connection Is»Required for input terminals in the Connector Pane, unless the input really must be optional.

20.   To make room on the block diagram, <Ctrl-drag> the Positioning Tool. This is particularly useful within structures, like loops and the Case Structure.

21.   Do not use bright colors as the background for your front panels. Keep them gray or pastel; otherwise, it looks unprofessional. Bright colors may be used sparingly for very small objects, or when you are flashing a warning light.

22.   Most DAQ applications, even the very complex ones, can be controlled with just a few buttons on the front panel. But if you need so many buttons that your front panel looks cluttered, you may add your own custom run-time menu through the Edit»Run-Time Menu… menu item. LabVIEW’S documentation will show you how to use such menu items, which can be found in the Functions»Application Control»Menu palette.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.131.152.166