[ Order This Book ]

More Info:


Table of Contents

Sensors, Transducers And LabVIEW : An Application Approach to Virtual Instrumentation
Author: Paton, Barry E .

Cover: Soft cover
Pages: 350
List Price: $58.00
Published by Prentice Hall
Date Published: 07/1997
ISBN: 0130811556


Good Stuff to Know before You Get Started

Sensors, Transducers & LabVIEW presents a new approach to learning microcomputer interfacing. It is designed for people who want to make or see things happen. My premise is that the best way to learn is with 'hands-on-experience'. From beginning to end, the reader is challenged with interesting exercises and problems drawn from the real world. Not too long ago, we challenged students with interesting problems to contemplate, to model and to calculate. Today, we not only contemplate, model and calculate but can also measure, interface and report.

Areas of study are chosen from a wide range of application fields including physics, chemistry, mathematics, engineering, and medical sciences. Each chapter comes with a library of LabVIEW programs called VIs. You will find a list of over 170 programs at the back of the book and on the enclosed CD. These programs are interlaced with the text material so that interaction with LabVIEW is both natural and experience expanding. Besides the VI's used in the text, various Exercises and LabVIEW Challenges are sprinkled throughout. Exercises are short programming challenges to extend the understanding of a specific point in the discussion and should be completed before continuing in the text. LabVIEW Challenges are more comprehensive exercises requiring further reading, development or thought. Sensors, Transducers and LabVIEW is a book of solutions. It is packed full of interesting devices, circuits and problems to challenge any person interested in making measurements in the real world.

What is LabVIEW

LabVIEW is simply the most elegant programming language for data acquisition, analysis, simulation or computer control of instruments, techniques or processes. LabVIEW is an acronym for Laboratory Virtual Instrument Engineering Workbench and was created by National Instruments as an intuitive and user friendly interface for writing computer programs. LabVIEW is an object oriented language and its style, syntax and data flow is different from conventional linear programming languages. For example, the linear language instruction X=X+1 implies that X is to be replaced by the old value of X incremented by one. In LabVIEW this instruction requires a shift register structure that clearly distinguishes between the new value of X and the old value of X. LabVIEW uses data flow concepts to execute subroutines called sub-VIs. In LabView, a subroutine can not execute until the inputs are satisfied and available. Only then does the processing continue within the subroutine. Consider the following program

LOOP X = X + A SIN (q)


In linear programming, each line is executed one after the other. Each time the loop is executed the program calculates a new value of X. In LabVIEW data flow demands a different structure. Load from Sensors, Transducers and LabVIEW library a program called Data Flow.vi. Select Show Diagram from the Windows menu. Click on the Icon with a light bulb. Now run the program by pressing the key and watch the action. Small colored balls represent packets of data. Note how the data flow is stopped at a program node until all the data packets arrive.

LabVIEW programming is different from conventional linear programming and requires a change in the designer's mind set. However once you experience the advantages of data flow programming, you too will be a fan.


In the first six chapters of Sensors, Transducers and LabVIEW, this new form of object oriented programming is presented with numerous applications to learn and hone your LabVIEW skills. Areas covered include the LabVIEW environment, modular programming, sub-VI's, programming structures, string operations, array operations and plotting routines. Sensors, Transducers & LabVIEW is about 'doing' things in the real world. Starting in Chapter 4, the input/output drivers for parallel and serial ports are introduced so programs can be transformed into actions. Along the way, numerous sensors (temperature, pressure, and magnetic field) are introduced together with transducers (stepping motors, LED displays, printers and plotters) as a means of solving real world interfacing problems. By the end of the first six chapters, all the basic LabVIEW structures and programming styles have been presented so that advanced concepts, sensors, and challenges may be tackled.

The advanced Chapters 7-15 are presented as LabVIEW projects covering topics such as the electronic barometer, remote video over the WEB, faster scanning, the electronic compass, and so on. All the common interfaces Centronics, RS232C, IEEE488, DAQ cards and TCP/IP are covered within the projects. Each chapter follows the same format. The first section introduces the subject or the problem to be studied. The second section covers background material, hardware or software information necessary to understand the remainder of the chapter. As an example, in Chapter 2, the physics of Hall effect sensors and the design for a Hall sensor interface are discussed. This section is optional. For a reader who is already sensor or transducer savvy, it can be skipped. Section three simulates the sensor and its interface. The following sections build on measurement skills developed in the early part of the chapter to produce a system solution. Modular programming techniques are used throughout. With bricks and mortar in the early sections, walls are built, then roofs, windows and finally the entire house. LabVIEW is a wonderful language to learn the lesson that mighty programs arise from small modules.

Readers with real sensors and interface cards can use them to link the projects with the real world. For readers without sensors, the simulated sensor VIs given in the library can be used. Every effort has been made to make the simulated sensors look and feel like real sensors. In some cases actual measured data sets are built into the sensor simulation.

Objectives of the Book

This book is written for students, scientists, researchers, and practicing engineers who are interested in learning how to use LabVIEW in a wide range of sensor and transducers applications. This book is written for the novice LabVIEW user who learns best from examples, for the practicing engineers who wants a refresher course on practical LabVIEW applications and for the expert who needs a sensor driver in a hurry. The text is a casebook of interesting sensors, circuits, drivers and applications. Over 150 sample programs can be found in the program library on the CD.

This book expects you to have a basic knowledge of your computer's operating system. You should know how to access menus, use the mouse, open and save files. Although previous LabVIEW experience is not necessary, it is an advantage for the sensor projects in the later chapters. The CD provides LabVIEW 5.0 Evaluation Software with a LabVIEW tutorial, highly recommended for the novice user.

After reading this book and working through the many exercises and challenges, you should be able to

  • Understand the workings of a wide range of sensors and transducers
  • Design LabVIEW drivers for sensors and transducers
  • Understand the differences between serial, parallel, GPIB and TCP/IP interface ports
  • Build LabVIEW interfaces for serial, parallel, GPIB and TCP/IP ports
  • Create application with a DAQ card
  • Appreciate the elegance and simplicity of a graphical programming language
  • Understand the power of modular (subVI) programming
  • Build sensor and transducer applications simulated or in the real world using the ports and real sensors
  • Create system applications

How to Use Sensors, Transducers and LabVIEW

For the scientist, researcher, practicing engineers or technologists

This is definitely a book you will want to read, with your computer by your side. "Reading" is eye opening, "doing" is mind expanding but "using" is real learning. As you read the text, ideas and questions will pop into mind. Stop reading and experiment with LabVIEW. Prove to yourself that events do occur as presented. Exercises along the way elucidate some subtle point. Now is the time to try out these ideas. LabVIEW Challenges, much like homework, can be done after the material in the chapter has been understood. Some challenges are simple extrapolations of ideas presented in the chapter, others require exploration, further reading and thought. Completed challenges will deepen your understanding of sensors, transducers and especially LabVIEW. You will soon be creating your own challenges.

I wonder if I could add an altimeter to my bicycle?

What would be the altimeter output?

How would I get the signal into my laptop computer?

How could I calculate how much work is done riding up old Smoky?

For the students

You cannot get enough of LabVIEW. The length of the text and CD allows only some of the many properties of LabVIEW to be covered. Read the LabView manuals, study how other applications are coded, but above all explore. Deep in many LabVIEW menus and sub-menus, you will find many interesting functions that will make for efficient programming. When you find one of these little gems, try it out with a demo program to be sure it does exactly what you expect. Icons and even the HELP text-boxes allow only limited information and can be confusing. Remember in designing a LabVIEW application to solve a problem, there are many paths to the answer. In the absence of constraints such as the fastest or the most efficient program, all solutions are correct. You can learn a great deal by studying other student's solutions. Adding sensors and transducers to your project makes it come alive. The LabVIEW motto is "It's OK to have fun." My motto is "If it is not fun, it is not Physics". My students and myself have had a lot of "fun" using LabVIEW to instrument and control many applications. You can too.

For the Instructor

The basic concepts of LabVIEW programming and simple input/output devices are presented in the first six chapters. Each chapter requires about two 1 hour lectures. LabVIEW diagrams, sensor or transducer specifications can be embedded into an electronic slide-show or on overhead transparencies. Have LabVIEW running in the classroom so that the static LabVIEW images can be run in real time. I like to have both applications running concurrently so that I can switch back and forth during my lecture. Many of the text ideas are suitable for both virtual and real demonstrations. It's one thing to see a demonstration such as stoplights executing some complex 'advanced flashing green' operation on the computer screen, but the student eye opener is when real lights or colored light emitting diodes start flashing the designed operation.

For the hobbyist

Once you have mastered LabVIEW concepts and built a few instrument drivers, the whole world is your stage. Many electronic parts catalogs and electronic magazines describe all kinds of inexpensive sensors and transducers. Utilizing dedicated microcontrollers such as the SMI102 introduced in Chapter 4 provide a very low cost interface for these sensors. Although limited in input/output capability they are ideal for hobby projects. Let your imagination wander, and LabVIEW will provide an easy path to bring computer control to your favorite application.

Sensors, Transducers & LabVIEW CD

The CD included with this book contains demonstration, example, and solution VIs for each chapter of the text. The most effective way to learn a new programming language is to use it. Have your computer close at hand as you read the text. See an idea, try out that idea and check it out with the examples in the library. If you do not have LabVIEW currently installed on your computer, then you can install LabVIEW 5.0 Evaluation Software included on the CD. You will have unlimited edit time but the runtime is limited to 5 minutes.

The program libraries are simply the quickest method to get you up and running. All program VIs discussed in the text are included in the VI library. You will find a complete listing of the 172 programs near the end of the book and on the CD. These VIs are a template, or a starting point for program development. The teaching strategy is, first to understand, then to imitate, then to improve the VIs. Your challenge is to make them even better. All sensors and transducers are simulated in the text so that no additional hardware is required, other than your computer, and the Sensors, Transducers & LabVIEW CD. However, if you do have real sensors or real transducers and access to the RS232, GPIB or TCP/IP ports you can see virtual instrumentation in action. Replace the simulated sensor or transducer VIs with real devices and drivers and let your project 'sing or dance'.

Also included on the CD is over 50 megabytes of Quicktime and Mpeg movies of selected sensors and transducers in action. Enjoy!

What You Need to Get Started

Place the Sensors, Transducers & LabVIEW CDROM into your computer (PC or MAC). Install LabVIEW 5.0 Evaluation Software on your computer hard drive. You will need

40 Megabytes of hard disk space

16-32 Megabytes RAM

fast CPU (Pentium, 68040 or PowerMac)

If you have LabVIEW already installed, you will only need one of the four Sensor, Transducers & LabVIEW libraries.

Chose PC Version 4 or Version 5, MAC Version 4 or Version 5

See the ReadMe file on the CD for further comments

Note: It is not necessary to put the libraries onto your hard drive, but response will be faster if you do. Double click on your favorite program and enjoy the benefits of an easy-to-use graphical programming environment.

Conventions used in the text

Bold—Bold text denotes VIs, functions menus and menu items. For example: Tools

Angle bracket to the right is used to indicate sub-menus. For example: Functions>Numeric>Trigonometric>Sine

Text between left and right angle brackets indicate a key. For example: indicates the Return or Enter key

Text between square bracket is used to indicate a button. For example: [Start Your Engines]

Text between square brackets is also used to indicate a terminal block label or a subVI icon. Examples: [Init] a link labeled Initialize. [AV3] a sub-VI called AV3.

italic—Italic denotes emphasis, key term or concept or a VI. Examples: Friend/Foe.llb.