+ All Categories
Home > Documents > LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced...

LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced...

Date post: 08-Jun-2018
Category:
Upload: danghuong
View: 226 times
Download: 0 times
Share this document with a friend
30
LabVIEW based Advanced Instrumentation Systems
Transcript
Page 1: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

LabVIEW based Advanced Instrumentation Systems

Page 2: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

123

S. Sumathi and P. Surekha

LabVIEW based Advanced Instrumentation Systems

With 488 Figures and 34 Tables

Page 3: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Library of Congress Control Number:

This work is subject to copyright. All rights are reserved, whether the whole or part of the materialis concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broad-casting, reproduction on microfilm or in any other way, and storage in data banks. Duplication ofthis publication or parts thereof is permitted only under the provisions of the German Copyright Lawof September 9, 1965, in its current version, and permission for use must always be obtained fromSpringer. Violations are liable to prosecution under the German Copyright Law.

Springer is a part of Springer Science+Business Media.

springer.com

The use of general descriptive names, registered names, trademarks, etc. in this publication does notimply, even in the absence of a specific statement, that such names are exempt from the relevant pro-tective laws and regulations and therefore free for general use.

Printed on acid-free paper 5 4 3 2 1 0

Dr.

Department of Electrical and Electronics Engineering

© Springer-Verlag Berlin Heidelberg 2007

Typesetting by the authors and SPi

89/3100/SPi

Assistant Professor

PSG College of Technology Coimbatore 641 004

Tamil N adu, India

S. Sumathi

E-mail: [email protected]

2006936972

ISBN-10 3-540-48500-7 Springer Berlin Heidelberg New York

SPIN 11803485

ISBN-13 978-3-540-48500-1 S pringer Berlin Heidelberg New York

Programmer Analyst Cognizant Technology Solutions

Chennai - 600 096Okkiyam Thoraipakkam

¨

Prof. Surekha. P

5/535, old Mahabalipuram R oad

E-mail: [email protected]

Cover design: KunkelLopka GmbH

Page 4: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Preface

Information is a valuable resource to an organization. User-friendly, computer-controlled instrumentation and data analysis techniques are revolutionizingthe way measurements are being made, allowing nearly instantaneous comp-arison between theoretical predictions, simulations, and actual experimentalresults. This book provides comprehensive coverage of fundamentals of advan-ced instrumentation systems based on LabVIEW concepts. This book is forthose who wish a better understanding of virtual instrumentation concepts,its purpose, its nature, and the applications developed using the NationalInstrument’s LabVIEW software.

The evolution and pervasiveness of PCs as cost-effective computing plat-forms, recently joined by workstations with more powerful software tools,has resulted in a virtual explosion in data acquisition, signal processingand control systems from laboratory to industry including field applications.An ever-increasing array of industry-standard design and simulation toolsprovides the opportunity to fully integrate the use of computers directly inthe laboratory. Advanced techniques in instrumentation and control such asDistributed Automation and SCADA are dealt in this book.

The current trends in instrumentation like Fiber optic instrumentation,LASER instrumentation, Smart Transmitters, and CASE have made virtualinstrumentation to support high availability, and increase in popularity.

This text discusses a number of new technologies and challenges of virt-ual instrumentation systems in terms of applications in the areas includingcontrol systems, power systems, networking, robotics, communication, andartificial intelligence.

About the Book

The book is meant for wide range of readers from College, University Studentswishing to learn basic as well as advanced concepts in virtual instrumenta-tion system. It can also be meant for the programmers who may be involved

Page 5: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

VI Preface

in the programming based on the LabVIEW and virtual instrumentationapplications.

Virtual Instrumentation System, at present is a well developed field, amongacademicians as well as between program developers. The various approachesto data transmission, the common interface buses and standards of instru-mentation are given in detail.

The solutions to the problems in instrumentation are programmed usingLabVIEW and the results are given. An overview of LabVIEW with exam-ples is provided for easy reference of the students and professionals. Thisbook also provides research projects, LabVIEW tools, and glossary of virtualinstrumentation terms in appendix.

The book also presents Application Case Studies on a wide range of connec-ted fields to facilitate the reader for better understanding. This book can beused from Under Graduation to Post-Graduate Level. We hope that the readerwill find this book a truly helpful guide and a valuable source of informationabout the advanced instrumentation principles for their numerous practicalapplications.

Salient Features

The salient features of this book includes:

– Detailed description on virtual instrumentation system concepts.– Worked out examples using LabVIEW software.– Application case studies based on LabVIEW in various fields like Instru-

mentation and Control, Power Systems, Robotics, Networking and Comm-unication, and Artificial Intelligence.

– LabVIEW Tools, Research Projects, and Glossary.

Organization of the Book

The book starts with the introduction to virtual instrumentation and coversin detail on the advanced virtual instrumentation concepts, techniques, andapplications.

– Chapter 1 presents an introduction to virtual instrumentation concepts,architecture of a virtual instrumentation system and the role of variouscomponents in the architecture. It introduces the concept of distributedvirtual instrumentation systems and conventional virtual instrumentationsystems. The advantages of virtual instrumentation is discussed and com-pared with the conventional virtual instrumentation systems.

– Chapter 2 provides an overview of virtual instruments such as the frontpanel and the block diagram in virtual instrumentation software, Lab-VIEW. It discusses the menus used by the virtual instruments, ‘G’ Prog-ramming concepts, Data flow model in the block diagram, and the datatypes and its representation. The VI libraries and creation of a SubVI arealso investigated here.

Page 6: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Preface VII

– Chapter 3 describes the structures available in LabVIEW such as Forloop, While loop, Case structures and Sequence structure. This chapteralso addresses issues related to arrays, clusters and formula node. Besidesthese aspects, data displaying elements on the front panel such as wave-form charts, waveform graphs, XY graphs, and intensity plots are alsoillustrated with suitable examples.

– Chapter 4 deals with the components of a typical measurement system,origin of signals and the various types of signal acquiring devices suchas sensors and transducers. The concepts of signal conditioning and theSCXI, a signal conditioning and front end fore plug in DAQ boards arealso discussed. The output of the sensors are in analog form, hence toprocess them analog to digital converters are used. Conversions back toanalog signals are accomplished using digital-to-analog converters.

– Chapter 5 describes the operation and characteristic feature of serialcommunication devices such as 4–20, 60 mA current loops along with theRS232C standard. The IEEE standard GPIB is also detailed in later partof this chapter. VISA, which is a high level API is capable of controllingVXI, GPIB, or Serial instruments is also delineated.

– Chapter 6 focusses on the most common and latest PC interface busessuch as USB, PCI, PXI, PCMCIA, VXI, and LXI. Modern computerbuses can use both parallel and bit-serial connections, and can be wiredin either a multidrop or daisy chain topology, or connected by switchedhubs.

– Chapter 7 touches the aspects related with signal grounding and digi-tal I/O techniques. The approach of data acquisition in LabVIEW iselaborated with the DAQ components and the Hardware and Softwareconfiguration.

– Chapter 8 encompasses the operation and characteristic features of datatransmission such as pulse codes, analog and digital modulation, wirelesscommunication, RF analyser, distributed automation, and SCADA. Datatransmission plays a very important role in all kind of digital equipmentsas it is the responsibility of these devices to transmit the data withoutbeing lost.

– Chapter 9 elaborates on the current trends in instrumentation such as fiberoptic and laser instrumentation. The various types of fiber optic sensorsincluding voltage, pressure, stress, temperature, and laser sensors includ-ing velocity, distance, and length are also discussed. The later sections ofthis chapter presents on the concepts of smart transmitter and CASE.

– Chapter 10 presents the recent approaches of LabVIEW in Virtual instru-mentation with application examples in the areas of instrumentation,control systems, power systems, and robotics.

– Chapter 11 illustrates the application examples based on LabVIEW in theareas of communication, networking, artificial intelligence, and biomedicalinstrumentation.

Page 7: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

VIII Preface

About the Authors

S. Sumathi completed B.E. (Electronics and Communication Engineering),M.E. (Applied Electronics) at Government College of Technology, Coimbatore,Tamil Nadu, and Ph.D. in data mining. Currently, working as AssistantProfessor in the Department of Electrical and Electronics Engineering, PSGCollege of Technology, Coimbatore with teaching and research experienceof 16 years. She received the prestigious gold medal from the Institution ofEngineers Journal Computer Engineering Division for the research papertitled, “Development of New Soft Computing Models for Data Mining” andalso best project award for UG Technical Report titled, “Self-OrganizedNeural Network Schemes: As a Data mining tool”; Dr. R. Sundramoorthyaward for Outstanding Academic of PSG College of Technology in the year2006. She has guided a project which received Best M. Tech Thesis award fromIndian Society for Technical Education, New Delhi. In appreciation of pub-lishing various technical articles she has received National and InternationalJournal Publication Awards. She has prepared manuals for Electronics andInstrumentation Lab and Electrical and Electronics Lab of EEE Department,PSG College of Technology, Coimbatore and also organized second NationalConference on Intelligent and Efficient Electrical Systems in the year 2005and conducted Short-Term Courses on “Neuro Fuzzy System Principles andData Mining Applications.” She has published several research articles inNational and International Journals/Conferences and guided many UG andPG projects. She has also published three books on, “Introduction to NeuralNetworks with MATLAB,” “Introduction to Fuzzy Systems with MATLAB”and “Introduction to Data mining and its Applications.” She reviewed papersin National/International Journals and Conferences. The Research interestsinclude Neural Networks, Fuzzy Systems and Genetic Algorithms, PatternRecognition and Classification, Data Warehousing and Data Mining, Opera-ting systems and Parallel Computing, etc.

Surekha P. completed her B.E. Degree in Electrical and ElectronicsEngineering in PARK College of Engineering and Technology, Coimbatore,Tamil Nadu, and Masters Degree in Control Systems at PSG College ofTechnology, Coimbatore, Tamil Nadu. She was a Rank Holder in both B.E.and M.E. programmes. She has received Alumni Award for best performancein curricular and cocurricular activities during her Masters Degree prog-ramme. She has presented papers in National Conferences and Journals.She is currently working as a programmer analyst in Cognizant TechnologySolutions, Chennai, Tamil Nadu. Her research areas include robotics, virtualinstrumentation, neural network, fuzzy logic theory and genetic algorithm.

Page 8: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Acknowledgement

The authors are always thankful to the Almighty for perseverance and achieve-ments. They wish to thank Mr. G. Rangaswamy, Managing Trustee, PSGInstitutions and Dr. R. Rudramoorthy, Principal, PSG College of Technology,Coimbatore, for their whole-hearted cooperation and great encouragementgiven in this successful endeavour. They also appreciate and acknowledgevery much to Mr. K.K.N. Anburajan, Lab-in-Charges of EEE Department,PSG College of Technology, Coimbatore who have been with them in all theirendeavours with their excellent, unforgettable help, and assistance in the suc-cessful execution of the work. Sumathi owes much to her daughter, Priyanka,who has helped and to the support rendered by her husband, brother, andfamily. Surekha would like to thank her parents, brother, and husband whoshouldered a lot of extra responsibilities during the months this was beingwritten. They did this with the long-term vision, depth of character, andpositive outlook that are truly befitting of their name.

Page 9: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents

1 Introduction to Virtual Instrumentation . . . . . . . . . . . . . . . . . . . 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 History of Instrumentation Systems . . . . . . . . . . . . . . . . . . . . . . . 21.3 Evolution of Virtual Instrumentation . . . . . . . . . . . . . . . . . . . . . 41.4 Premature Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 Virtual Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.5.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.5.2 Architecture of Virtual Instrumentation . . . . . . . . . . . 61.5.3 Presentation and Control . . . . . . . . . . . . . . . . . . . . . . . . 101.5.4 Functional Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.6 Programming Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.7 Drawbacks of Recent Approaches . . . . . . . . . . . . . . . . . . . . . . . . . 131.8 Conventional Virtual Instrumentation . . . . . . . . . . . . . . . . . . . . . 131.9 Distributed Virtual Instrumentation . . . . . . . . . . . . . . . . . . . . . . 141.10 Virtual Instruments Versus Traditional Instruments . . . . . . . . . 171.11 Advantages of VI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.11.1 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181.11.2 Platform-Independent Nature . . . . . . . . . . . . . . . . . . . . 191.11.3 Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191.11.4 Lower Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191.11.5 Plug-In and Networked Hardware . . . . . . . . . . . . . . . . . 191.11.6 The Costs of a Measurement Application . . . . . . . . . . 201.11.7 Reducing System Specification Time Cost . . . . . . . . . . 201.11.8 Lowering the Cost of Hardware and Software . . . . . . . 201.11.9 Minimising Set-Up and Configuration Time Costs . . . 201.11.10 Decreasing Application Software Development

Time Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211.12 Evolution of LabVIEW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211.13 Creating Virtual Instruments Using LabVIEW . . . . . . . . . . . . . 22

1.13.1 Connectivity and Instrument Control . . . . . . . . . . . . . . 231.13.2 Open Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Page 10: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

XII Contents

1.13.3 Reduces Cost and Preserves Investment . . . . . . . . . . . . 241.13.4 Multiple Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241.13.5 Distributed Development . . . . . . . . . . . . . . . . . . . . . . . . 251.13.6 Analysis Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251.13.7 Visualization Capabilities . . . . . . . . . . . . . . . . . . . . . . . . 251.13.8 Flexibility and Scalability . . . . . . . . . . . . . . . . . . . . . . . . 26

1.14 Advantages of LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.14.1 Easy to Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.14.2 Easy to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.14.3 Complete Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . 271.14.4 Modular Development . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1.15 Virtual Instrumentation in the Engineering Process . . . . . . . . . 271.15.1 Research and Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.15.2 Development Test and Validation . . . . . . . . . . . . . . . . . 281.15.3 Manufacturing Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.15.4 Manufacturing Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

1.16 Virtual Instruments Beyond the Personal Computer . . . . . . . . 29

2 Programming Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.2 Virtual Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2.2.1 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.2.2 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

2.3 LabVIEW Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422.3.1 Startup Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442.3.2 Shortcut Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442.3.3 Pull-Down Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452.3.4 Pop-Up Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502.3.5 Palletes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

2.4 Dataflow Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612.5 ‘G’ Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

2.5.1 Data Types and Conversion . . . . . . . . . . . . . . . . . . . . . . 632.5.2 Representation and Precision . . . . . . . . . . . . . . . . . . . . . 642.5.3 Creating and Saving VIs . . . . . . . . . . . . . . . . . . . . . . . . . 662.5.4 Wiring, Editing, and Debugging . . . . . . . . . . . . . . . . . . 682.5.5 Creating SubVIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732.5.6 VI Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

3 Programming Concepts of VI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813.2 Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

3.2.1 The For Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823.2.2 The While Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883.2.3 Shift Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953.2.4 Feedback Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Page 11: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents XIII

3.3 Selection Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003.3.1 Case Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1013.3.2 Sequence Structures (Flat and Stacked Structures) . . 107

3.4 The Formula Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1113.5 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

3.5.1 Single and Multidimensional Arrays . . . . . . . . . . . . . . . 1133.5.2 Autoindexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153.5.3 Functions for Manipulating Arrays . . . . . . . . . . . . . . . . 1173.5.4 Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

3.6 Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1263.6.1 Creating Cluster Controls and Indicators . . . . . . . . . . 1283.6.2 Cluster Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1303.6.3 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

3.7 Waveform Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1383.7.1 Chart Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1423.7.2 Mechanical Action of Boolean Switches . . . . . . . . . . . . 145

3.8 Waveform Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1463.8.1 Single-Plot Waveform Graphs . . . . . . . . . . . . . . . . . . . . 1473.8.2 Multiple-Plot Waveform Graphs . . . . . . . . . . . . . . . . . . 147

3.9 XY Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1483.10 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

3.10.1 Creating String Controls and Indicators . . . . . . . . . . . 1553.10.2 String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

3.11 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1613.12 List Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1633.13 File Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

3.13.1 File I/O VIs and Functions . . . . . . . . . . . . . . . . . . . . . . 1633.13.2 File I/O Express VIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

4 Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1734.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1734.2 Components of Measuring System . . . . . . . . . . . . . . . . . . . . . . . . 1744.3 Origin of Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

4.3.1 Transducers and Sensors . . . . . . . . . . . . . . . . . . . . . . . . . 1784.3.2 Acquiring the Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1794.3.3 Sampling Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1804.3.4 Filtering and Averaging . . . . . . . . . . . . . . . . . . . . . . . . . 1804.3.5 Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1834.3.6 Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

4.4 Transducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1844.4.1 Selecting a Transducer . . . . . . . . . . . . . . . . . . . . . . . . . . . 1854.4.2 Electrical Transducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

4.5 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1964.5.1 The Nose as a Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1984.5.2 Sensors and Biosensors: Definitions . . . . . . . . . . . . . . . . 199

Page 12: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

XIV Contents

4.5.3 Differences Between Chemical Sensors, PhysicalSensors, and Biosensors . . . . . . . . . . . . . . . . . . . . . . . . . . 200

4.5.4 Thermocouples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2014.5.5 RTD: Resistance Temperature Detector . . . . . . . . . . . . 2034.5.6 Strain Gauges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

4.6 General Signal Conditioning Functions . . . . . . . . . . . . . . . . . . . . 2064.6.1 Amplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2064.6.2 Filtering and Averaging . . . . . . . . . . . . . . . . . . . . . . . . . 2074.6.3 Isolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2074.6.4 Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2074.6.5 Digital Signal Conditioning . . . . . . . . . . . . . . . . . . . . . . 2084.6.6 Pulse Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2084.6.7 Signal Conditioning Systems for PC-Based

DAQ Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2084.6.8 Signal Conditioning with SCXI . . . . . . . . . . . . . . . . . . . 209

4.7 Analog-to-Digital Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2104.7.1 Understanding Integrating ADCs . . . . . . . . . . . . . . . . . 2104.7.2 Understanding SAR ADC . . . . . . . . . . . . . . . . . . . . . . . . 2144.7.3 Understanding Flash ADCs . . . . . . . . . . . . . . . . . . . . . . 2184.7.4 Understanding Pipelined ADCs . . . . . . . . . . . . . . . . . . . 225

4.8 Digital-to-Analog Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

5 Common Instrument Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2395.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2395.2 4–20 mA Current Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

5.2.1 Basic 2-wire Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2415.2.2 4–20 mA Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2425.2.3 3 V/5 V DACs Support Intelligent Current Loop . . . . 2455.2.4 Basic Requirements for 4–20 mA Transducers . . . . . . . 2455.2.5 Digitally Controlled 4–20 mA Current Loops . . . . . . . 245

5.3 60 mA Current Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2475.4 RS232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2495.5 RS422 and RS485 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2535.6 GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

5.6.1 History and Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2555.6.2 Types of GPIB Messages . . . . . . . . . . . . . . . . . . . . . . . . 2575.6.3 Physical Bus Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 2575.6.4 Physical Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2615.6.5 IEEE 488.2 STANDARD . . . . . . . . . . . . . . . . . . . . . . . . 2615.6.6 Advantages of GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

5.7 VISA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2645.7.1 Supported Platforms and Environments . . . . . . . . . . . 2655.7.2 VISA Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2655.7.3 DEFAULT Resource Manager, Session,

and Instrument Descriptors . . . . . . . . . . . . . . . . . . . . . . 266

Page 13: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents XV

5.7.4 VISAIC and Message-Based Combination . . . . . . . . . . 2715.7.5 Message-Based Communication . . . . . . . . . . . . . . . . . . . 2725.7.6 Register-Based Communication . . . . . . . . . . . . . . . . . . . 2745.7.7 VISA Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2755.7.8 Advantages of VISA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

6 Interface Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2816.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2816.2 USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

6.2.1 Architecture of USB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2826.2.2 Need for USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2836.2.3 Power Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2846.2.4 Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2866.2.5 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2886.2.6 Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 2896.2.7 Suspend Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2916.2.8 Cables or Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2916.2.9 USB Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2926.2.10 USB Descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2936.2.11 Advantages of USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295

6.3 PCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2956.3.1 A 32-Bit Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2966.3.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2966.3.3 Architecture of PCI with Two Faces . . . . . . . . . . . . . . . 2976.3.4 Features of PCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2976.3.5 Low Profile PCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3006.3.6 PCI-X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3006.3.7 PCI for Data Communication . . . . . . . . . . . . . . . . . . . . 3016.3.8 PCI IDE Bus Mastering . . . . . . . . . . . . . . . . . . . . . . . . . 3026.3.9 PCI Internal Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . 3036.3.10 PCI Bus Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . 3036.3.11 PCI Expansion Slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3046.3.12 Standardization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3056.3.13 Using PCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

6.4 PCI Express . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3066.4.1 Need for PCI Express . . . . . . . . . . . . . . . . . . . . . . . . . . . 3066.4.2 Types of PCI Express Architecture . . . . . . . . . . . . . . . . 3066.4.3 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3076.4.4 Express Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

6.5 PXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3086.5.1 PXI Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3086.5.2 Interoperability with Compact PCI . . . . . . . . . . . . . . . 3116.5.3 Electrical Architecture Overview . . . . . . . . . . . . . . . . . . 3126.5.4 Software Architecture Overview . . . . . . . . . . . . . . . . . . 315

6.6 PCMCIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

Page 14: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

XVI Contents

6.6.1 Features of PCMCIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3166.6.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3176.6.3 Board Layout and Jumper Settings . . . . . . . . . . . . . . . 3176.6.4 Types of PC Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3176.6.5 Features of PC Card Technology . . . . . . . . . . . . . . . . . . 3186.6.6 Utilities of PCMCIA Card in the Networking

Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3186.7 SCXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

6.7.1 SCXI Hardware and Software . . . . . . . . . . . . . . . . . . . . 3196.7.2 Analog Input Signal Connections . . . . . . . . . . . . . . . . . 3206.7.3 SCXI Software-Configurable Settings . . . . . . . . . . . . . . 3226.7.4 Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3256.7.5 Typical Program Flowchart . . . . . . . . . . . . . . . . . . . . . . 328

6.8 VXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3326.8.1 Need for VXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3326.8.2 Features of VXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3336.8.3 VXI Bus Mechanical Configuration . . . . . . . . . . . . . . . . 3336.8.4 Noise Incurred in VXI . . . . . . . . . . . . . . . . . . . . . . . . . . . 3346.8.5 Hardware Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3356.8.6 Register-Based Devices . . . . . . . . . . . . . . . . . . . . . . . . . . 3366.8.7 Message-Based Communication

and Serial Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3366.8.8 Commander/Servant Hierarchies . . . . . . . . . . . . . . . . . . 3366.8.9 Three Ways to Control a VXI System . . . . . . . . . . . . . 3386.8.10 Software Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

6.9 LXI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3386.9.1 LXI Modular Switching Chassis . . . . . . . . . . . . . . . . . . 3396.9.2 LXI/PXI Module Selection . . . . . . . . . . . . . . . . . . . . . . . 340

7 Hardware Aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3457.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3457.2 Signal Grounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

7.2.1 Single-Ended Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3467.2.2 Differential Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3477.2.3 System Ground and Isolation . . . . . . . . . . . . . . . . . . . . . 3487.2.4 Wiring Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

7.3 Digital I/O Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3527.3.1 Pull-Up and Pull-Down Resistors . . . . . . . . . . . . . . . . . 3527.3.2 TTL to Solid-State Relays . . . . . . . . . . . . . . . . . . . . . . . 3537.3.3 Voltage Dividers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

7.4 Data Acquisition in LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . 3557.5 Hardware Installation and Configuration . . . . . . . . . . . . . . . . . . 355

7.5.1 Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3567.5.2 Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

Page 15: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents XVII

7.6 Components of DAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3577.6.1 System Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3577.6.2 NI-DAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

7.7 DAQ Signal Accessory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3597.7.1 Function Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3617.7.2 Microphone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3627.7.3 Thermocouple and IC Temperature Sensor . . . . . . . . . 3637.7.4 Noise Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3637.7.5 Digital Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3637.7.6 Counter/Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3637.7.7 Quadrature Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

7.8 DAQ Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3647.8.1 MAX-Based Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3667.8.2 Steps to Create a MAX-Based Task . . . . . . . . . . . . . . . 3667.8.3 Project-Based Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3677.8.4 Steps to Create a Project-Based Task . . . . . . . . . . . . . 3677.8.5 Project-Based and MAX-Based Tasks . . . . . . . . . . . . . 3697.8.6 Edit a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3717.8.7 Copy a MAX Task to Project . . . . . . . . . . . . . . . . . . . . 372

7.9 DAQ Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3727.9.1 Windows Configuration Manager . . . . . . . . . . . . . . . . . 3727.9.2 Channel and Task Configuration . . . . . . . . . . . . . . . . . . 3737.9.3 Hardware Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3737.9.4 Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3747.9.5 Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3757.9.6 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3767.9.7 Counters and Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

7.10 DAQ Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

8 Data Transmission Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3818.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3818.2 Pulse Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

8.2.1 RZ and RB Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . 3828.2.2 NRZ Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3858.2.3 Phase Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388

8.3 Analog and Digital Modulation Techniques . . . . . . . . . . . . . . . . 3908.3.1 Amplitude Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . 3928.3.2 Frequency Modulation (FM) . . . . . . . . . . . . . . . . . . . . . 3948.3.3 Phase Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3968.3.4 Need for Digital Modulation . . . . . . . . . . . . . . . . . . . . . . 3978.3.5 Digital Modulation and their Types . . . . . . . . . . . . . . . 3988.3.6 Applications of Digital Modulation . . . . . . . . . . . . . . . . 401

8.4 Wireless Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4018.4.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4028.4.2 Wireless Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403

Page 16: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

XVIII Contents

8.4.3 Trends in Wireless Communication . . . . . . . . . . . . . . . . 4048.4.4 Software Defined Radio . . . . . . . . . . . . . . . . . . . . . . . . . . 405

8.5 RF Network Analyser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4078.6 Distributed Automation and Control Systems . . . . . . . . . . . . . . 413

8.6.1 Distributed Control Systems . . . . . . . . . . . . . . . . . . . . . 4138.6.2 Computers in Industrial Control . . . . . . . . . . . . . . . . . . 4148.6.3 Applications of Computers in Process Industry . . . . . 4158.6.4 Direct Digital and Supervisory Control . . . . . . . . . . . . 4168.6.5 Architecture of Distributed Control Systems . . . . . . . . 4178.6.6 Advantages of Distributed Control Systems . . . . . . . . 4208.6.7 CORBA-Based Automation Systems . . . . . . . . . . . . . . 422

8.7 SCADA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4238.7.1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4248.7.2 Security Concerns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4308.7.3 Analysis of the Vulnerabilities of SCADA Systems . . 4318.7.4 Security Recommendations . . . . . . . . . . . . . . . . . . . . . . . 433

9 Current Trends in Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . 4379.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4379.2 Fiber-Optic Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438

9.2.1 Fiber-Optic Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4389.2.2 Fiber-Optic Pressure Sensors . . . . . . . . . . . . . . . . . . . . . 4419.2.3 Fiber-Optic Voltage Sensor . . . . . . . . . . . . . . . . . . . . . . . 4429.2.4 Fiber-Optic Liquid Level Monitoring . . . . . . . . . . . . . . 4449.2.5 Optical Fiber Temperature Sensors . . . . . . . . . . . . . . . . 4479.2.6 Fiber-Optic Stress Sensor . . . . . . . . . . . . . . . . . . . . . . . . 4499.2.7 Fiber-Optic Gyroscope: Polarization Maintaining . . . 4569.2.8 Gratings in Fiber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4629.2.9 Advantages of Fiber Optics . . . . . . . . . . . . . . . . . . . . . . 464

9.3 Laser Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4659.3.1 Measurement of Velocity, Distance, and Length . . . . . 4659.3.2 LASER Heating, Welding, Melting, and Trimming . . 4749.3.3 Laser Trimming and Melting . . . . . . . . . . . . . . . . . . . . . 480

9.4 Smart Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4839.4.1 Smart Intelligent Transducers . . . . . . . . . . . . . . . . . . . . 4839.4.2 Smart Transmitter with HART Communicator . . . . . 491

9.5 Computer-Aided Software Engineering . . . . . . . . . . . . . . . . . . . . 4959.5.1 The TEXspecTool for Computer-Aided Software

Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

10 VI Applications: Part I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50710.1 Fiber-Optic Component Inspection Using Integrated Vision

and Motion Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50710.1.1 Fiber Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50810.1.2 Fiber-Optic Inspection Platform Overview . . . . . . . . . 509

Page 17: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents XIX

10.1.3 Inspection Measurements . . . . . . . . . . . . . . . . . . . . . . . . 50910.1.4 Optical Inspection Overview . . . . . . . . . . . . . . . . . . . . . 50910.1.5 Real Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50910.1.6 IMAQ Vision Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 51010.1.7 Motion Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512

10.2 Data Acquisition and User Interface of BeamInstrumentation System at SRRC . . . . . . . . . . . . . . . . . . . . . . . . 51410.2.1 Introduction to SRRC . . . . . . . . . . . . . . . . . . . . . . . . . . . 51410.2.2 Outline of the Control and Beam Instrumentation

System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51410.2.3 Specific Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

10.3 VISCP: A Virtual Instrumentation and CAD Toolfor Electronic Engineering Learning . . . . . . . . . . . . . . . . . . . . . . . 51910.3.1 Schematic Capture Program. . . . . . . . . . . . . . . . . . . . . . 52010.3.2 Netlist Generation Tool: Simulation . . . . . . . . . . . . . . . 52110.3.3 Virtual Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . 52210.3.4 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52310.3.5 Available Virtual Instruments . . . . . . . . . . . . . . . . . . . . 52410.3.6 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525

10.4 Distributed Multiplatform Control System with LabVIEW . . 52610.4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52610.4.2 The Software Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 52710.4.3 Software Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52810.4.4 The New ODCS with the LabVIEW VI Server

ODCS on Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52810.5 The Virtual Instrument Control System . . . . . . . . . . . . . . . . . . . 530

10.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53110.5.2 System Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53110.5.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

10.6 Controller Design Using the Maple Professional MathToolbox for LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53610.6.1 The Two Tank System . . . . . . . . . . . . . . . . . . . . . . . . . . 53710.6.2 Controller Parameter Tuning . . . . . . . . . . . . . . . . . . . . . 53910.6.3 Deployment of the Controller Parameters . . . . . . . . . . 541

10.7 Embedding Remote Experimentation in Power EngineeringEducation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54210.7.1 Virtual Laboratories in Power Engineering . . . . . . . . . 54310.7.2 Remote Experiments Over the Internet . . . . . . . . . . . . 544

10.8 Design of an Automatic System for the Electrical QualityAssurance during the Assembly of the Electrical Circuitsof the LHC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54910.8.1 Methodology of Verification . . . . . . . . . . . . . . . . . . . . . . 55010.8.2 Technical Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

10.9 Internet-Ready Power Network Analyzer for Power QualityMeasurements and Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

Page 18: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

XX Contents

10.9.1 Computer-Based Power Analyzer . . . . . . . . . . . . . . . . . 55610.9.2 Instruments Implemented in the Analyzer . . . . . . . . . . 55610.9.3 Measured Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 55910.9.4 Supervising Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55910.9.5 Hardware Platforms for the Virtual Analyzer . . . . . . . 56010.9.6 Advantages of the Virtual Analyzer . . . . . . . . . . . . . . . 56010.9.7 Future Vision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

10.10 Application of Virtual Instrumentation in a PowerEngineering Laboratory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56110.10.1 Lab Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56110.10.2 Single and Three phase Transformers . . . . . . . . . . . . . . 56210.10.3 DC Generator Characteristics . . . . . . . . . . . . . . . . . . . . 56510.10.4 Synchronous Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . 56710.10.5 Induction Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

11 VI Applications: Part II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57111.1 Implementation of a Virtual Factory Communication

System Using the Manufacturing Message SpecificationStandard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57111.1.1 MMS on Top of TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . 57211.1.2 Virtual Factory Communication System . . . . . . . . . . . 57411.1.3 MMS Internet Monitoring System . . . . . . . . . . . . . . . . . 578

11.2 Developing Remote Front Panel LabVIEW Applications . . . . . 58011.2.1 Reducing the Amount of Data Sent . . . . . . . . . . . . . . . 58111.2.2 Reducing the Update Rate of the Data . . . . . . . . . . . . 58111.2.3 Minimizing the Amount of Advanced

Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58311.2.4 Functionality to Avoid with Web Applications . . . . . . 58411.2.5 Security Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585

11.3 Using the Timed Loop to Write Multirate Applicationsin LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58611.3.1 Timed Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58711.3.2 Configuring Timed Loops . . . . . . . . . . . . . . . . . . . . . . . . 58811.3.3 Selecting Timing Sources . . . . . . . . . . . . . . . . . . . . . . . . 58811.3.4 Setting the Period and the Offset . . . . . . . . . . . . . . . . . 58811.3.5 Setting Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58911.3.6 Naming Timed Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . 59011.3.7 Timed Loop Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59111.3.8 Configuring Modes Using the Loop Configuration

Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59211.3.9 Configuring Modes Using the Input Node . . . . . . . . . . 59211.3.10 Changing Timed Loop Input Node Values

Dynamically. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59311.3.11 Aborting a Timed Loop Execution . . . . . . . . . . . . . . . . 59311.3.12 Synchronizing Timed Loops . . . . . . . . . . . . . . . . . . . . . . 59411.3.13 Timed Loop Execution Overview . . . . . . . . . . . . . . . . . 595

Page 19: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents XXI

11.4 Client–Server Applications in LabVIEW. . . . . . . . . . . . . . . . . . . 59511.4.1 Interprocess Communication . . . . . . . . . . . . . . . . . . . . . 59611.4.2 A Simple Read-Only Server . . . . . . . . . . . . . . . . . . . . . . 59711.4.3 Two Way Communication: A Read–Write Server . . . . 59811.4.4 The VI-Reference Server Process . . . . . . . . . . . . . . . . . . 60011.4.5 The VI-Reference Client . . . . . . . . . . . . . . . . . . . . . . . . . 60011.4.6 Further Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601

11.5 Web-Based Matlab and Controller Design Learningwith LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60111.5.1 Introduction to Web-Based MATLAB . . . . . . . . . . . . . 60211.5.2 Learning of MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . 60211.5.3 Learning of Controller Design . . . . . . . . . . . . . . . . . . . . 603

11.6 Neural Networks for Measurement and Instrumentationin Virtual Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60511.6.1 Modeling Natural Objects, Processes,

and Behaviors for Real-Time Virtual EnvironmentApplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607

11.6.2 Hardware NN Architectures for Real-TimeModeling Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 609

11.6.3 Case Study: NN Modeling of ElectromagneticRadiation for Virtual Prototyping Environments . . . . 614

11.7 LabVIEW Interface for School-Network DAQ Card . . . . . . . . . 62311.7.1 The WALTA LabVIEW Interface . . . . . . . . . . . . . . . . . 625

11.8 PC and LabVIEW-Based Robot Control System . . . . . . . . . . . 62711.8.1 Introduction to Robot Control System . . . . . . . . . . . . . 62711.8.2 The Robot and the Control System . . . . . . . . . . . . . . . 62811.8.3 PCL-832 Servomotor Control Card . . . . . . . . . . . . . . . . 62911.8.4 Digital Differential Analysis (DDA) . . . . . . . . . . . . . . . 62911.8.5 Closed-Loop Position Control of the Control Card . . 63011.8.6 Modified Closed-Loop Position Control

of the Control Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63111.8.7 Programming of the Control Card . . . . . . . . . . . . . . . . 63111.8.8 Optimal Cruising Trajectory Planning Method . . . . . 633

11.9 Mobile Robot Miniaturization: A Tool for Investigationin Control Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63411.9.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63511.9.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63911.9.3 Experimentation Environment . . . . . . . . . . . . . . . . . . . . 64011.9.4 Experimentation in Distributed Adaptive Control . . . 644

11.10 A Steady-Hand Robotic System for MicrosurgicalAugmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64611.10.1 Robotically Assisted Micromanipulation . . . . . . . . . . . 64711.10.2 A Robotic System for Steady-Hand

Micromanipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64911.10.3 Current Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654

Page 20: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

XXII Contents

A LabVIEW Research Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657A.1 An Optical Fibre Sensor Based on Neural Networks

for Online Detection of Process Water Contamination . . . . . . . 657A.2 An Intelligent Optical Fibre-Based Sensor System

for Monitoring Food Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657A.3 Networking Automatic Test Equipment Environments . . . . . . . 658A.4 Using LabVIEW to Prototype an Industrial-Quality

Real-Time Solution for the Titan Outdoor 4WD MobileRobot Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658

A.5 Intelligent Material Handling: Developmentand Implementation of a Matrix-Based Discrete-EventController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659

A.6 Curve Tracer with a Personal Computer and LabVIEW . . . . . 659A.7 Secure Two-Way Transfer of Measurement Data . . . . . . . . . . . . 659A.8 Development of a LabVIEW-Based Test Facility

for Standalone PV Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660A.9 Semantic Virtual Environments with Adaptive Multimodal

Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660A.10 A Dynamic Compilation Framework for Controlling

Microprocessor Energy and Performance . . . . . . . . . . . . . . . . . . 661A.11 A Method to Record, Store, and Analyze Multiple

Physiologic Pressure Recordings . . . . . . . . . . . . . . . . . . . . . . . . . . 661A.12 Characterization of a Pseudorandom Testing Technique

for Analog and Mixed-Signal Built-in Self-Test . . . . . . . . . . . . . 662A.13 Power-Aware Network Swapping for Wireless Palmtop PCs . . 662A.14 Reducing Jitter in Embedded Systems Employing

a Time-Triggered Software Architecture and DynamicVoltage Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663

A.15 End-to-End Testing for Boards and SystemsUsing Boundary Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663

A.16 An Approach to the Equivalent-Time Sampling Techniquefor Pulse Transient Measurements . . . . . . . . . . . . . . . . . . . . . . . . 664

A.17 Reactive Types for Dataflow-Oriented SoftwareArchitectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664

A.18 Improving the Steering Efficiency of 1x4096 Opto-VLSIProcessor Using Direct Power Measurement Method . . . . . . . . 665

A.19 Experimental Studies of the 2.4-GHz IMS Wireless IndoorChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665

A.20 Virtual Instrument for Condition Monitoring of On-LoadTap Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665

A.21 Toward Evolvable Hardware Chips: Experimentswith a Programmable Transistor Array . . . . . . . . . . . . . . . . . . . . 665

A.22 Remote Data Acquisition, Control and AnalysisUsing LabVIEW Front Panel and Real-Time Engine . . . . . . . . 666

Page 21: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

Contents XXIII

B LabVIEW Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667B.1 DIAdem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667B.2 Electronics Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667B.3 DSC Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668B.4 Vision Development Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668B.5 FPGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669B.6 LabWindows/CVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670B.7 NI MATRIXx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670B.8 Measurement Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671B.9 VI Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672B.10 Motion Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672B.11 TestStand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672B.12 SignalExpress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

C Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

Page 22: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

1

Introduction to Virtual Instrumentation

Learning Objectives. On completion of this chapter the reader will have a knowl-edge on:

– History of Instrumentation Systems– Evolution of Virtual Instrumentation– Premature Challenges of VI– Definition of Virtual Instrumentation– Architecture of Virtual Instrumentation– Programming Requirements of VI– Conventional Virtual Instrumentation– Distributed Virtual Instrumentation– Virtual Instruments Versus Traditional Instruments– Advantages of VI– Evolution of LabVIEW– Creating Virtual Instruments using LabVIEW– Advantages of LabVIEW– Virtual Instrumentation in the Engineering Process– Virtual Instruments Beyond the Personal Computer

1.1 Introduction

An instrument is a device designed to collect data from an environment, orfrom a unit under test, and to display information to a user based on thecollected data. Such an instrument may employ a transducer to sense changesin a physical parameter, such as temperature or pressure, and to convert thesensed information into electrical signals, such as voltage or frequency varia-tions. The term instrument may also be defined as a physical software devicethat performs an analysis on data acquired from another instrument and thenoutputs the processed data to display or recording devices. This second cate-gory of recording instruments may include oscilloscopes, spectrum analyzers,and digital millimeters. The types of source data collected and analyzed byinstruments may thus vary widely, including both physical parameters such as

Page 23: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

2 1 Introduction to Virtual Instrumentation

temperature, pressure, distance, frequency and amplitudes of light and sound,and also electrical parameters including voltage, current, and frequency.

Virtual instrumentation is an interdisciplinary field that merges sensing,hardware, and software technologies in order to create flexible and sophis-ticated instruments for control and monitoring applications. The concept ofvirtual instrumentation was born in late 1970s, when microprocessor tech-nology enabled a machine’s function to be more easily changed by changingits software. The flexibility is possible as the capabilities of a virtual instru-ment depend very little on dedicated hardware – commonly, only application-specific signal conditioning module and the analog-to-digital converter usedas interface to the external world. Therefore, simple use of computers orspecialized onboard processors in instrument control and data acquisition can-not be defined as virtual instrumentation. Increasing number of biomedicalapplications use virtual instrumentation to improve insights into the underly-ing nature of complex phenomena and reduce costs of medical equipment andprocedures.

In this chapter, we describe basic concepts of virtual instrumentation. InSect. 2 we give a brief history of virtual instrumentation. The architecture ofa virtual instrument along with the definition and contemporary developmenttools are described in Sect. 3. In Sect. 4 we describe the organization of thedistributed virtual instrumentation.

1.2 History of Instrumentation Systems

Historically, instrumentation systems originated in the distant past, withmeasuring rods, thermometers, and scales. In modern times, instrumenta-tion systems have generally consisted of individual instruments, for example,an electromechanical pressure gauge comprising a sensing transducer wired tosignal conditioning circuitry, outputs a processed signal to a display panel andperhaps also to a line recorder, in which a trace of changing conditions is linkedonto a rotating drum by a mechanical arm, creating a time record of pres-sure changes. Complex systems such as chemical process control applicationsemployed until the 1980s consisted of sets of individual physical instrumentswired to a central control panel that comprised an array of physical datadisplay devices such as dials and counters, together with sets of switches,knobs, and buttons for controlling the instruments.

A history of virtual instrumentation is characterized by continuous increaseof flexibility and scalability of measurement equipment. Starting from firstmanual-controlled vendor-defined electrical instruments, the instrumentationfield has made a great progress toward contemporary computer-controlled,user-defined, sophisticated measuring equipment. Instrumentation had the fol-lowing phases:

– Analog measurement devices– Data acquisition and processing devices

Page 24: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

1.2 History of Instrumentation Systems 3

– Digital processing based on general purpose computing platform– Distributed virtual instrumentation

The first phase is represented by early “pure” analog measurement devices,such as oscilloscopes or EEG recording systems. They were completely closeddedicated systems, which included power suppliers, sensors, translators, anddisplays. They required manual settings, presenting results on various coun-ters, gauges, CRT displays, or on the paper. Further use of data was not partof the instrument package, and an operator had to physically copy data toa paper notebook or a data sheet. Performing complex or automated testprocedures was rather complicated or impossible, as everything had to be setmanually.

Second phase started in 1950s, as a result of demands from the indus-trial control field. Instruments incorporated rudiment control systems, withrelays, rate detectors, and integrators. That led to creation of proportional–integral–derivative (PID) control systems, which allowed greater flexibility oftest procedures and automation of some phases of measuring process. Instru-ments started to digitalize measured signals, allowing digital processing ofdata, and introducing more complex control or analytical decisions. However,real-time digital processing requirements were too high for any but an onboardspecial purpose computer or digital signal processor (DSP). The instrumentsstill were standalone vendor defined boxes.

In the third phase, measuring instruments became computer based. Theybegan to include interfaces that enabled communication between the instru-ment and the computer. This relationship started with the general-purposeinterface bus (GPIB) originated in 1960s by Hewlett-Packard (HP), thencalled HPIB, for purpose of instrument control by HP computers. Initially,computers were primarily used as off-line instruments. They were furtherprocessing the data after first recording the measurements on disk or type. Asthe speed and capabilities of general-purpose computers advanced exponen-tially general-purpose computers became fast enough for complex real-timemeasurements. It soon became possible to adapt standard, by now high-speedcomputers, to the online applications required in real-time measurement andcontrol. New general-purpose computers from most manufactures incorpo-rated all the hardware and much of the general software required by theinstruments for their specific purposes. The main advantages of standard per-sonal computers are low price driven by the large market, availability, andstandardization. Although computers’ performance soon became high enough,computers were still not easy to use for experimentalists.

Nearly all of the early instrument control programs were written in BASIC,because it had been the dominant language used with dedicated instrumentcontrollers. It required engineers and other users to become programmersbefore becoming instrument users, so it was hard for them to exploit poten-tial that computerized instrumentation could bring. Therefore, an importantmilestone in the history of virtual instrumentation happened in 1986, when

Page 25: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

4 1 Introduction to Virtual Instrumentation

National Instruments introduced LabVIEW 1.0 on a PC platform. LabVIEWintroduced graphical user interfaces and visual programming into comput-erized instrumentation, joining simplicity of a user interface operation withincreased capabilities of computers. Today, the PC is the platform on whichmost measurements are made, and the graphical user interface has made mea-surements user-friendlier. As a result, virtual instrumentation made possibledecrease in price of an instrument. As the virtual instrument depends verylittle on dedicated hardware, a customer could now use his own computer,while an instrument manufactures could supply only what the user could notget in the general market.

The fourth phase became feasible with the development of local andglobal networks of general purpose computers. Since most instruments werealready computerized, advances in telecommunications and network technolo-gies made possible physical distribution of virtual instrument components intotelemedical systems to provide medical information and services at a distance.Possible infrastructure for distributed virtual instrumentation includes theInternet, private networks, and cellular networks, where the interface betweenthe components can be balanced for price and performance.

The introduction of computers into the field of instrumentation began asa way to couple an individual instrument, such as a pressure sensor, to acomputer, and enable the display of measurement data on virtual instrumentpanel on the computer screen using appropriate software. The instrumentalso contained buttons for controlling the operation of the sensor. Thus, suchinstrumentation software enabled the creation of a simulated physical instru-ment, having the capability to control physical sensing components.

1.3 Evolution of Virtual Instrumentation

Virtual instrumentation combines mainstream commercial technologies, suchas the PC, with flexible software and a wide variety of measurement andcontrol hardware, so engineers and scientists can create user-defined systemsthat meet their exact application needs. With virtual instrumentation, engi-neers and scientists reduce development time, design higher quality products,and lower their design costs. A large variety of data collection instrumentsdesigned specifically for computerized control and operation were developedand made available on the commercial market, creating the field now called“virtual instrumentation.”

Thus, virtual instrumentation refers to the use of general purpose comput-ers and workstations, in combination with data collection hardware devicesand virtual instrumentation software, to construct an integrated instrumenta-tion system. In such a system, the data collection hardware devices are usedto incorporate sensing elements for detecting changes in the conditions of testsubjects. These hardware devices are intimately coupled to the computer,whereby the operations of the sensors are controlled by the computer software

Page 26: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

1.5 Virtual Instrumentation 5

and the output of the data collection devices are displayed on the computerscreen with the use of displays simulating in appearance of the physical dials,meters, and other data visualization devices of traditional instruments. Virtualinstrumentation systems also comprise pure software “instruments,” such asoscilloscopes and spectrum analyzers, for processing the collected sensor dataand “messaging” it such that the users can make full use of the data.

1.4 Premature Challenges

Virtual instrumentation is necessary because it delivers instrumentation withthe rapid adaptability required for today’s concept, product, and processdesign, development, and delivery. Only with virtual instrumentation canengineers and scientists create the user-defined instruments required to keepup with the world’s demands.

The early development of virtual instrumentation systems faced challeng-ing and technical difficulties. Major obstacles included many types of elec-tronic interfaces by which external data collection devices can be coupledto a computer, and a variety of “command sets” used by different hardwaredevice vendors to control their respective products. Also, data collecting hard-ware devices differ in their internal structures and functions, enabling virtualinstrumentation systems to take these differences into account.

To meet the ever-increasing demand to innovate and deliver ideas andproducts faster, scientists and engineers are turning to advanced electronics,processors, and software. Consider a modern cell phone. Most contain thelatest features of the last generation, including audio, a phone book, andtext messaging capabilities. New versions include a camera, MP3 player, andBluetooth networking, and Internet browsing.

Some data acquisition devices are so-called “register-based” instrumentssince they are controlled by streams of 1s and 0s sent directly to control thecomponents within the instruments. Other devices include “message-based”instruments which are controlled by “strings” of ASCII characters, effectivelyconstituting written instructions that must be decoded within the instru-ment. In turn, different instruments use different protocols to output data,some as electrical frequencies and others as variations in a base voltage, etc.Thus, any virtual instrumentation system intended for connection to a typi-cal variety of commercially available data collection hardware devices mustaccordingly comprise software tools capable of communicating effectively withthe disparate types of hardware devices.

1.5 Virtual Instrumentation

Virtual instrumentation achieved mainstream adoption by providing a newmodel for building measurement and automation systems. Keys to its successinclude rapid PC advancement; explosive low-cost, high-performance data

Page 27: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

6 1 Introduction to Virtual Instrumentation

converter (semiconductor) development; and system design software emer-gence. These factors make virtual instrumentation systems accessible to avery broad base of users.

1.5.1 Definition

A virtual instrumentation system is a software that is used by the user todevelop a computerized test and measurement system, for controlling anexternal measurement hardware device from a desktop computer, and for dis-playing test or measurement data on panels in the computer screen. The testand measurement data are collected by the external device interfaced withthe desktop computer. Virtual instrumentation also extends to computerizedsystems for controlling processes based on the data collected and processedby a PC based instrumentation system.

There are several definitions of a virtual instrument available in the openliterature. Santori defines a virtual instrument as “an instrument whose gen-eral function and capabilities are determined in software.” Goldberg describesthat “a virtual instrument is composed of some specialized subunits, somegeneral-purpose computers, some software, and a little know-how”. Althoughinformal, these definition capture the basic idea of virtual instrumentation andvirtual concepts in general – provided with sufficient resources, “any computercan simulate any other if we simply load it with software simulating the othercomputer.” This universality introduces one of the basic properties of a vir-tual instrument – its ability to change form through software, enabling a userto modify its function at will to suit a wide range of applications.

1.5.2 Architecture of Virtual Instrumentation

A virtual instrument is composed of the following blocks:

– Sensor module– Sensor interface– Information systems interface– Processing module– Database interface– User interface

Figure 1.1 shows the general architecture of a virtual instrument. Thesensor module detects physical signal and transforms it into electrical form,conditions the signal, and transforms it into a digital form for further manip-ulation. Through a sensor interface, the sensor module communicates with acomputer. Once the data are in a digital form on a computer, they can beprocessed, mixed, compared, and otherwise manipulated, or stored in a data-base. Then, the data may be displayed, or converted back to analog form forfurther process control. Virtual instruments are often integrated with someother information systems. In this way, the configuration settings and the

Page 28: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

1.5 Virtual Instrumentation 7

User Interface – Display and Control

Processing Module

Database Interface

Sensor Interface

Information Systems Interface

DatabaseInformation

System

Sensor Module

Fig. 1.1. Architecture of a virtual instrument

data measured may be stored and associated with the available records. Infollowing sections each of the virtual instruments modules are described inmore detail.

Sensor Module

The sensor module performs signal conditioning and transforms it into a dig-ital form for further manipulation. Once the data are in a digital form ona computer, they can be displayed, processed, mixed, compared, stored in adatabase, or converted back to analog form for further process control. Thedatabase can also store configuration settings and signal records. The sensormodule interfaces a virtual instrument to the external, mostly analog worldtransforming measured signals into computer readable form. A sensor moduleprincipally consists of three main parts:

– The sensor– The signal conditioning part– The A/D converter

The sensor detects physical signals from the environment. If the parameterbeing measured is not electrical, the sensor must include a transducer toconvert the information to an electrical signal, for example, when measuringblood pressure.

The signal-conditioning module performs (usually analog) signal condi-tioning prior to AD conversion. This module usually does the amplification,transducer excitation, linearization, isolation, or filtering of detected signals.The A/D converter changes the detected and conditioned voltage into a digitalvalue. The converter is defined by its resolution and sampling frequency. Theconverted data must be precisely time-stamped to allow later sophisticatedanalyses. Although most biomedical sensors are specialized in processing of

Page 29: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

8 1 Introduction to Virtual Instrumentation

certain signals, it is possible to use generic measurement components, suchas data acquisition (DAQ), or image acquisition (IMAQ) boards, which maybe applied to broader class of signals. Creating generic measuring board, andincorporating the most important components of different sensors into oneunit, it is possible to perform the functions of many medical instruments onthe same computer.

Sensor Interface

There are many interfaces used for communication between sensors modulesand the computer. According to the type of connection, sensor interfaces canbe classified as wired and wireless.

– Wired Interfaces are usually standard parallel interfaces, such as GPIB,Small Computer Systems Interface (SCSI), system buses (PCI eXtensionfor Instrumentation PXI or VME Extensions for Instrumentation (VXI),or serial buses (RS232 or USB interfaces).

– Wireless Interfaces are increasingly used because of convenience. Typicalinterfaces include 802.11 family of standards, Bluetooth, or GPRS/GSMinterface. Wireless communication is especially important for implantedsensors where cable connection is impractical or not possible. In addition,standards, such as Bluetooth, define a self-identification protocol, allowingthe network to configure dynamically and describe itself. In this way, itis possible to reduce installation cost and create plug-and-play like net-works of sensors. Device miniaturization allowed development of PersonalArea Networks (PANs) of intelligent sensors Communication with medicaldevices is also standardized with the IEEE 1073 family of standards. Thisinterface is intended to be highly robust in an environment where devicesare frequently connected to and disconnected from the network.

Processing Module

Integration of the general purpose microprocessors/microcontrollers allowedflexible implementation of sophisticated processing functions. As the func-tionality of a virtual instrument depends very little on dedicated hardware,which principally does not perform any complex processing, functionality andappearance of the virtual instrument may be completely changed utilizingdifferent processing functions. Broadly speaking, processing function used invirtual instrumentation may be classified as analytic processing and artificialintelligence techniques.

– Analytic processing. Analytic functions define clear functional relationsamong input parameters. Some of the common analyses used in virtual in-strumentation include spectral analysis, filtering, windowing, transforms,peak detection, or curve fitting. Virtual instruments often use various sta-tistics function, such as, random assignment and biostatistical analyses.Most of those functions can nowadays be performed in real-time.

Page 30: LabVIEW based Advanced Instrumentation Systems · The solutions to the ... about the advanced instrumentation principles for their numerous practical applications. ... – Worked

1.5 Virtual Instrumentation 9

– Artificial intelligence techniques. Artificial intelligence technologies couldbe used to enhance and improve the efficiency, the capability, and thefeatures of instrumentation in application areas related to measurement,system identification, and control. These techniques exploit the advancedcomputational capabilities of modern computing systems to manipulatethe sampled input signals and extract the desired measurements. Artificialintelligence technologies, such as neural networks, fuzzy logic and expertsystems, are applied in various applications, including sensor fusion tohigh-level sensors, system identification, prediction, system control, com-plex measurement procedures, calibration, and instrument fault detectionand isolation. Various nonlinear signal processing, including fuzzy logicand neural networks, are also common tools in analysis of biomedicalsignals. Using artificial intelligence it is even possible to add medical in-telligence to ordinary user interface devices. For example, several artificialintelligence techniques, such as pattern recognition and machine learning,were used in a software-based visual-field testing system.

Database Interface

Computerized instrumentation allows measured data to be stored for off-lineprocessing, or to keep records as a part of the patient record. There are severalcurrently available database technologies that can be used for this purpose.Simple usage of file systems interface leads to creation of many proprietaryformats, so the interoperability may be a problem. The eXtensible MarkupLanguage (XML) may be used to solve interoperability problem by providinguniversal syntax. The XML is a standard for describing document structureand content. It organizes data using markup tags, creating self-describing doc-uments, as tags describe the information it contains. Contemporary databasemanagement systems such SQL Server and Oracle support XML import andexport of data. Many virtual instruments use DataBase Management Systems(DBMSs). They provide efficient management of data and standardized inser-tion, update, deletion, and selection. Most of these DBMSs provided Struc-tured Query Language (SQL) interface, enabling transparent execution of thesame programs over database from different vendors. Virtual instruments usethese DMBSs using some of programming interfaces, such as ODBC, JDBC,ADO, and DAO.

Information System Interface

Virtual instruments are increasingly integrated with other medical informa-tion systems, such as hospital information systems. They can be used tocreate executive dashboards, supporting decision support, real time alerts, andpredictive warnings. Some virtual interfaces toolkits, such as LabVIEW, pro-vide mechanisms for customized components, such as ActiveX objects, that


Recommended