Home > Store

Hands-On Exercise Manual for LabVIEW Programming, Data Acquisition and Analysis

Register your product to gain access to bonus material or receive a coupon.

Hands-On Exercise Manual for LabVIEW Programming, Data Acquisition and Analysis


  • Your Price: $33.15
  • List Price: $39.00
  • Usually ships in 24 hours.



  • Learn the LabVIEW G programming language fast with this hands-on exercise manual.
  • Great for both beginners to LabVIEW and advanced LabVIEW programmers interested in updating their programming techniques.
  • The manual takes the reader through the basics to practicing with simple and practical exercises, and then on to writing programs.
  • Part of the National Instruments Virtual Instrumentation Series.


  • Copyright 2001
  • Dimensions: K
  • Pages: 128
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-030368-2
  • ISBN-13: 978-0-13-030368-4

Structured, focused practice for mastering LabVIEW programming fast!

  • Master LabVIEW programming in six days, hands-on!
  • Over 60 real-world problems and solutions
  • Designed for easy learning and extensive real-world application
  • Extensively classroom-tested with professional engineers
  • Website: Tools, templates, solutions, and complete LabVIEW evaluation version

The supplementary workbook to LabVIEW Programming, Data Acquisition, and Analysis, this book presents a series of real-world programming challenges designed to help professionals master LabVIEW development in six focused one-day learning sessions.

Each session is organized into a series of short, 10 to 15 minute exercises, each with clear objectives and instructions designed to teach a single skill you can easily apply to your custom applications. Every skill is also mapped to the corresponding detailed explanations in LabVIEW Programming, Data Acquisition, and Analysis. Coverage includes:

  • Installing LabVIEW and working with source files and subVIs
  • Loops, conditional statements, and program flow
  • Displaying data and working with data types
  • Key categories of data acquisition and analysis applications
  • Saving/reading data and file I/O
  • Instrument control techniques
  • Implementing leading data analysis VIs, and more

The only way to truly master LabVIEW is to practice. This book gives you the structured, focused practice you need to achieve mastery fast. Whether you're a LabVIEW beginner or an experienced developer who want to update your skills, you'll find it an invaluable resource.


  • Complete library of LabVIEW tools and templates
  • Solutions to every exercise in this workbook
  • Full LabVIEW evaluation version


CD Contents

Untitled Document

Download the complete library of LabVIEW tools and templates and solutions to every exercise in this workbook.

Download your free trial version of the latest version of LabVIEW.

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130303682.pdf

Table of Contents

Drill Problems Day 1

Drill Problem 1.1 p021_WirePrac.vi.Drill Problem 1.2 p022_WirePrac.vi. Drill Problem 1.3 p023_ShrtCutPrac.vi. Drill Problem 1.4 p031_dBcalc.vi. Drill Problem 1.5 p032_QuitPrompt.vi. Drill Problem 1.6 p033_RNDisplay.v. Drill Problem 1.7 p041_ForLp&Indxng.vi. Drill Problem 1.8 p042_WhileLp&ShftReg.vi. Drill Problem 1.9 p043_Loops&Conditions.vi.

Drill Problems Day 2

Drill Problem 2.1 s051_MechActionOfBooleans.vi. Drill Problem 2.2 p052_MultiChChartGraph.vi. Drill Problem 2.3 p053_MultiChGphXo.vi. Drill Problem 2.4 p054_MultiChXYGph.vi. Drill Problem 2.5 p061_ArryPrac.vi. Drill Problem 2.6 p062_ClustrFcnPrac.vi. Drill Problem 2.7 p063_IntstyGphPxlByPxl.vi. Drill Problem 2.8 p064_IntstyGphAttNode.vi. Drill Problem 2.9 p065_Arry&ClustrUpdPrac.vi.

Drill Problems Day 3

Drill Problem 3.1 s081_AcqNScans.vi. Drill Problem 3.2 s082_CtsAcq&Chart(buff).vi. Drill Problem 3.3 s091_Gen1PtOn1Chwith_s082.vi. Drill Problem 3.4 s092_FGwith_s082.vi. Drill Problem 3.5 s101_CtsPTrn(8253)with_s082.vi. Drill Problem 3.6 s102_CntEvnts(8253).vi.Drill Problem 3.7 p111_WrtRdBin1D.vi. Drill Problem 3.8 p112_WrtRdASCII.vi. Drill Problem 3.9 p121_TypeCast.vi. Drill Problem 3.10 p141_AliasTest.vi p141_FFTproc.vi.

Drill Problems Day 4

Drill Problem 4.1 s081_AcqNScansDTrig.vi. Drill Problem 4.2 s082_AcqNScansExtChClk.vi. Drill Problem 4.3 s083_ContAcq&GphExtScanClk.vi. Drill Problem 4.4 p101_DigWrt&AI.vi p101_AISmplChs.vi. Drill Problem 4.5 p111_WrtRdBin1DCts.vi. Drill Problem 4.6 p112_WrtRdBin2D.vi. Drill Problem 4.7 p113_WrtRdASCIICts.vi. Drill Problem 4.8 p114_WrtRdMixed.vi. Drill Problem 4.9 p115_WrtRdDatalog.vi. Drill Problem 4.10 p116_RtrvDtalogDtaHalo.vi. Drill Problem 4.11 p117_SvDataWithPref.vi. Drill Problem 4.12 p121_ScrllbarCtrl.vi. Drill Problem 4.13 s131_LV&Serl.vi. Drill Problem 4.14 s132_LV&GPIB.vi. Drill Problem 4.15 p141_AcqNScns1Ch_QS1D&FFT.vi.

Drill Problems Day 5

Drill Problem 5.1 s141_FreqResp.vi. 70 Drill Problem 5.2 p142_FFTPairTest.vi.Drill Problem 5.3 s143_DecIntTest.vi. Drill Problem 5.4 s144_AliasTest&LPF.vi.Drill Problem 5.5 p145_FittingPrac.vi. Drill Problem 5.6 p151_While&Occrnce.vi. p151_WhileWoOccrnce.vi. Drill Problem 5.7 p152_ErrHndler_Main.vi p152_ErrHndler_Proc1.vi p152_ErrHndler_Proc2.vi p152_ErrHndler_Proc3.vi s152_ErrHndler_ErrDiply.vi.

Drill Problems Day 6

Drill Problem 6.1 p151_ListVIs.vi. Drill Problem 6.2 p152_DynamicLoad.vi. Drill Problem 6.3 p153_init.vi. p153_main.vi p153_menu1.vi p153_menu2.vi. Drill Problem 6.4 p154_StatCheck.vi. Drill Problem 6.5p155_4ToggleSW.vi. Drill Problem 6.6 p156_LocalVar&SR.vi. p156_AcquireData.vi p156_ProcData.vi. Drill Problem 6.7s156_LocalVar&SR.vi.




The first edition of Hands-on Exercise Manual for LabVIEW Programming, Data Acquisition and Analysis has been written to serve as a supplementary exercise manual for the main text LabVIEW Programming, Data Acquisition and Analysis. Originally, this manual started as a main text for the biannualG-programming workshop that I have been offering to the engineers and researchers in the local community. This first edition is the result of adding more examples and making a few corrections to the original manual.

Without practicing, the learning cycle of any subject can never be completed, and the ultimate goal of this exercise manual is to complete the cycle. All of the examples are carefully chosen to offer maximum efficiency in learning the G-programming language with LabVIEW in a minimal amount of time. For readers who are anxious to implement any example in their application immediately, solutions to all of the problems are provided on the accompanying CD-ROM. The CD-ROM also contains an evaluation copy of LabVIEW so that readers can create some simple VIs and execute them without having the full version of LabVIEW.

Each example in this manual is carefully designed so that readers can use it as a starting point in their application. In order to achieve such a task, the following rules have been abided by at all times during the design process of each example:

  1. Keep each example simple. A formidable-looking example would be nothing but a waste of time for both readers and myself. It can deliver some lessons, but going through other people's codes (in any programming language) to learn the programming language is always the worst way of learning it. Readers should first understand the basics, practice on some simple exercises, then write their own programs. Also, readers generally will not even look at such a complicated example. However, if each example is kept simple but meaningful, readers can easily understand the basic concept so that they can extend it to their applications easily. The fact is that eventually the readers are the one who will be writing their own applications. So all of the examples in this manual are kept simple, but concise and meaningful.
  2. Keep each example practical. This manual has not been written to show every feature that LabVIEW has. Yet it is written for both beginners and advanced LabVIEW programmers. Beginners will find many examples ready to be implemented in their applications. Advanced programmers will find many examples to be a good chance to update their programming technique. Most of the examples in this manual originated from the actual applications that I have written for private companies and engineers, so it should not be too difficult for readers to agree with me on the practical aspects of the examples in this manual.

Guidelines for the Readers

Use of This Manual

There are six sessions in this manual: Day 1, Day 2, Day 3, Day 4, Day 5, and Day 6. Each session has many drill problems with step-by-step instructions. Each drill problem has six subtitles. The following is an example:

  1. VIs to be used: p021_WirePrac.vi (Template provided.)
  2. Objective: To learn the correct and accurate wiring technique.
  3. Estimated time: 10-15 minutes
  4. Related chapter: Chapter 2
  5. Key objects, VIs, and functions in this drill problem:
    Functions >> Data Acquisition >> Analog Input >> AI Config.vi
  6. Instructions

The first subtitle, "VIs to be used," lists all of the VIs that are used in the corresponding drill problem. If the VI is a template, and you will have to complete it, it will state "(Template provided.)." If the VI is already complete and ready to execute, it will state "(The VI is already complete.)." If neither the VI is complete nor a template VI is provided, it will state "(You need to create a new VI.)" If the label starts with the letter s, the VI is already complete; otherwise, it is a template. For example, p021_WirePrac.vi is a template, whereas s021_WirePrac.vi is the solution. All of the solution VIs are located in the folders Day1Soln through Day6Soln on the accompanying CD-ROM.

The second subtitle, "Objective," addresses the goal of the drill problem briefly. The third subtitle, "Estimated time," is an approximation of the time that you may need to complete the problem. The fourth subtitle, "Related chapter," indicates the chapter where you can find the related topics in the main text. The fifth subtitle, "Key objects, VIs, and ... ," lists the labels of controls, indicators, VIs, and functions as well as their path to help you find them easily. The sixth subtitle, "Instructions," presents detailed descriptions about the drill problem as well as step-by-step instructions to complete the VI(s).

The best way to use this manual is by reviewing both the main text and this manual together. For example, after finishing each chapter of the main text, try the drill problems that correspond to that chapter. However, working on the drill problems without the main text is also possible since each exercise provides detailed steps to create the VI and explains its functionality. If you are an experienced LabVIEW programmer, you can definitely start with this manual. If you are new to LabVIEW, reviewing both the main text and this manual in parallel is recommended.

Equipment Recommended, but Not Required, for the Exercises in This Manual

  • LabPC-1200 or any data acquisition board by National Instruments and proper cables
  • CB-50 or any proper terminal block by National Instruments
  • Any GPIB board by National Instruments and proper cables
  • Screwdriver
  • Jumper wires
  • Function generator and appropriate cable connections
  • 1.5 V Battery of any size and a battery socket

Accompanying CD-ROM

The accompanying CD-ROM provides readers with the template VIs of the exercise problems in this manual and the complete solutions to them. Also included is an evaluation copy of LabVIEW with limited functionality. Most of the problems may be completed using the evaluation copy, but some will require the full version of LabVIEW.

Installation of Template and Solution VIs

The following steps will allow you to install the complete set of the template and the solution VIs in LabVIEW for easy access to them. Those steps, however, are applicable to the full version of LabVIEW only. You should manually find and open those VIs if the evaluation copy of LabVIEW is used.

  1. Start the full version of LabVIEW if it is not running already.
  2. Go to the pull-down menu Edit and choose Edit Control & Function Palettes.... This will bring up the Controls and the Functions palettes.
  3. Go to Functions, and pin down the subpalette User Libraries.
  4. Right click (PC platforms) or Command-click (Macintosh platforms) in any empty space in User Libraries. Choose Insert >> Submenu.... (The symbol >> indicates the path. See the next section Conventions for the complete list of conventions used in this manual.) This will bring up a window.
  5. Select the second option Link to an existing menu file (.mnu). This will bring up a directory navigation window.
  6. Find the file dir.mnu in the directory where all of the six example folders are located. (Day1VIs, Day2VIs, Day3VIs, Day4VIs, Day5VIs, and Day6VIs) It is recommended that you copy the six example folders onto your hard drive, and use them for the problems.
  7. Once you select dir.mnu in Step 6, you will see a new subpalette DrillProblems. Choose Save Changes to save the changes. Now, you can easily access all of the drill problem VIs in Functions >> User Libraries >> DrillProblems.
  8. Go to the Edit pull-down menu, and select Preferences.
  9. Select the menu Block Diagram.
  10. Check Show dots at wire junctions.
  11. Select the menu Front Panel.
  12. Uncheck End text entry with Return key (same as Enter key).
  13. Now, you are ready to begin the drill problems.

Issues on Macintosh Platforms

As for the key combination, the Control key can be replaced by the Command key for Macintosh platforms. Right clicking on the mouse is equivalent to Command-clicking on Macintosh platforms. Each directory in a path is conventionally separated by a backward slash (\) except for Macintosh platforms, where a colon (:) is used. For example, c:\my_folder\new_VIs would be equivalent to c:my_folder:new_VIs on Macintoshes. As for VI compatibility, you can transfer VIs across different platforms at your will. However, some functionality may not be applicable to different platforms; for example, if your VI contains sub VIs for Active X, it will not function correctly on Macintosh platforms since Macintosh platforms do not support Active X. Otherwise, the compatibility of VIs is transparent across different platforms, including Macintoshes.

Compatible Versions of LabVIEW

All of the example VIs are written in LabVIEW 5.0; therefore, LabVIEW 5.x or higher will be able to open them. However, all of the techniques and VIs can be realized in LabVIEW 3.x or higher. Also, since all of the examples are kept simple, you can easily duplicate them because they are written using standard LabVIEW VIs and functions. As for the data acquisition examples, they are the modified versions of LabVIEW examples. Therefore, you can easily duplicate them, too, by following the step-by-step instructions provided in this manual.

As the newer version appears, some of the names or paths (location of VIs) may not match. For example, the subpalette Functions >> Analysis has been divided into two new subpalettes Signal Processing and Mathematics with some new VIs in LabVIEW 5.1. Therefore, you should look for the two new subpalettes to find the analysis VIs if you are using LabVIEW 5.1 or higher.

Regardless of the version of your LabVIEW, however, this exercise manual is written in the most general way so that any difference in different versions should have no effect on using the drill problems except for the minor VI paths or names. This is due to the philosophy behind this manual and the main text: simplicity with rich applicability. Most of the differences in different versions of LabVIEW are minor, and you can easily catch up with them once you master this manual as well as the main text. Therefore, the differences in different LabVIEW versions will have no effect on both the main text and this exercise manual except for some minor VI paths or names. The information about such differences can be found in your LabVIEW package.

Hardware Configuration

In all drill problems about data acquisition and instrument control, it is assumed that your data acquisition board and GPIB board are properly configured regardless of the type and the vendor. If you are using LabPC-1200, configure the board with the following settings in NI-DAQ configuration utility: 1) analog input mode as Differential and 2) analog output Mode as Bipolar.

Screen Shots of VIs

All of the screen shots of VIs in this manual are used with the permission of National Instruments.


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership