A Software Engineering Approach to LabVIEW

by ;
Edition: 1st
Format: Paperback
Pub. Date: 2003-05-05
Publisher(s): Prentice Hall
List Price: $89.88

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

A Software Engineering Approach to LabVIEW, by working programmers Jon Conway and Steve Watts, applies for the first time the techniques and principles of software design to LabVIEW programming. The LCOD technique designs flexibility into applications, making them more robust and much more easily adaptable to changes, even in large, industrial applications. Complete with examples and working code.

Author Biography

Jon Conway has 20 years' experience writing software, with half of that in LabVIEW. His fields of expertise include real time, robotics, databases, DAQ, DSP, and multiple software languages and operating systems; his idea for LCOD arose from his experience gained working on complex software projects. Jon is a partner in Structured Software Design Consultants of Hampshire, UK Steve Watts has 15 years of experience writing test software, and has been programming in LabVIEW for 6 years. His areas of expertise include OOD, the Yourdon methodology, CASE tools, electronics, lasers, switching system design, DAQ, statistical process control, databases, user interface design, software engineering, as well as a variety of programming languages. Steve is a partner in Structured Software Design Consultants of Hampshire, UK

Table of Contents

Prefacep. xi
Introductionp. 1
LabVIEW Sucksp. 2
Don't Buy This Bookp. 4
The Soap Boxp. 4
What This Book Isp. 6
Companion Web Sitep. 6
LabVIEW Rocksp. 7
Why Does LabVIEW Rock?p. 7
What Advantages Does This Bring to the Developer?p. 12
How Can Good Design Leverage These Advantages?p. 13
Software Design Principlesp. 15
Why is Software Complex?p. 16
Coupling and Cohesionp. 18
Information Hiding and Encapsulationp. 21
Examples of Coupling, Cohesion, and Information Hidingp. 22
Bad (Tight) Couplingp. 22
Good (Loose) Couplingp. 24
Bad (Weak) Cohesionp. 25
Good (Strong) Cohesionp. 25
Bad Information Hidingp. 26
Good Information Hidingp. 27
Abstractionp. 29
LabVIEW Component Oriented Design (LCOD)p. 33
Componentsp. 34
So What Is a Component?p. 35
Designp. 36
Object Oriented Design (OOD)p. 37
Top-Down Designp. 39
Bottom-Up Designp. 40
Design Patternsp. 40
Pattern Examplesp. 43
LCOD Implementationp. 47
Component Mechanismsp. 47
Message Sendingp. 48
All About Enumerated Typesp. 48
101 Things to Do with an Enumerated Typep. 48
Strict Type Definitionsp. 52
Persistent Local Storagep. 54
The Basic Structure of a Componentp. 55
LCOD Complementary Techniquesp. 59
State Machinesp. 59
State Machine Example--Washing Machinep. 60
Graphical User Interface (GUI) Design and Prototyping (UI Controller [right angle bracket right angle bracket] Message Queue Pattern)p. 64
Stack Queue Componentp. 66
User Interface Control Wrapper VIp. 70
LCOD User Interface Example Diagramp. 73
Abstraction in the Code, Detail Outside the Codep. 76
Section Key Filesp. 77
Error Handlingp. 88
Pre- and Postconditions: Check What Comes In and What Goes Outp. 92
Preconditionsp. 95
Postconditionsp. 97
Conclusionp. 97
Reusep. 98
Opportunistic Reusep. 98
Planned Reusep. 99
Merge VIsp. 99
VI Templatesp. 104
Software Engineering Essentialsp. 105
The Usual Suspectsp. 107
Requirements Documentp. 111
Quote/Project Validationp. 116
Target Specificationp. 117
Test Planp. 118
Software Architecture Documentp. 119
Software Construction--Buildp. 120
Test--Customer Acceptancep. 121
Pictures Tell a Thousand Wordsp. 121
Diagrams--Data Flow Diagrams (DFDs)p. 121
State Transition Diagramsp. 124
Homemade Diagramsp. 124
Checklistsp. 126
Code Reviewsp. 127
The Project Is Dead, Time for a Postmortemp. 129
Metricsp. 130
It's All About Stylep. 131
Why Do We Need Standards Anyway?p. 131
Block Diagramp. 134
General Layout Standardsp. 134
Wiring Standardsp. 134
Labeling Standardsp. 135
Self-Documenting Examplep. 136
Front Panelp. 137
General Front Panel Standardsp. 137
Public Front Panel Standardsp. 137
Private Front Panel Standardsp. 138
Icon and Connector Standardsp. 139
Organization of Filesp. 139
The Journeyp. 141
Agreeing on the Destination (Requirements)p. 142
Planning Your Route (Design)p. 157
Code and Fixp. 157
Abstracting Components from Requirementsp. 157
Using Patterns to Help the Design Processp. 165
Building the Prototypep. 169
Buildp. 180
Code and Fixp. 181
LCODp. 181
Hardwarep. 182
Detail Outside the Codep. 193
Error Handlingp. 198
State Machinesp. 199
Reusep. 200
Stylep. 201
Uh-Oh We've Been Given the Wrong Directionsp. 203
Conclusionsp. 208
Glossaryp. 211
Indexp. 217
Other LabVIEW Booksp. 222
Table of Contents provided by Rittenhouse. All Rights Reserved.

Excerpts

Preface There are many ways of designing and implementing a system. We are not trying to say that you should immediately adopt the techniques presented in this book in place of how you currently design and write software. Specifically, what we are saying is that this is how we design and implement software in real-world applications. We want you, the reader, to draw your own conclusions.It''s important to note that the authors are working engineers who pay their mortgages by writing software, not by writing books. The Test Engineer''s Perspective Steve Watts writes-- As a normally trained test engineer I''ve been programming test systems for years and using many different programming languages (HPBasic, UCLA Pascal, Turbo Pascal, Visual Basic, and QuickBasic). In many of the more complex systems I have had the same experience. Doing little design up front I would plow into the coding, by the 50% stage I would normally be ahead of the game, and at the 90% stage I would be 90% complete and patting myself on the back. And then it happened! I now use the term "the complexity explosion" small changes in the software would cause problems throughout the system. The customer would throw in "unplanned-for" changes. I could no longer picture the system clearly in my head. The last 10% of the project took another 90% of the time. I knew something was wrong but didn''t have the tools or training to explain what, why, or how. In the end I put it down to software being a pain. A few years ago when Jon came to the company he was touting a language called LabVIEW. This became the company standard, so I had to learn it. The first application that I wrote (in a very unpleasant style I hasten to add) was a small temperature logging effort. It became clear to me that something was still wrong. True, G gave huge productivity increases over Pascal and Visual Basic, which I was using at the time, but the complexity explosion was still there, lurking in the background. I went back to Jon and discussed it with him and he introduced me to LCOD. I had never thought that there was a discipline called Software Engineering (I thought by writing software I was a software engineer), or heard of Coupling, Cohesion, or Information Hiding. OOD, OOA, and structured software design had all passed me by. I''m the sort of person who needs to completely understand a process beyond the words, and since we were dealing with reasonably abstract concepts I struggled in the search for this comprehension. I took postgraduate courses in Software Engineering and Object Oriented Programming. I experimented with the projects I was working on, using structured software design, CASE tools, and OOA. The inherent complexity that academia applies to all things and the embracing of this complexity (out of elitism perhaps!) by the software community, led me to believe that this whole process was harder than I thought. BUT IT''S NOT! I began to see that by applying these techniques my programs were becoming manageable, they were not increasing in complexity near the end, and I could implement late changes without reducing system robustness. Maintenance was easier and faster, customers were happy and impressed, stress levels were reduced, illness and pestilence were driven from the land, neighbor loved neighbor, and there was peace in our time. Don''t get me wrong, none of this will make a complex problem any less complex, but at least by applying these techniques you won''t be making it more complex. As software engineers we should be striving for the following: Deliver what we say we are going to deliver Deliver it when we say we are going to deliver it Ensure that it operates predictably Ensure that changes and bug-fixes do not harm the stability of the program or break the bank to implement We should be in the business of managing complexity: Clever Software = BAD; Simple Software = GOOD One of our customers wrote the following testimonial (and we didn''t even pay him!): "LCOD has made a complex test system simple, flexible, and futureproof." Using the analogy of a journey (as we do throughout the book), we feel we have taken enough steps forward to enable us to turn around and put up a few signposts. Hopefully, these signposts will help you in your journey. I have never regretted adding flexibility to my software, but I have always rued the times I have omitted flexibility. The techniques presented in this book are reasonably simple to understand. We feel that someone can only successfully apply something if they understand it. Our aim is to introduce and explore the concepts of software design using LabVIEW, and to do this in an understandable and applicable manner. A lot of techniques and methodologies get bogged down with computer science and forget about the design aspects; our intentions are to always concentrate on design and hopefully translate some of the computer science.

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.