Book Image

Data Acquisition Using LabVIEW.

By : Yik Yang
Book Image

Data Acquisition Using LabVIEW.

By: Yik Yang

Overview of this book

NI LabVIEW's intuitive graphical interface eliminates the steep learning curve associated with text-based languages such as C or C++. LabVIEW is a proven and powerful integrated development environment to interact with measurement and control hardware, analyze data, publish results, and distribute systems. This hands-on tutorial guide helps you harness the power of LabVIEW for data acquisition. This book begins with a quick introduction to LabVIEW, running through the fundamentals of communication and data collection. Then get to grips with the auto-code generation feature of LabVIEW using its GUI interface. You will learn how to use NI-DAQmax Data acquisition VIs, showing how LabVIEW can be used to appropriate a true physical phenomenon (such as temperature, light, and so on) and convert it to an appropriate data type that can be manipulated and analyzed with a computer. You will also learn how to create Distribution Kit for LabVIEW, acquainting yourself with various debugging techniques offered by LabVIEW to help you in situations where bugs are not letting you run your programs as intended. By the end of the book, you will have a clear idea how to build your own data acquisition system independently and much more.
Table of Contents (18 chapters)
Data Acquisition Using LabVIEW
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
9
Alternate Software for DAQ

Preface

One of my most concerns, after finishing the book still is that the relationship of this book and the rest of the many of the other valuable functions is not appropriately mentioned.

What I would like from the readers to explore tons of videos and descriptions of functions from the www.NI.com.

Throughout the book I have tried to keep a balance between information for a novice to LabVIEW to intermediate user. I am came to this conclusion by more than a decade of working as design and automation and converting systems (hardware/software) from many other languages and hardware to products from National instruments mostly LabVIEW and and TestStand.

I believe I did not even use the word TestStand in the book; which I myself believe is an atrocity to such software and how one completes the other one. I did so because these systems are not explainable in words and only a book and accompanying videos can do the justice to LabVIEW and TestStand. 

During last decade experience of mine with these software and hardware, there was not one manager that disagreed with me on recommendation of switching the existing system into LabVIEW and NI hardware.

I spent many days on the how the whole structure of the book should be. And if you read further you see that I used few actual hardware from NI than actually I would liked to. In my experience I noticed many works that the engineers had hacked some LabVIEW coed into languages like C or even basic. But this comes at a coast.

Being a completely GUI, LabVIEW has this images that many people look at a VI and say that "oh.. I can do this" but if similar code is shown to them in C or Basic, then the same people think twice.

Here lies the dichotomy. Cost versus practicality. LabVIEW is costly. While one can find many C compiler for free, it is sometimes hard to convince the upper management to migrate or start with LabVIEW. I found the best way to convince "finance" department is to make several simple and maybe some more complicated examples of the same program in both languages. I insist on this point strongly with a tiny "but".

The fact is that there is not one language that can be used everywhere. As we speak new languages are created and used.

With all I said, I mostly want to achieve two crucial points:

  • My first choice to consider for any job would be LabVIEW

  • LabVIEW is not appropriate for everything that exists out there

There is another important point that I would like to emphasize is that since LabVIEW is also attractive in appearance also, it influences a new graduate or a new engineer to cut short the homework that they must do.

LabVIEW does come with some standard functions, but unlike other languages, implementing a function that is written by an independent engineer is very simple. This is more important that it sounds.

It used to be a major technology change would come not shorter than 6 months. But now ( 2017) hardly anyone can keep up with the advances in their own expertise let alone what is going on the rest of the world of technology.

Importance of formal education                      

When I first got my engineering job at "Packard Bell" not to be confused "Hewlett Packard" I could not relate what we had learned in school  and university with anything my manager wanted from me. This sounds like a contradiction with the title of this paragraph. But trust me they finally come together.

What I am trying to emphasize here is that do not take formal education lightly. National Instrument has training classes and if you are serious about learning LabVIEW and/or LabVIEW is your source of income, try your outmost to participate in formal education by NI.

 TestStand

I have come to believe that one may get away by using LabVIEW in very high percentage of the jobs actual that is exist out there now (of corset hi is a relative statement) But there is a another software that complements LabVIEW very beautifully. The software is called TestStand and I have consciously have stayed away from TestStand both of these giant software and hardware that do require many books ( at least two, one for each one)  I strongly advice engineers that do automation tale a close look at the TestStand.

There is much help available

First of all like many other software companies, there is a technical help available from NI. In fact I believe one year of help is available with any purchase of LabVIEW. But also note that LabVIEW comes in more than one flavor choose the original version carefully.

What this book covers

Chapter 1 , LabVIEW Basics, there is a brief introduction and a short note on installation. We will go over the most widely used pallets and objects Icon toolbar from a standard installation of LabVIEW and provide a brief explanation of what each object does.

Chapter 2 , The Most Common Communication Buses, discusses the most common and practical ways we may  communicate with external devices and collect data using LabVIEW.

Chapter 3 , Using the DAQ Assistant to Automatically Generate LabVIEW Code, we use the automation capabilities of LabVIEW to create a VI that captures a triangular signal through simple DAQ hardware. We also use the DAQ Assistant VI to do almost all of the required programming.

Chapter 4 , DAQ Programming Using LabVIEW, we started by defining what precisely the definition of data acquisition is. Further, we went through programs that actually used a programmable power supply and an oscilloscope where we set the power supply to specific values and measured the true output value of the power supply via an oscilloscope.

Chapter 5 , DAQ Debugging Techniques, we have explored most, but not all debugging techniques that LabVIEW provides.

Chapter 6 , Real-World DAQ Programming Techniques, focusses on minimal techniques that target a factory or a production environment.

Chapter 7 , Real-Time Issues, discusses how to resolve upgradation issues.

Chapter 8 , DAQ at a Distance - Network and Distributed Systems, shows how to use. Conet an ENET100 and we went through the connection step-by-step and verified each one.

Chapter 9 , Alternate Software for DAQ, is about a second portion of powerful features provided within WebStorm. In this chapter, we focus on some of WebStorm's power features that help us boost productivity and developer experience.

Chapter 10 , Non-National Instrument Devices DAQ, is about a second portion of powerful features provided within WebStorm. In this chapter, we focus on some of WebStorm's power features that help us boost productivity and developer experience.

Chapter 11 , LabVIEW and Simple Microcontrollers, is about a second portion of powerful features provided within WebStorm. In this chapter, we focus on some of WebStorm's power features that help us boost productivity and developer experience.

What you need for this book

 Refer to the LabVIEW Readme for more information on system requirements at http://www.ni.com/pdf/manuals/374715f.html. For latest information on LabVIEW you can visit http://sine.ni.com/psp/app/doc/p/id/psp-357.

Who this book is for

If you are an engineer, scientist, experienced hobbyist, or student, you will highly benefit from the content and examples illustrated in this book. A working knowledge of precision testing, measurement instruments, and electronics, as well as a background in computer fundamentals and programming is expected.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "For example, a while loop can only be selected in Block Diagram"

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "To use an object, right-click inside the Block Diagram or Front Panel window, a pallet list appears."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Data-Acquisition-Using-LabVIEW. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/DataAcquisitionUsingLabVIEW_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.