LabVIEW for Everyone: Graphic Programming Made Even Easier / Edition 1

LabVIEW for Everyone: Graphic Programming Made Even Easier / Edition 1

ISBN-10:
0132681943
ISBN-13:
9780132681940
Pub. Date:
09/26/1996
Publisher:
Prentice Hall Professional Technical Reference

Paperback

Current price is , Original price is $65.0. You
Select a Purchase Option (Older Edition)
  • purchase options

Overview

LabVIEW for Everyone: Graphic Programming Made Even Easier / Edition 1

A friendly, tutorial introduction to LabVIEW 4, the leading graphical programming language designed for streamlining laboratory experiments. Provides a clear introduction to LabVIEW 4, showing the non-expert how to start programming quickly. Illustrates good LabVIEW programming techniques. Explains LabVIEW "virtual instruments," and how they work. Includes extensive coverage of real-world applications. Practicing engineers, scientists and students who use laboratory instruments; LabVIEW 3 users considering an upgrade; LabVIEW 4 users who need a reference or do not wish to take a formal course.

Product Details

ISBN-13: 9780132681940
Publisher: Prentice Hall Professional Technical Reference
Publication date: 09/26/1996
Edition description: Older Edition
Pages: 586
Product dimensions: 7.02(w) x 9.24(h) x 1.15(d)

Read an Excerpt

PREFACE: Welcome to LabVIEW

LabVIEW, or Laboratory Virtual Instrument Engineering Workbench, is a graphical programming language that has been widely adopted throughout industry, academia, and research labs as the standard for data acquisition and instrument control software. Currently running on Macintoshes (and Mac clones), Sun SPARCstations, HP 9000/700 Series workstations, and personal computers (PCs) running Windows 3.1, Windows NT, or Windows 95, LabVIEW is a powerful and flexible instrumentation and analysis software system.

Computers are much more flexible than standard instruments, and creating your own LabVIEW program, or virtual instrument (VI), is simple. LabVIEW's intuitive user interface makes writing and using programs exciting and fun!

LabVIEW departs from the sequential nature of traditional programming languages and features an easy-to-use graphical programming environment, including all of the tools necessary for data acquisition (DAQ), data analysis, and presentation of results. With its graphical programming language, called "G," you program using a graphical block diagram that compiles into machine code. Ideal for a countless number of science and engineering applications, LabVIEW helps you solve many types of problems in only a fraction of the time and hassle it would take to write "conventional" code.

Beyond the Lab

LabVIEW has found its way into such a broad spectrum of virtual instrumentation applications that it is hard to know where to begin. As its name implies, it began in the laboratory and still remains very popular in many kinds of laboratories-from major research anddevelopment laboratories around the world (such as Lawrence Livermore, Argonne, Batelle, Sandia, Jet Propulsion Laboratory, White Sands, and Oak Ridge in the United States, and CERN in Europe), to R&D laboratories in many industries, and to teaching laboratories in universities all over the world, especially in the disciplines of electrical and mechanical engineering and physics.

The spread of LabVIEW beyond the laboratory has gone in many directions"up (aboard the space shuttle), down (aboard U.S. Navy submarines), and around the world (from oil wells in the North Sea to factories in New Zealand). It is still moving in all directions, headed for new horizons! Virtual instrumentation systems are known for their low cost, both in hardware and development time, and their great flexibility. Is it any wonder that they are so popular?

The Expanding Universe of Virtual Instrumentation

Perhaps the best way to describe the expansion (or perhaps explosion) of LabVIEW applications is to generalize it. There are niches in many industries where measurements of some kind are required—most often of temperature, whether it be in an oven, a refrigerator, a greenhouse, a clean room, or a vat of soup. Beyond temperature, users measure pressure, force, displacement, strain, pH, and so on, ad infinitum. Personal computers are used virtually everywhere. LabVIEW is the catalyst that links the PC with measuring things, not only because it makes it easy, but also because it brings along the ability to analyze what you have measured and display it and communicate it halfway around the world if you so choose.

After measuring and analyzing something, the next logical step often is to change (control) something based upon the results. For example, measure temperature and then turn on either a furnace or a chiller. Again, LabVIEW makes this easy to do; monitoring and control have become LabVIEW strengths. Sometimes it is direct monitoring and control, or it may be through communicating with a programmable logic controller (PLC) in what is commonly called supervisory control and data acquisition (SCADA).

The Results

You will find descriptions of LabVIEW applications interspersed throughout this book. They are written by users in a very brief style to give you the essence of the application and chosen from industry segments in which LabVIEW tends to be very popular—automated electronics testing, semiconductor manufacturing, medical instrumentation, automotive testing, and industrial automation (two applications featured). Of the multitude of successful LabVIEW applications, these are particularly interesting current examples of virtual instrumentation at its finest!

A few of LabVIEW's many uses include:
Simulating heart activity.
Controlling an ice cream-making process.
Detecting hydrogen gas leaks on the space shuttle.
Monitoring feeding patterns of baby ostriches.
Modeling power systems to analyze power quality.
Measuring physical effects of exercise in lab rats.
Controlling motion of servo and stepper motors.
Testing circuit boards in computers and other electronic devices.
Simulating motion in a virtual reality system.
Supervisor control of the heating ventilation and air conditioning (HVAC) system in National InstrumentsÕ manufacturing facility.

Objectives of this Book

LabVIEW for Everyone will help you get LabVIEW up and running quickly and easily, and will start you down the road to becoming an expert G programmer. The book offers additional examples and activities to demonstrate techniques, identifies other sources of information about LabVIEW, and features descriptions of cool LabVIEW applications. You are invited to open, inspect, use, and modify any of the programs on the accompanying CD-ROM (although in many cases you'll need the full version of LabVIEW, not the included sample software, to be able to do much with them).

This book expects you to have basic knowledge of your computer's operating system. If you donÕt have much computer experience, you may want to spend a little time with your operating system manual and familiarize yourself with your computer. For example, you should know how to access menus, open and save files, make backup disks, and use a mouse.

After reading this book and working through the exercises, you should be able to do the following, and much more, with the greatest of ease:

Write LabVIEW programs, called virtual instruments, or VIs.
Employ various debugging techniques.
Manipulate both built-in LabVIEW functions and library VIs.
Create and save your own VIs so that you can use them as subVIs, or subroutines.
Design custom graphical user interfaces (GUIs).
Save your data in a file and display it on a graph or chart.
Build applications that use General Purpose Interface Bus (GPIB) or serial instruments.
Create applications that use plug-in DAQ boards.
Use built-in analysis functions to process your data.
Optimize the speed and performance of your LabVIEW programs.
Employ advanced techniques such as globals, locals, and attribute nodes.
Use LabVIEW to create your instrumentation applications.

LabVIEW from National Instruments has extensive graphics and analysis capabilities that are used to control and monitor the operation of process control applications, such as this wind tunnel experiment.

Organization

LabVIEW for Everyone helps you get started quickly with LabVIEW to develop your instrumentation and analysis applications. The book is divided into two main sections: Fundamentals and Advanced Topics. The Fundamentals section contains nine chapters and teaches you the fundamentals of G programming in LabVIEW. The Advanced Topics section contains six chapters that further develop your skills and introduce helpful techniques and optimizing strategies. We suggest that you work through the beginning section to master the basics; then, if you're short on time, skip around to what you really want to learn in the advanced section.

In both sections, chapters have a special structure to facilitate learning:
Overview, goals, and key terms describe the main ideas covered in that chapter.
Discussion of the featured topics.
Activities reinforce the information presented in the discussion.
Wrap It Up! summarizes important concepts and skills taught in the chapter.
Additional activities in many chapters give you more practice with the new material.

Fundamentals

Chapter 1 describes LabVIEW and introduces you to some of LabVIEW's features and uses.

In Chapter 2, you will get an overview of virtual instrumentation: how data acquisition, GPIB, serial port communication, and data analysis are performed with LabVIEW. You will also learn about LabVIEW's history.

In Chapter 3, you will get acquainted with the LabVIEW environment, including the essential parts of a virtual instrument (or VI), the Help window, menus, tools, palettes, and subVIs.

In Chapters 4 and 5, you will become familiar with the basics of G programming in LabVIEWÑusing controls and indicators (such as numerics, Booleans, and strings); wiring, creating, editing, debugging, and saving VIs; creating subVIs; and documenting your work. You will also begin to understand why G is considered a dataflow programming language.

Chapter 6 describes the basic G programming structures in LabVIEW: while loops, for loops, shift registers, case structures, sequence structures, and formula nodes. It also teaches you how to introduce timing into your programs.

In Chapter 7, you will learn how to use two important data structures—arrays and clusters—in your programs. You will also explore LabVIEW's built-in functions for manipulating arrays and clusters.

Chapter 8 details the variety of charts and graphs available in LabVIEW and teaches you how to use them for animated and informative data presentation.

Chapter 9 discusses string data types, string functions, and tables. It also talks a little about how to save data in and read data from a file, using LabVIEW's easy File I/O VIs.

Advanced Topics

Chapter 10 teaches you more about data acquisition, GPIB, and serial communication. You will learn a bit of theory and some hardware considerations, and you will find a valuable guide to many common acronyms used in instrumentation. Chapter 10 also discusses software setup for data acquisition.

Chapter 11 discusses a few basics on how to use LabVIEW to acquire data using plug-in DAQ boards, as well as a brief overview on communicating with other instruments using GPIB and serial protocols.

Chapter 12 covers some invaluable features like local and global variables, attribute nodes, occurrences, data type conversions, and much more.

Chapter 13 shows you how to configure VI behavior and appearance using VI Setup options and how to access front panel controls using the keyboard. It also introduces LabVIEWÕs very useful Find function and Profile window.

Chapter 14 covers input/output (I/O) considerations such as printing, advanced file I/O, and networking with other computers.

In Chapter 15, you will learn how to create your own online help files and how to add a customized look to your applications by importing pictures and using the Control Editor. Chapter 15 also describes some good programming techniques that you can use to make your programs run faster, use less memory, port more easily to other platforms, and behave more efficiently overall.

You will find a glossary, index, and appendices at the end of the book.

Appendix A tells you how to contact National Instruments, the maker of LabVIEW, and points you toward other resources that can help you with LabVIEW. It also describes add-on toolkits available to enhance LabVIEW's functionality.

Appendix B talks a little bit about troubleshooting your VIs and answers some common questions.

A Note About Paths

Different platforms have different conventions for specifying path names. For example, Windows paths take the form X:\LABVIEW\MINE.LLB\BINGO.VI. The same path on a Macintosh would be denoted Hard Drive Name:LabVIEW:Mine.llb:Bingo.vi. On UNIX machines, it would be /USR/LABVIEW/MINE.LLB/BINGO.VI. Rather than specifying a full path, this book will list the default path from the LabVIEW directory or folder when telling you where to find an example VI. To simplify notation, we will use the Windows standard to describe paths; if you use Mac OS or UNIX machines, please substitute colons or forward slashes where necessary.

LabVIEW Installation

If you have the full version of LabVIEW and need instructions on how to install it, please see the release notes that came with your software.

In addition, you will need to install the Everyone directory or folder from the CD-ROM in the back of this book. It contains the activities in this book and their solutions. To do so, open the appropriate directory for your platform and copy the Everyone directory or folder into your LabVIEW directory. Or, on Windows machines, you can run the setup program on the CD, tell it you have LabVIEW, and tell it to install the Everyone directory in your LabVIEW directory for you.

The EXAMPLES directory or folder installed by the full version of LabVIEW contains great example programs that you can use as is or modify to suit your needs.

Your Very Own Demo Disk

The CD included with this book contains a demonstration version of LabVIEW as well as solutions to the activities in the book. It also contains a few example programs for your enjoyment. You can use this sample software to work through almost all of the activities in the Fundamentals section (Chapters 1-9); exceptions are clearly marked. Most of the activities in the Advanced Topics section of the book are beyond the scope of the sample software and may not load into it. The sample software does not have the ability to do data acquisition or instrument control using GPIB or the serial port. In addition, most of the analysis functions are not available.

Please note that you can only save VIs temporarily using the sample software. Once you quit the LabVIEW demonstration version, the VIs saved during that session are lost.

To access the part of the sample software that lets you build VIs or investigate existing examples, start the application and select the Explore LabVIEW for Your Own Applications button in the lower right corner of the LabVIEW Demo main menu. Click OK on the first dialog box that pops up. Under Windows and UNIX, select New VI in the next dialog box to start building a fresh VI or choose Open VI to open an existing one. On Macintosh, choose New from the File menu to open a new VI or Open to bring up one that's already built.

The installation process places a directory or folder called vi.lib in the LABVIEW directory or folder. vi.lib contains support files for LabVIEW; you should not change the contents of this folder in any way or you might cause yourself much suffering.

Minimum Specifications for LabVIEW and the Sample Software

The basic engine of the sample software is the same as the full version of LabVIEW. The system requirements are also about the same, with the exception of hard disk space. You need about 50 MB of disk storage space to install the entire LabVIEW package (custom installations can be smaller). You can run the sample software directly from the CD-ROM if disk space is tight.

Windows

The Windows 3.1 version of LabVIEW 4.0 runs under Windows 3.1 and Windows for Workgroups 3.1 in 386 enhanced mode. You should have a minimum of 8 MB of RAM. LabVIEW can run on an 80386-based PC, but we strongly recommend a computer with an 80486 CPU. In addition, LabVIEW for Windows requires a math coprocessor.

The Windows 95 version of LabVIEW 4.0 runs under any system that supports Windows 95. You should have a minimum of 8 to 12 MB of RAM for this version to run smoothly.

The Windows NT version of LabVIEW 4.0 runs only under Windows NT version 3.5.1 or greater. You should have a minimum of 12 to 16 MB of RAM for this version to run smoothly. LabVIEW for Windows NT only runs on Windows NT 80x86 computers.

The Windows 95 and NT sample versions include online help and require about 13 MB of hard disk space; the Windows 3.1 version does not have online help and needs only about 6.5 MB.

MacOS

LabVIEW for the 680x0-based Macintosh requires a math coprocessor. LabVIEW requires a minimum of 5 MB of available RAM, in addition to the RAM requirements for your system software and any other applications that you want to run simultaneously. We recommend that you have at least 8 MB of RAM. You will need about 13 MB of hard disk space.

LabVIEW requires System 7 and will not run under earlier versions of the Macintosh operating system.

Sun and HP

LabVIEW for Sun runs on SPARCstations under Solaris 1.1 and 1.1.1 (SunOS 4.1.3) and Solaris 2.3 or later. LabVIEW for HP-UX runs on Hewlett-Packard Model 9000 Series 700 computers under HP-UX 9.0.3 or later.

The workstation should have 32 MB of RAM, with 32 MB or more of swap space storage. LabVIEW can run on less than 24 MB of RAM, but performance will suffer. You will need 8Ð10 MB of hard disk space.

All

LabVIEW uses a directory to store temporary files. Some of the temporary files are large, so we recommend that you have several megabytes of disk space available for this temporary directory. The default for the temporary directory is /tmp on Windows and UNIX, and inside the trash can on MacOS.

How to Install the Sample Software

Windows

Run setup.exe on the top level of the CD-ROM. It will ask you if you already have a copy of LabVIEW 4.0 or greater. If you do, you can install only the Everyone directory, or you can install the LabVIEW demo software, including Everyone (which takes a lot more space, but has some neat features).

If you do not already have LabVIEW (or if you choose to install the demo software), the setup program will install the correct version of the sample software (Windows 3.1 or Windows 95-NT) in a directory of your choice.

The setup program also gives you the choice of running the demo software from the CD. If you choose this option, setup creates a shortcut to the CD.

MacOS

Copy the appropriate folder (either 68KMac or PowerMac) onto your hard drive. Rename the folder LabVIEW if you would like to. If you want to access the LabVIEW demo guide tutorial, install the Adobe Acrobat viewer as well.

Sun

SunOS 4.x:

Use the command, mount -rt hsfs /dev/sr0/cdrom, then run /cdrom/lvdemo to run from the CD-ROM.

If you want to install the software on your hard disk, copy the appropriate directory onto your disk, then launch the file labview.

Solaris 2:

The CD mounts automatically as /cdrom/cdrom0. Run

/cdrom/cdrom0/lvdemo.

If you want to install the software on your hard disk, copy the appropriate directory onto your disk, then launch the file labview.

HP

Use sam to mount the CD-ROM. Run /cdrom/LVDEMO.

If you want to install the software on your hard disk, copy the appropriate directory onto your disk, then launch the file LABVIEW.

Purchasing LabVIEW

LabVIEW runs on the following platforms: Macintosh, Power Macintosh, PCs running Windows 3.1, Windows NT, or Windows 95, Sun SPARCstations, and HP 9000/700-series workstations running HP-UX. If you would like information on how to purchase LabVIEW, contact National Instruments.

National Instruments
6504 Bridge Point Parkway
Austin, Texas 78730
Telephone: (512) 794-0100
Fax: (512) 794-8411
E-mail: info@natinst.com.
Worldwide Web: ...

Table of Contents

Foreword.
Preface Good Stuff to Know Before You Get Started.
1. What in the World Is LabVIEW?
2. Virtual Instrumentation: Hooking Your Computer Up to the Real World.
Real-World Application: Radio-Linked Environmental Monitoring and Display Systemal Monitoring and Display System Building Your Own Workbench.
4. LabVIEW Foundations.
5. Yet More Foundations.
Real-World Application: Next-Generatiion Gas Delivery System for Semiconductor Manufacurers.
6. Controlling Program Execution with Structures.
7. LabVIEW's Composite Data: Arrays and Clusters.
8. LabVIEW's Exciting Visual Displays: Charts and Graphs.
9. Exploring Strings and File I/O.
Real-World Application: Preconditioning Automobile Evaporative Canisters Advanced Section.

A Bit About the Advanced Section. 10. Getting Data into and out of Your Computer: Data Acquisition and Instrument Control.
11. DAQ and Instrument Control in LabVIEW.
Real-World Application: DAQ, SCXI, and LabVIEW Simulate and Test Power Systems.
12. Advanced LabVIEW Functions and Structures.
13. Advanced LabVIEW Features.
Real-World Application: Accelerating the Development of Medical Diagnostic Instruments.
14. Communications and Advanced File I/O.
15. The Art of LabVIEW Programming.
Real-World Application: High-Speed Remote Process Control.
Appendix A. National Instruments Contact Information, Resources, and Toolkits.
Appendix B. Troubleshooting and Common Questions.
Glossary.
Index.

Preface

PREFACE: Welcome to LabVIEW

LabVIEW, or Laboratory Virtual Instrument Engineering Workbench, is a graphical programming language that has been widely adopted throughout industry, academia, and research labs as the standard for data acquisition and instrument control software. Currently running on Macintoshes (and Mac clones), Sun SPARCstations, HP 9000/700 Series workstations, and personal computers (PCs) running Windows 3.1, Windows NT, or Windows 95, LabVIEW is a powerful and flexible instrumentation and analysis software system.

Computers are much more flexible than standard instruments, and creating your own LabVIEW program, or virtual instrument (VI), is simple. LabVIEW's intuitive user interface makes writing and using programs exciting and fun!

LabVIEW departs from the sequential nature of traditional programming languages and features an easy-to-use graphical programming environment, including all of the tools necessary for data acquisition (DAQ), data analysis, and presentation of results. With its graphical programming language, called "G," you program using a graphical block diagram that compiles into machine code. Ideal for a countless number of science and engineering applications, LabVIEW helps you solve many types of problems in only a fraction of the time and hassle it would take to write "conventional" code.

Beyond the Lab

LabVIEW has found its way into such a broad spectrum of virtual instrumentation applications that it is hard to know where to begin. As its name implies, it began in the laboratory and still remains very popular in many kinds of laboratories-from major researchanddevelopment laboratories around the world (such as Lawrence Livermore, Argonne, Batelle, Sandia, Jet Propulsion Laboratory, White Sands, and Oak Ridge in the United States, and CERN in Europe), to R&D laboratories in many industries, and to teaching laboratories in universities all over the world, especially in the disciplines of electrical and mechanical engineering and physics.

The spread of LabVIEW beyond the laboratory has gone in many directions"up (aboard the space shuttle), down (aboard U.S. Navy submarines), and around the world (from oil wells in the North Sea to factories in New Zealand). It is still moving in all directions, headed for new horizons! Virtual instrumentation systems are known for their low cost, both in hardware and development time, and their great flexibility. Is it any wonder that they are so popular?

The Expanding Universe of Virtual Instrumentation

Perhaps the best way to describe the expansion (or perhaps explosion) of LabVIEW applications is to generalize it. There are niches in many industries where measurements of some kind are required—most often of temperature, whether it be in an oven, a refrigerator, a greenhouse, a clean room, or a vat of soup. Beyond temperature, users measure pressure, force, displacement, strain, pH, and so on, ad infinitum. Personal computers are used virtually everywhere. LabVIEW is the catalyst that links the PC with measuring things, not only because it makes it easy, but also because it brings along the ability to analyze what you have measured and display it and communicate it halfway around the world if you so choose.

After measuring and analyzing something, the next logical step often is to change (control) something based upon the results. For example, measure temperature and then turn on either a furnace or a chiller. Again, LabVIEW makes this easy to do; monitoring and control have become LabVIEW strengths. Sometimes it is direct monitoring and control, or it may be through communicating with a programmable logic controller (PLC) in what is commonly called supervisory control and data acquisition (SCADA).

The Results

You will find descriptions of LabVIEW applications interspersed throughout this book. They are written by users in a very brief style to give you the essence of the application and chosen from industry segments in which LabVIEW tends to be very popular—automated electronics testing, semiconductor manufacturing, medical instrumentation, automotive testing, and industrial automation (two applications featured). Of the multitude of successful LabVIEW applications, these are particularly interesting current examples of virtual instrumentation at its finest!

A few of LabVIEW's many uses include:
Simulating heart activity.
Controlling an ice cream-making process.
Detecting hydrogen gas leaks on the space shuttle.
Monitoring feeding patterns of baby ostriches.
Modeling power systems to analyze power quality.
Measuring physical effects of exercise in lab rats.
Controlling motion of servo and stepper motors.
Testing circuit boards in computers and other electronic devices.
Simulating motion in a virtual reality system.
Supervisor control of the heating ventilation and air conditioning (HVAC) system in National InstrumentsÕ manufacturing facility.

Objectives of this Book

LabVIEW for Everyone will help you get LabVIEW up and running quickly and easily, and will start you down the road to becoming an expert G programmer. The book offers additional examples and activities to demonstrate techniques, identifies other sources of information about LabVIEW, and features descriptions of cool LabVIEW applications. You are invited to open, inspect, use, and modify any of the programs on the accompanying CD-ROM (although in many cases you'll need the full version of LabVIEW, not the included sample software, to be able to do much with them).

This book expects you to have basic knowledge of your computer's operating system. If you donÕt have much computer experience, you may want to spend a little time with your operating system manual and familiarize yourself with your computer. For example, you should know how to access menus, open and save files, make backup disks, and use a mouse.

After reading this book and working through the exercises, you should be able to do the following, and much more, with the greatest of ease:

Write LabVIEW programs, called virtual instruments, or VIs.
Employ various debugging techniques.
Manipulate both built-in LabVIEW functions and library VIs.
Create and save your own VIs so that you can use them as subVIs, or subroutines.
Design custom graphical user interfaces (GUIs).
Save your data in a file and display it on a graph or chart.
Build applications that use General Purpose Interface Bus (GPIB) or serial instruments.
Create applications that use plug-in DAQ boards.
Use built-in analysis functions to process your data.
Optimize the speed and performance of your LabVIEW programs.
Employ advanced techniques such as globals, locals, and attribute nodes.
Use LabVIEW to create your instrumentation applications.

LabVIEW from National Instruments has extensive graphics and analysis capabilities that are used to control and monitor the operation of process control applications, such as this wind tunnel experiment.

Organization

LabVIEW for Everyone helps you get started quickly with LabVIEW to develop your instrumentation and analysis applications. The book is divided into two main sections: Fundamentals and Advanced Topics. The Fundamentals section contains nine chapters and teaches you the fundamentals of G programming in LabVIEW. The Advanced Topics section contains six chapters that further develop your skills and introduce helpful techniques and optimizing strategies. We suggest that you work through the beginning section to master the basics; then, if you're short on time, skip around to what you really want to learn in the advanced section.

In both sections, chapters have a special structure to facilitate learning:
Overview, goals, and key terms describe the main ideas covered in that chapter.
Discussion of the featured topics.
Activities reinforce the information presented in the discussion.
Wrap It Up! summarizes important concepts and skills taught in the chapter.
Additional activities in many chapters give you more practice with the new material.

Fundamentals

Chapter 1 describes LabVIEW and introduces you to some of LabVIEW's features and uses.

In Chapter 2, you will get an overview of virtual instrumentation: how data acquisition, GPIB, serial port communication, and data analysis are performed with LabVIEW. You will also learn about LabVIEW's history.

In Chapter 3, you will get acquainted with the LabVIEW environment, including the essential parts of a virtual instrument (or VI), the Help window, menus, tools, palettes, and subVIs.

In Chapters 4 and 5, you will become familiar with the basics of G programming in LabVIEWÑusing controls and indicators (such as numerics, Booleans, and strings); wiring, creating, editing, debugging, and saving VIs; creating subVIs; and documenting your work. You will also begin to understand why G is considered a dataflow programming language.

Chapter 6 describes the basic G programming structures in LabVIEW: while loops, for loops, shift registers, case structures, sequence structures, and formula nodes. It also teaches you how to introduce timing into your programs.

In Chapter 7, you will learn how to use two important data structures—arrays and clusters—in your programs. You will also explore LabVIEW's built-in functions for manipulating arrays and clusters.

Chapter 8 details the variety of charts and graphs available in LabVIEW and teaches you how to use them for animated and informative data presentation.

Chapter 9 discusses string data types, string functions, and tables. It also talks a little about how to save data in and read data from a file, using LabVIEW's easy File I/O VIs.

Advanced Topics

Chapter 10 teaches you more about data acquisition, GPIB, and serial communication. You will learn a bit of theory and some hardware considerations, and you will find a valuable guide to many common acronyms used in instrumentation. Chapter 10 also discusses software setup for data acquisition.

Chapter 11 discusses a few basics on how to use LabVIEW to acquire data using plug-in DAQ boards, as well as a brief overview on communicating with other instruments using GPIB and serial protocols.

Chapter 12 covers some invaluable features like local and global variables, attribute nodes, occurrences, data type conversions, and much more.

Chapter 13 shows you how to configure VI behavior and appearance using VI Setup options and how to access front panel controls using the keyboard. It also introduces LabVIEWÕs very useful Find function and Profile window.

Chapter 14 covers input/output (I/O) considerations such as printing, advanced file I/O, and networking with other computers.

In Chapter 15, you will learn how to create your own online help files and how to add a customized look to your applications by importing pictures and using the Control Editor. Chapter 15 also describes some good programming techniques that you can use to make your programs run faster, use less memory, port more easily to other platforms, and behave more efficiently overall.

You will find a glossary, index, and appendices at the end of the book.

Appendix A tells you how to contact National Instruments, the maker of LabVIEW, and points you toward other resources that can help you with LabVIEW. It also describes add-on toolkits available to enhance LabVIEW's functionality.

Appendix B talks a little bit about troubleshooting your VIs and answers some common questions.

A Note About Paths

Different platforms have different conventions for specifying path names. For example, Windows paths take the form X:\\LABVIEW\\MINE.LLB\\BINGO.VI. The same path on a Macintosh would be denoted Hard Drive Name:LabVIEW:Mine.llb:Bingo.vi. On UNIX machines, it would be /USR/LABVIEW/MINE.LLB/BINGO.VI. Rather than specifying a full path, this book will list the default path from the LabVIEW directory or folder when telling you where to find an example VI. To simplify notation, we will use the Windows standard to describe paths; if you use Mac OS or UNIX machines, please substitute colons or forward slashes where necessary.

LabVIEW Installation

If you have the full version of LabVIEW and need instructions on how to install it, please see the release notes that came with your software.

In addition, you will need to install the Everyone directory or folder from the CD-ROM in the back of this book. It contains the activities in this book and their solutions. To do so, open the appropriate directory for your platform and copy the Everyone directory or folder into your LabVIEW directory. Or, on Windows machines, you can run the setup program on the CD, tell it you have LabVIEW, and tell it to install the Everyone directory in your LabVIEW directory for you.

The EXAMPLES directory or folder installed by the full version of LabVIEW contains great example programs that you can use as is or modify to suit your needs.

Your Very Own Demo Disk

The CD included with this book contains a demonstration version of LabVIEW as well as solutions to the activities in the book. It also contains a few example programs for your enjoyment. You can use this sample software to work through almost all of the activities in the Fundamentals section (Chapters 1-9); exceptions are clearly marked. Most of the activities in the Advanced Topics section of the book are beyond the scope of the sample software and may not load into it. The sample software does not have the ability to do data acquisition or instrument control using GPIB or the serial port. In addition, most of the analysis functions are not available.

Please note that you can only save VIs temporarily using the sample software. Once you quit the LabVIEW demonstration version, the VIs saved during that session are lost.

To access the part of the sample software that lets you build VIs or investigate existing examples, start the application and select the Explore LabVIEW for Your Own Applications button in the lower right corner of the LabVIEW Demo main menu. Click OK on the first dialog box that pops up. Under Windows and UNIX, select New VI in the next dialog box to start building a fresh VI or choose Open VI to open an existing one. On Macintosh, choose New from the File menu to open a new VI or Open to bring up one that's already built.

The installation process places a directory or folder called vi.lib in the LABVIEW directory or folder. vi.lib contains support files for LabVIEW; you should not change the contents of this folder in any way or you might cause yourself much suffering.

Minimum Specifications for LabVIEW and the Sample Software

The basic engine of the sample software is the same as the full version of LabVIEW. The system requirements are also about the same, with the exception of hard disk space. You need about 50 MB of disk storage space to install the entire LabVIEW package (custom installations can be smaller). You can run the sample software directly from the CD-ROM if disk space is tight.

Windows

The Windows 3.1 version of LabVIEW 4.0 runs under Windows 3.1 and Windows for Workgroups 3.1 in 386 enhanced mode. You should have a minimum of 8 MB of RAM. LabVIEW can run on an 80386-based PC, but we strongly recommend a computer with an 80486 CPU. In addition, LabVIEW for Windows requires a math coprocessor.

The Windows 95 version of LabVIEW 4.0 runs under any system that supports Windows 95. You should have a minimum of 8 to 12 MB of RAM for this version to run smoothly.

The Windows NT version of LabVIEW 4.0 runs only under Windows NT version 3.5.1 or greater. You should have a minimum of 12 to 16 MB of RAM for this version to run smoothly. LabVIEW for Windows NT only runs on Windows NT 80x86 computers.

The Windows 95 and NT sample versions include online help and require about 13 MB of hard disk space; the Windows 3.1 version does not have online help and needs only about 6.5 MB.

MacOS

LabVIEW for the 680x0-based Macintosh requires a math coprocessor. LabVIEW requires a minimum of 5 MB of available RAM, in addition to the RAM requirements for your system software and any other applications that you want to run simultaneously. We recommend that you have at least 8 MB of RAM. You will need about 13 MB of hard disk space.

LabVIEW requires System 7 and will not run under earlier versions of the Macintosh operating system.

Sun and HP

LabVIEW for Sun runs on SPARCstations under Solaris 1.1 and 1.1.1 (SunOS 4.1.3) and Solaris 2.3 or later. LabVIEW for HP-UX runs on Hewlett-Packard Model 9000 Series 700 computers under HP-UX 9.0.3 or later.

The workstation should have 32 MB of RAM, with 32 MB or more of swap space storage. LabVIEW can run on less than 24 MB of RAM, but performance will suffer. You will need 8Ð10 MB of hard disk space.

All

LabVIEW uses a directory to store temporary files. Some of the temporary files are large, so we recommend that you have several megabytes of disk space available for this temporary directory. The default for the temporary directory is /tmp on Windows and UNIX, and inside the trash can on MacOS.

How to Install the Sample Software

Windows

Run setup.exe on the top level of the CD-ROM. It will ask you if you already have a copy of LabVIEW 4.0 or greater. If you do, you can install only the Everyone directory, or you can install the LabVIEW demo software, including Everyone (which takes a lot more space, but has some neat features).

If you do not already have LabVIEW (or if you choose to install the demo software), the setup program will install the correct version of the sample software (Windows 3.1 or Windows 95-NT) in a directory of your choice.

The setup program also gives you the choice of running the demo software from the CD. If you choose this option, setup creates a shortcut to the CD.

MacOS

Copy the appropriate folder (either 68KMac or PowerMac) onto your hard drive. Rename the folder LabVIEW if you would like to. If you want to access the LabVIEW demo guide tutorial, install the Adobe Acrobat viewer as well.

Sun

SunOS 4.x:

Use the command, mount -rt hsfs /dev/sr0/cdrom, then run /cdrom/lvdemo to run from the CD-ROM.

If you want to install the software on your hard disk, copy the appropriate directory onto your disk, then launch the file labview.

Solaris 2:

The CD mounts automatically as /cdrom/cdrom0. Run

/cdrom/cdrom0/lvdemo.

If you want to install the software on your hard disk, copy the appropriate directory onto your disk, then launch the file labview.

HP

Use sam to mount the CD-ROM. Run /cdrom/LVDEMO.

If you want to install the software on your hard disk, copy the appropriate directory onto your disk, then launch the file LABVIEW.

Purchasing LabVIEW

LabVIEW runs on the following platforms: Macintosh, Power Macintosh, PCs running Windows 3.1, Windows NT, or Windows 95, Sun SPARCstations, and HP 9000/700-series workstations running HP-UX. If you would like information on how to purchase LabVIEW, contact National Instruments.

National Instruments
6504 Bridge Point Parkway
Austin, Texas 78730
Telephone: (512) 794-0100
Fax: (512) 794-8411
E-mail: info@natinst.com.
Worldwide Web: ...

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews