Use LabView with style
Martin Rowe, Senior Technical Editor- September 1, 2007
In this book, Peter Blume, a top LabView programmer and the president of Bloomy Controls (a National Instruments Alliance partner), shows you how to write clean, understandable graphical code. Other LabView style guides have been published over the years, but Blume’s is the most comprehensive.
One feature of the book quickly jumped out at me: Even though LabView itself uses a lot of color, the diagrams in this book are printed in grayscale—apparently a decision that was made by the publisher. Readers who want to see the color images can purchase the downloadable version of the book.
In the early chapters, Blume provides examples of both clean code and messy code and explains why you should carefully plan your software project—advice that applies to all projects, not just those involving LabView. He also covers user interfaces, showing good and bad examples of user panels and stressing the need for simplicity and consistency. Chapter 4 shows you how to apply Blume’s rules to streamline your block diagrams.
Chapter 5 covers icons, which indicate functions, operators, and sub-VIs (virtual instruments). Here, you’ll learn conventions that can help you identify the functions contained within a VI. Blume stresses the use of color and symbols to differentiate and identify the function of code within an icon.
Instrument control and data acquisition generate a lot of data, and chapter 6 shows you how to choose the best data structure. For example, Blume recommends that you not use an alphanumeric string to represent an integer, because you’ll waste memory and run the chance of introducing data errors.
In the last half of the book, Blume covers error handling and explains how to develop code that’s not only readable, but efficient. He also dedicates a chapter to documentation, giving advice such as “Leave notes for the development team” and “Label each note in the left corner.” Blume wraps up with a chapter on code reviews and describes processes and tools you can use to review and analyze your code.
Overall, this book is well worth the money for any LabView programmer.