5th edition. — McGraw-Hill Education, 2019. — 640 p.
It’s been almost 30 years since I, Richard Jennings, fell in love with LabVIEW. As a laser repairman at Lawrence Livermore National Laboratory, my job sometimes required writing down a reading on a power meter every 15 minutes, all night long. If I could just get the computer to take those readings, I could go do something else. Fortunately, Gary W. Johnson, the original author of this book, pushed the idea of “data acquisition crash carts” at LLNL. Crash carts were a portable cart with a Mac IIx loaded with NI plug-in cards, and there was one nearby. Someone showed me how to use it, and I was amazed! I used assembly and Basic in school, but now I could SEE how to program. Wiring icons together on the block diagram and displaying data on the front panel was incredibly intuitive. I quickly got lost in the manuals and the examples and started automating everything I could. Eventually, I got a job as a full-time LabVIEW programmer, a career path I never envisioned coming out of school.
In 2000 Gary asked me to coauthor the third edition of LabVIEW Graphical Programming, and in 2005 I took an entrepreneurial leave from Sandia National Laboratories to move back home to San Antonio, Texas, to work on the fourth edition and start a LabVIEW consulting business. Over the years I got to know Fabiola De la Cueva as one of the best LabVIEW programmers around. Fabiola’s company, Delacor, helps companies apply professional software development methods to large LabVIEW projects and teams. I asked Fab to bring her knowledge to you in this fifth edition of LabVIEW Graphical Programming.
We asked Gary if he wanted to come on the adventure with us, but recently retired from LLNL, he said, “Now, every day is Saturday,” and encouraged us to “kick the whale down the beach.” It’s been almost 20 years since I, Fab, fell in love with LabVIEW in 2000 when I started work at National Instruments. My first reaction when I saw LabVIEW was “who has been looking into my brain?” This is how I always visualized programming! Back in college, I would draw boxes with an arrow to model a While Loop around the brackets on my printed C code. Finally, I didn’t have to translate the diagrams in my head to text; I could go directly to code. Back then I thought I was a hardware engineer. Even with how much I enjoyed programming in LabVIEW, I took the hardware career route at NI. I left NI in 2006 to pursue a master’s degree in electrical engineering, specializing in medical devices at the University of Texas.
When I got there, word got around that I knew LabVIEW, and next thing I knew, I was developing LabVIEW programs for pay. I finished my master’s but did not start a hardware company, as I had planned. Instead, I founded Delacor and I have dedicated my time ever since to learning LabVIEW, teaching it to others, and helping LabVIEW teams apply good software engineering practices to their work. In 2014 the Delacor team and I began working on a toolkit to help people who don’t eat, breathe, and sleep LabVIEW as we do create large applications. It is called the Delacor Queued Message Handler (DQMH). What started as a way to show others what type of code we could make became a framework that a lot of LabVIEW programmers are using. I continue to be humbled by the trust that other programmers have put in our work. I was surprised when Richard, one of my LabVIEW heroes, asked me to write this book with him. I had always said I would never write a book, but I couldn’t say no to one of my heroes, so here we are. How is that for getting out of my comfort zone? The target audience for this book is intermediate to advanced LabVIEW developers, like you, who want to take your skills and applications to the next level. We cover the core concepts of LabVIEW in Chapter 2 “LabVIEW Fundamentals,” including the LabVIEW execution engine,
the parts of a VI, and benchmarking performance. Chapter 3, “Data Acquisition,” covers the basics of interface hardware, signal conditioning, and analog/digital conversion. More than half the LabVIEW questions that coworkers ask us to turn out to be hardware- and signal-related. Information in this chapter is vital and will be useful no matter what software you may use for measurement and control. Most LabVIEW applications start out as a tool written by a single developer, but when that tool becomes a runaway success and the team starts increasing in size, then development can get bogged down. Delacor brings professional software development practices to companies that need to deliver a professional LabVIEW product to market.
Chapter 4, “LabVIEW Object-Oriented Programming,” starts with who should use LV OOP and why. OOP is not the answer for every team, but it does have advantages when you want to enforce a programming methodology on a development team. Chapter 5, “LabVIEW Frameworks,” covers the two most popular application frameworks in use today: the Delacor Queued Message Handler and the Actor Framework. Fabiola has lots of tips on how you should approach modeling your application along with the advantages and disadvantages of using a framework. In Chapter 6, “Unit Testing,” we look at unit testing in LabVIEW as a practice to create modular, testable code. Unit testing is a design practice to help you write robust, testable code that works as designed.
Chapter 7, “Developing In LabVIEW for Teams,” covers the processes and tools Delacor uses every day to bring professional software development to companies around the world. Finally, we close in Chapter 8, “Enterprise and IoT Messaging,” with some tips and examples for building applications that communicate with enterprise message brokers and with Amazon Web Services’ Internet of Things (IoT) message broker. All of the source code used in this book is freely available on GitHub at https://github.com/LGP5. We hope you find it useful.