Drawing on the experiences of a world-class LabVIEW development organization, The LabVIEW Style Book is the definitive guide to best practices in LabVIEW development.
Leading LabVIEW development manager Peter A. Blume presents practical guidelines or rules for optimizing every facet of your applications: ease of use, efficiency, readability, simplicity, performance, maintainability, and robustness. Blume explains each style rule thoroughly, presenting realistic examples and illustrations. He even presents nonconforming examples that show what not to doand why not. While the illustrations in the print book are in black and white, you can download full-color versions from the publisher web site for free.
Coverage includes
Significance of style: How good style improves quality and actually saves time over the full project life cycle Before you code: Configuring your LabVIEW environment, and organizing your files on disk and in the LabVIEW project LabVIEW project specifications: A specialized standard for specifying LabVIEW application requirements Efficient VI layout and development: front panel, block diagram, icons, and connectors Data structures: Choosing data types, efficient use of arrays and clusters, and special considerations with nested data structures Error handling strategies: Trapping and reporting errors for robust and reliable applications Design patterns: Standard VI architectures and application frameworks that promote good style Documentation: Essential rules for source code documentation and streamlining the process Code reviews: Enforcing a style convention using a checklist, the LabVIEW VI Analyzer Toolkit, and peer reviews Appendixes: Convenient glossary and style rules summary
This book will be indispensable to anyone who wants to develop or maintain quality LabVIEW applications: developers, managers, and end users alike. Additionally, it will also be valuable to those preparing for NIs Certified LabVIEW Developer or Certified LabVIEW Architect exams, which contain significant content on development style.
Foreword by Darren Nattinger
Preface
Acknowledgments
About the Author
Chapter 1 The Significance of Style
Chapter 2 Prepare for Good Style
Chapter 3 Front Panel Style
Chapter 4 Block Diagram
Chapter 5 Icon and Connector
Chapter 6 Data Structures
Chapter 7 Error Handling
Chapter 8 Design Patterns
Chapter 9 Documentation
Chapter 10 Code Reviews
Appendix A Glossary
Appendix B Style Rules Summary
Index
Daugiau informacijos
Most LabVIEW programmers are engineers, scientists, or technicians, including students pursuing degrees in these fields. They develop large applications in test and measurement, data acquisition, embedded control, scientific research, and process monitoring systems. Application development often involves a team approach. Often the applications are of a mission critical nature. If the LabVIEW programmer follows the guidelines in this book, his or her work will be efficient and robust, readable, easier to use, maintain, and review. This book has lots of practical information learned through years of professional LabVIEW development experience; including many source code illustrations, small code snippets as well as complete application examples; and incorporates newer features of LabVIEW versions 6.1 and soon to be released 8.0, which is a major new release.
Foreword |
|
xv | |
Preface |
|
xvii | |
Acknowledgments |
|
xx | |
About the Author |
|
xxii | |
|
The Significance of Style |
|
|
1 | (20) |
|
|
2 | (16) |
|
|
6 | (1) |
|
|
7 | (2) |
|
|
9 | (2) |
|
|
11 | (1) |
|
|
12 | (3) |
|
|
15 | (2) |
|
|
17 | (1) |
|
|
18 | (1) |
|
Style Versus Time Tradeoff |
|
|
18 | (3) |
|
|
21 | (26) |
|
|
22 | (7) |
|
Best Practices for Specifications Development |
|
|
24 | (1) |
|
LabVIEW Project Requirements Specification |
|
|
25 | (4) |
|
|
29 | (3) |
|
Search for Useful Resources |
|
|
30 | (1) |
|
Develop a Proof of Concept |
|
|
30 | (1) |
|
|
31 | (1) |
|
Configure the LabVIEW Environment |
|
|
32 | (7) |
|
LabVIEW Options Dialog Box |
|
|
32 | (2) |
|
|
34 | (5) |
|
Project Organization, File Naming, and Control |
|
|
39 | (8) |
|
|
40 | (2) |
|
|
42 | (2) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (40) |
|
|
48 | (13) |
|
|
48 | (3) |
|
|
51 | (8) |
|
|
59 | (2) |
|
|
61 | (8) |
|
|
61 | (5) |
|
|
66 | (2) |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
69 | (2) |
|
|
71 | (4) |
|
|
71 | (3) |
|
|
74 | (1) |
|
|
75 | (12) |
|
|
75 | (2) |
|
|
77 | (2) |
|
|
79 | (2) |
|
|
81 | (1) |
|
|
82 | (1) |
|
Parafoil Guidance Interface |
|
|
83 | (2) |
|
|
85 | (2) |
|
|
87 | (42) |
|
|
88 | (5) |
|
|
88 | (2) |
|
|
90 | (3) |
|
|
93 | (8) |
|
|
94 | (3) |
|
|
97 | (4) |
|
|
101 | (14) |
|
|
101 | (3) |
|
Practical Variables and Sequence Structures |
|
|
104 | (4) |
|
Impractical Variables and Sequence Structures |
|
|
108 | (3) |
|
|
111 | (4) |
|
|
115 | (14) |
|
|
115 | (2) |
|
|
117 | (2) |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
121 | (1) |
|
|
122 | (2) |
|
|
124 | (3) |
|
|
127 | (1) |
|
|
128 | (1) |
|
|
129 | (28) |
|
|
132 | (8) |
|
|
132 | (3) |
|
|
135 | (4) |
|
|
139 | (1) |
|
|
140 | (5) |
|
|
145 | (12) |
|
|
145 | (3) |
|
|
148 | (3) |
|
|
151 | (2) |
|
|
153 | (2) |
|
|
155 | (2) |
|
|
157 | (46) |
|
Data Structure Design Methodology |
|
|
158 | (14) |
|
Choose the Controls and Data Types |
|
|
158 | (11) |
|
|
169 | (1) |
|
Create the Data Constructs |
|
|
170 | (2) |
|
|
172 | (8) |
|
|
173 | (2) |
|
|
175 | (2) |
|
|
177 | (2) |
|
String, Path, and Picture |
|
|
179 | (1) |
|
|
180 | (13) |
|
Simple Arrays and Clusters |
|
|
181 | (5) |
|
|
186 | (1) |
|
|
187 | (6) |
|
|
193 | (10) |
|
|
193 | (1) |
|
|
194 | (3) |
|
|
197 | (2) |
|
|
199 | (2) |
|
|
201 | (2) |
|
|
203 | (36) |
|
|
204 | (13) |
|
|
205 | (5) |
|
|
210 | (4) |
|
|
214 | (3) |
|
|
217 | (5) |
|
|
222 | (4) |
|
|
226 | (4) |
|
|
226 | (1) |
|
|
226 | (2) |
|
|
228 | (2) |
|
|
230 | (1) |
|
|
230 | (9) |
|
Continuous Acquire To File |
|
|
230 | (1) |
|
|
231 | (1) |
|
|
232 | (2) |
|
|
234 | (1) |
|
|
235 | (3) |
|
|
238 | (1) |
|
|
239 | (60) |
|
|
241 | (13) |
|
|
241 | (3) |
|
|
244 | (2) |
|
|
246 | (4) |
|
|
250 | (4) |
|
|
254 | (13) |
|
|
257 | (3) |
|
|
260 | (2) |
|
Event-Driven State Machine |
|
|
262 | (3) |
|
|
265 | (2) |
|
|
267 | (5) |
|
|
269 | (3) |
|
Complex Application Frameworks |
|
|
272 | (15) |
|
|
272 | (6) |
|
Multiple-Loop Application Framework |
|
|
278 | (5) |
|
Modular Multiple-Loop Application Framework |
|
|
283 | (4) |
|
|
287 | (12) |
|
|
287 | (1) |
|
Poll Instrument Response VI |
|
|
288 | (1) |
|
Unconventional State Machine |
|
|
289 | (3) |
|
|
292 | (1) |
|
Transducer Control Utility |
|
|
293 | (3) |
|
Distributed Control System |
|
|
296 | (1) |
|
|
297 | (2) |
|
|
299 | (20) |
|
Front Panel Documentation |
|
|
301 | (3) |
|
|
304 | (7) |
|
|
311 | (1) |
|
|
311 | (4) |
|
|
315 | (4) |
|
|
315 | (1) |
|
|
316 | (1) |
|
Meticulous Control Descriptions |
|
|
317 | (1) |
|
Temperature Profile Illustration |
|
|
318 | (1) |
|
|
318 | (1) |
|
|
319 | (20) |
|
|
320 | (14) |
|
|
320 | (10) |
|
|
330 | (4) |
|
|
334 | (5) |
|
|
338 | (1) |
Appendix A Glossary |
|
339 | (10) |
Appendix B Style Rules Summary |
|
349 | (8) |
Index |
|
357 | |
Peter Blume is the founder and president of Bloomy, a National Instruments Select Integration Partner that specializes in LabVIEW-based systems development. Since LabVIEW Version 2.5, Blume and his staff of engineers have solved more than a thousand industrial applications for customers throughout the northeastern United States. To promote consistent quality among multiple developers in multiple offices, Blume established and evolved the companys LabVIEW development practices.
Blume has written and presented multiple LabVIEW style-related presentations, including Bloomy Controls Professional LabVIEW Development Guidelines at NIWeek 2002 and Five Techniques for Better LabVIEW Code at NIWeek 2003. He also has published technical articles in various trade publications, including Test & Measurement World, Evaluation Engineering, Electronic Design, and Desktop Engineering.
Blume holds a Bachelor of Science degree in electrical engineering from the University of Connecticut. He is a National Instruments Certified LabVIEW Developer and Certified Professional Instructor. The company has offices in Connecticut, Massachusetts, and New Jersey. For more information, visit www.bloomy.com.
Readers who want to contact Blume regarding style-related suggestions, questions, or comments may do so at the following email address: lvstyle@bloomy.com . Readers interested in contracting Bloomy for a LabVIEW development project should call us directly or contact us through our website at www.bloomy.com/quote.