Home
Prev Book Next
Book
More books in category: Labview
by: Jeffrey Y Beyon AMAZON multi-meters discounts
AMAZON oscilloscope discounts
Topics include:
CLICK
HERE for more information and price
Description
For field engineers and researchers who must learn LabVIEW programming in order to do data acquisition and analysis.
LabVIEW is a revolutionary graphical programming development environment used to write virtual instruments. Thousands of successful engineers, scientists, and technicians use LabVIEW to create solutions for their demanding test and measurement application needs for data acquisition and control, data analysis, and data presentation. This exercise guide functions as a stand-alone "short-course" for learning LabVIEW programming or as an add-on exercise manual to Beyon's LabVIEW Programming Data Acquisition, and Analysis. The book is broken out into 6 learning sessions, each of which has drill problems with step-by-step problems. All of the examples are simple-they are meant to enable the reader to understand the basics, practice simple exercises and then go on to write his/her own programs. The examples are also practical-ideal for beginners who will find examples that are ready to be implemented and also great for experienced programmers interested in updating their programming techniques.
Preface
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 and 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.
Reviews:
|