LabVIEW For Engineers - Concordia University

2y ago
34 Views
9 Downloads
8.16 MB
406 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Isobel Thacker
Transcription

LabVIEW for Engineers

This page intentionally left blank

LabVIEW for EngineersRONALD W. LARSENMontana State UniversityPrentice HallBoston Columbus Indianapolis New York San Francisco Upper Saddle RiverAmsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal TorontoDelhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo

VP/Editorial Director, Engineering/Computer Science: Marcia J. HortonAssistant/Supervisor: Dolores MarsSenior Editor: Holly StarkAssociate Editor: Dee BernhardEditorial Assistant: Keri RandDirector of Marketing: Margaret WaplesSenior Marketing Manager: Tim GalliganMarketing Assistant: Mack PattersonVice-President, Production: Vince O’BrienSenior Managing Editor: Scott DisannoProject Manager: Greg DullesSenior Operations Supervisor: Alan FischerOperations Specialist: Lisa McDowellSenior Art Director: Jayne ConteArt Director: Kenny BeckCover Designer: Bruce KenselaarMedia Editor: Daniel SandinComposition: IntegraPrinter/Binder: Hamilton Printing Co.Cover Printer: Lehigh-Phoenix ColorCredits and acknowledgments borrowed from other sources and reproduced, with permission, in thistextbook appear on appropriate page within text.LabVIEW is a registered trademark of National Instruments, Austin, TX, 78759-3504.Copyright 2011 Pearson Education, Inc., publishing as Prentice Hall, One Lake Street, Upper SaddleRiver, New Jersey 07458. All rights reserved. Manufactured in the United States of America. Thispublication is protected by Copyright, and permission should be obtained from the publisher prior toany prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means,electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use materialfrom this work, please submit a written request to Pearson Education, Inc., Permissions Department,One Lake Street, Upper Saddle River, New Jersey 07458.Many of the designations by manufacturers and seller to distinguish their products are claimed astrademarks. Where those designations appear in this book, and the publisher was aware of a trademarkclaim, the designations have been printed in initial caps or all caps.Library of Congress Cataloging-in-Publication DataLarsen, Ronald W.LabVIEW for Engineers / Ronald W. Larsen.p. cm.Includes index.ISBN-13: 978-0-13-609429-6 (alk. paper)ISBN-10: 0-13-609429-5 (alk. paper)1. LabVIEW. 2. Engineering—Data processing. 3. Engineering—Computer programs.4. Scientific apparatus and instruments—Data processing. I. Title.TA345.5.L33L37 2011620.00285—dc22200905201510 9 8 7 6 5 4 3 2 1ISBN 10:0-13-609429-5ISBN 13: 978-0-13-609429-6

Contents1 INTRODUCTION11.1 What is LabVIEW 11.2 Assumptions 21.3 Conventions in the Text 31.4 LabVIEW VIs 41.5 Starting LabVIEW 51.6 Creating a VI 121.7 LabVIEW Menus 21Key Terms 24Summary 25Self-Assessment 252 LABVIEW BASICS262.1 Opening a VI 262.2 Basic Math in LabVIEW—Using Functions 262.3 Programming Preview: While Loops 372.4 Dataflow Programming 382.5 Data Types and Conversions 402.6 Documenting VIs 442.7 Printing a VI 492.8 Saving Your Work 492.9 Closing a VI 51Key Terms 52Summary 52Self-Assessment 55Problems 563 LABVIEW MATH FUNCTIONS603.1 Introduction 603.2 Basic Math Functions 62v

viContents3.3 Trigonometric and Hyperbolic Trigonometric Functions 743.4 Exponential and Logarithm Functions 773.5 Boolean and Comparison Functions 803.6 Programming Preview: Debugging 87Key Terms 91Summary 92Self-Assessment 96Problems 984 MATRIX MATH USING LABVIEW1034.1 Working with Matrices and Arrays in LabVIEW 1034.2 Extracting a Subarray from a Larger Array or Matrix 1064.3 Adding Arrays 1114.4 Transpose Array 1124.5 Multiplying an Array by a Scalar 1134.6 Matrix Multiplication 1144.7 Element by Element Multiplication 1164.8 Condition Number 1174.9 Matrix Determinant 1184.10 Inverse Matrix 1204.11 Solving Simultaneous Linear Equations 1214.12 Programming Preview: For Loops 127Key Terms 133Summary 133Self-Assessment 137Problems 1385 DATA ACQUISITION WITH LABVIEW1425.1 Overview of Data Acquisition 1425.2 Sensors, Signals and Signal Conditioning 1445.3 Data Acquisition Hardware 1535.4 Using LabVIEW to Collect Data 158Key Terms 174Summary 174Self-Assessment 175Problems 1776 GETTING DATA INTO AND OUT OF LABVIEW WITHOUTDATA ACQUISITION6.1 Introduction 1816.2 Writing LabVIEW Data to a Spreadsheet File 181181

Contents6.3 Writing LabVIEW Data to a Measurement File 1856.4 Reading a LabVIEW Measurement File 1896.5 Reading a Spreadsheet File in LabVIEW 1906.6 Using Spreadsheet Data to Initialize a Matrix Control 199Key Terms 209Summary 209Self-Assessment 211Problems 2127 GRAPHING WITH LABVIEW2167.1 Introduction 2167.2 Using Waveform Charts 2177.3 Using Waveform Graphs 2287.4 Modifying Graph Features 2367.5 Generating 1D Arrays for Graphing 2407.6 Putting LabVIEW Graphs to Work 2427.7 Using XY Graphs—2D Plotting 2487.8 3D Graphing 2547.9 Getting Graphs onto Paper and into Reports 258Key Terms 258Summary 259Self-Assessment 261Problems 2628 DATA ANALYSIS USING LABVIEW VIS2648.1 Introduction 2648.2 Basic Statistics 2648.3 Interpolation 2698.4 Curve Fitting 2768.5 Regression 280Key Terms 290Summary 290Self-Assessment 292Problems 2939 PROGRAMMING IN LABVIEW9.1 Introduction 2979.2 LabVIEW Programming Basics, Expanded 2979.3 Structures 314Key Terms 344Summary 344Self-Assessment 347Problems 348297vii

viiiContents10 LOOKING FORWARD: ADVANCED MATH USING LABVIEW roduction 352Working with Polynomials 352Statistics: Hypothesis Testing 354Differentiation 355Integration 357Runge–Kutta Integration 359Exponential Filter 361Spectral Analysis 363Monte Carlo Simulation 364PID Controller 368APPENDIX: PRINTING VIS370INDEX377

ESource ReviewersWe would like to thank everyone who helped us with or has reviewed texts in this series.Naeem Abdurrahman, University of Texas, AustinSharon Ahlers, Cornell UniversityDavid G. Alciatore, Colorado State UniversityStephen Allan, Utah State UniversityAnil Bajaj, Purdue UniversityGrant Baker, University of Alaska–AnchorageWilliam Bard, University of TexasWilliam Beckwith, Clemson UniversityHaym Benaroya, Rutgers UniversityJohn Biddle, California State Polytechnic UniversityRay Biswajit, Bloomsburg University of PADonald Blackmon, UNC CharlotteTom Bledsaw, ITT Technical InstituteFred Boadu, Duke UniversityGregory Boardman, Virginia TechStuart Brand, The Ohio State UniversityJerald Brevick, The Ohio State UniversityTom Bryson, University of Missouri, RollaRamzi Bualuan, University of Notre DameDan Budny, Purdue UniversityBetty Burr, University of HoustonFernando Cadena, New Mexico State UniversityJoel Cahoon, Montana State UniversityDale Calkins, University of WashingtonMonica Cardella, Purdue UniversityLinda Chattin, Arizona State UniversityHarish Cherukuri, University of NorthCarolina–CharlotteVanessa Clark, Washington University in St. LouisArthur Clausing, University of IllinoisBarry Crittendon, Virginia Polytechnic and StateUniversityDonald Dabdub, University of CA IrvineRichard Davis, University of Minnesota DuluthKurt DeGoede, Elizabethtown CollegeJohn Demel, Ohio State UniversityJames Devine, University of South FloridaHeidi A. Diefes-Dux, Purdue UniversityJeffrey A. Doughty, Northeastern UniversityJerry Dunn, Texas Tech UniversityRon Eaglin, University of Central FloridaDale Elifrits, University of Missouri, RollaTimothy Ellis, Iowa State Universityix

xESource ReviewersNurgun Erdol, Florida Atlantic UniversityChristopher Fields, Drexel UniversityPatrick Fitzhorn, Colorado State UniversityJulie Dyke Ford, New Mexico TechSusan Freeman, Northeastern UniversityHoward M. Fulmer, Villanova UniversityFrank Gerlitz, Washtenaw Community CollegeJohn Glover, University of HoustonRichard Gonzales, Purdue CalumetJohn Graham, University of North Carolina–CharlotteHayden Griffin, Virginia TechLaura Grossenbacher, University of Wisconsin MadisonAshish Gupta, SUNY at BuffaloOtto Gygax, Oregon State UniversityMalcom Heimer, Florida International UniversityRobin A. M. Hensel, West Virginia UniversityDonald Herling, Oregon State UniversityOrlando Hernandez, The College of New JerseyDavid Herrin, University of KentuckyThomas Hill, SUNY at BuffaloA. S. Hodel, Auburn UniversitySusan L. Holl, California St. U. SacramentoKathryn Holliday-Darr, Penn State U Behrend College, ErieTom Horton, University of VirginiaDavid Icove, University of TennesseeJames N. Jensen, SUNY at BuffaloMary Johnson, Texas A & M CommerceVern Johnson, University of ArizonaJean C. Malzahn Kampe, Virginia Polytechnic Institute and State UniversityMoses Karakouzian, University of Nevada Las VegasAutar Kaw, University of South FloridaKathleen Kitto, Western Washington UniversityKenneth Klika, University of AkronHarold Knickle, University of Rhode IslandTerry L. Kohutek, Texas A&M UniversityThomas Koon, Binghamton UniversityReza Langari, Texas A&MBill Leahy, Georgia Institute of TechnologyJohn Lumkes, Purdue UniversityMary C. Lynch, University of FloridaMelvin J. Maron, University of LouisvilleChristopher McDaniel, UNC CharlotteKhanjan Mehta, Penn State University ParkF. Scott Miller, University of Missouri-RollaJames Mitchell, Drexel UniversityRobert Montgomery, Purdue UniversityNaji Mounsef, Arizona State UniversityNikos Mourtos, San Jose State UniversityMark Nagurka, Marquette UniversityRomarathnam Narasimhan, University of MiamiShahnam Navee, Georgia Southern University

ESource ReviewersJames D. Nelson, Louisiana Tech UniversitySoronadi Nnaji, Florida A&M UniversitySheila O’Connor, Wichita State UniversityMatt Ohland, Clemson UniversityPaily P. Paily, Tennessee State UniversityKevin Passino, Ohio State UniversityTed Pawlicki, University of RochesterErnesto Penado, Northern Arizona UniversityMichael Peshkin, Northwestern UniversityRalph Pike, Louisiana State UniversityAndrew Randall, University of Central FloridaDr. John Ray, University of MemphisMarcella Reekie, Kansas State UniversityStanley Reeves, Auburn UniversityLarry Richards, University of VirginiaMarc H. Richman, Brown UniversityJeffrey Ringenberg, University of MichiganPaul Ronney, University of Southern CaliforniaChristopher Rowe, Vanderbilt UniversityBlair Rowley, Wright State UniversityLiz Rozell, Bakersfield CollegeMohammad Saed, Texas Tech UniversityTabb Schreder, University of ToledoHeshem Shaalem, Georgia Southern UniversityRandy Shih, Oregon Institute of TechnologyHoward Silver, Fairleigh Dickenson UniversityAvi Singhal, Arizona State UniversityGreg Sun, University of Massachusetts BostonJohn Sustersic, The Penn State UniversityTim Sykes, Houston Community CollegeMurat Tanyel, Geneva CollegeToby Teorey, University of MichiganScott Thomas, Wright State UniversityVirgil A.Thomason, University of TN at ChattanoogaNeil R.Thompson, University of WaterlooDennis Truax, Mississippi State UniversityRaman Menon Unnikrishnan, Rochester Instituteof TechnologyThomas Walker, Virginia TechMichael S.Wells, Tennessee Tech UniversityEd Wheeler, University of Tennessee at MartinJoseph Wujek, University of California, BerkeleyEdward Young, University of South CarolinaGarry Young, Oklahoma State UniversitySteve Yurgartis, Clarkson UniversityMandochehr Zoghi, University of Daytonxi

This page intentionally left blank

LabVIEW for Engineers

This page intentionally left blank

CHAPTER1IntroductionObjectivesAfter reading this chapter,you will know:what LabVIEW is and howit can be used to acquire,process, and analyze datawhat a LabVIEW VI is, andhow front panel and blockdiagrams are usedhow to start LabVIEWand create a blank VIhow to use LabVIEW menusto open and save VIs1.1 WHAT IS LABVIEW?In the past, LabVIEW was just a graphical programming language that wasdeveloped to make it easier to collect data from laboratory instruments usingdata acquisition systems. LabVIEW was always easy to use once you got usedto wiring connectors to write your computer programs, and it definitely makesdata acquisition an easier task than without LabVIEW, but LabVIEW is notjust for data acquisition any more.LabVIEW can be used to perform the following: acquire data from instrumentsprocess data (e.g., filtering, transforms)analyze datacontrol instruments and equipmentFor engineers, LabVIEW makes it possible to bring information fromthe outside world into a computer, make decisions based on the acquired data,and send computed results back into the world to control the way a piece ofequipment operates.As an example, the LabVIEW program (front panel) shown in Figure 1.1reads a process measurement (a temperature value) from a piece of equipment,compares the measured process temperature with the desired temperature(called a setpoint), and outputs a signal to a controller to try to control thetemperature at the setpoint value. You can see in Figure 1.1 that when thetemperature went above setpoint, the controller output decreased. This causesa valve on a heat source to close (partially) to bring the temperature back tosetpoint.In this brief example: A temperature value was read from an external device.The desired setpoint temperature was entered on a control on the front panel.A controller output was calculated using a PI Controller algorithm.The controller output was written to an external device.

2IntroductionFigure 1.1LabVIEW VI for PI Controller (front panel).LabVIEW’s ability to get data from outside the real world, use the data inside a program, and send results back out to the real world allows engineers to interact withand control events in the real world, not just inside computers. Using LabVIEWprograms is a fast and efficient way to develop a new device or prototype a newinstrument. And LabVIEW is becoming such an industrial standard that the LabVIEW program used to create the prototype may soon be the program used in thecommercial version as well.1.2 ASSUMPTIONSThe author is making a few assumptions about the reader and about the version ofLabVIEW that you have available.1.2.1 Target AudienceAs part of the Pearson-Prentice Hall E-Source series, this text is targeted at firstand second-year engineering students. As such, the reader is assumed to havesome mathematical ability, but very little experience with LabVIEW. And whileLabVIEW is often used for data acquisition, that is not the primary focus of this

Section 1.3text. Instead, we will focus on using the mathematical power of LabVIEW totackle the analysis of data sets, whether they are acquired from an experimentalsystem or not.1.2.2 LabVIEW VersionsLabVIEW is a well-developed program, and the changes from one version to anotherare small.The author has used LabVIEW 8.5 and LabVIEW 2009 Full versions with noadded bells or whistles in developing the examples in this text. For the material coveredin this text, users of earlier versions of LabVIEW will see very few differences.LabVIEW is sold in the following packages: Base Package—reduced mathematics functionality Full Package—complete set of math functions Student Edition—full package with a watermark in the lower right corner of eachfront panel Professional Package—can create stand-alone applications NI Developer Suite—includes extra add-ons and toolkitsIn this text, we will make use of many of the math functions that are availableonly in the Full, Student, Professional, and Developer packages. Some of the moreadvanced analysis techniques illustrated in this text will be unavailable in the Basepackage. For example,BaseFullStudentProDevTopic Trig Functions Boolean Functions Matrix MathNo* Simultaneous Equations Function File I/O Graphs Basic StatisticsNo InterpolationNo Curve FittingNo RegressionNo IntegrationNo DifferentiationNo Differential Equations*An easy workaround is presented in the text.It is assumed that the reader has access to at least the Student LabVIEW package.1.3 CONVENTIONS IN THE TEXTThe following conventions are used in this text: Keywords—shown in italics the first time they appear. Literals—items meant to be typed exactly as they appear in the text are shown inbold font.Conventions in the Text3

4Introduction Function and Control names—the functions to be selected from the FunctionsPalette and the Controls to be selected from the Controls Palette will be shown inbold font. The location within the palette structure is indicated using slashes, asMain Palette / Sub-Pallet / Group / Function. Menu Selections—when actions are initiated from a menu, the menu andsubmenu choices are indicated, separated by slashes as Menu Option /Submenu Option.1.4 LABVIEW VIsLabVIEW programs are called VIs. Originally, VI stood for virtual instrument, butLabVIEW is now used for many more applications than just creating a computersimulation of an instrument, and LabVIEW programs are typically referred to simply as VIs.A LabVIEW VI has two parts: Front Panel—Displays the controls (knobs, buttons, graphs, etc.) and represents thegraphical interface for the VI.An example of a VI front panel is shown in Figure 1.1. Block Diagram—Holds the programming elements (called blocks, functions, orsometimes subVIs) that are wired together to build the graphical program. Theblock diagram for the PI Controller VI is shown in Figure 1.2.Figure 1.2PI Controller VI, block diagram.This text is intended for students who are new to LabVIEW, so Figure 1.2 ispresented as a preview only. For students who want to know a little more about howthe LabVIEW program works, Figure 1.3 shows the major program sections in thePI Controller. (If you are not interested in the program details, you can skip aheadto Section 1.5.)

Section 1.5Figure 1.3The parts of a LabVIEW program.1. Read an analog voltage (the process measurement) from the data acquisitionsystem.2. Get parameter values from the controls on the front panel.3. Display values on the front panel using numeric indicators and graphs.4. Calculate the controller output value.5. Write an analog voltage (the controller output) to the data acquisition system.1.5 STARTING LABVIEWThe learning approach that is used in this text is to try to get the reader creatingLabVIEW programs as quickly as possible. To accomplish this, some features maybe presented briefly at first, with just enough information to allow an example to bedeveloped. The details will be presented later in the chapter.That said; let’s start LabVIEW.LabVIEW is started from the Windows Start menu as illustrated in Figure 1.4.Start Menu / All Programs / National Instruments LabVIEWIf LabVIEW has been used recently, there will be an icon in the left panel ofthe Windows Start menu (marked with (1) in Figure 1.4). Otherwise, use the AllStarting LabVIEW5

6IntroductionFigure 1.4Start menu showing twooptions for startingLabVIEW.Figure 1.5Desktop shortcut icon forLabVIEW.Programs button and find the National Instruments LabVIEW icon in the list ofinstalled programs (marked with (2) in Figure 1.4).Alternatively, there might be a shortcut to LabVIEW on the computer desktop, asshown in Figure 1.5. If your computer does not have a desktop shortcut for LabVIEW,you can create one by right-clicking on the National Instruments LabVIEW icon(marked with (2) in Figure 1.4) and selecting Create Shortcut from the pop-up menu.As LabVIEW loads, the title screen shown in Figure 1.6 is displayed. Once theprogram has loaded into memory, the title screen disappears, and the Getting Startedwindow (shown in Figure 1.7) is displayed.The Getting Started window performs the following: provides access to online support for LabVIEWprovides access to the LabVIEW Help systemallows you to create a blank VI or an empty projectallows you to open a recently used VI or projectallows you to search for LabVIEW examplesNote: The Getting Started window is displayed by default, but that can be changedby using menu options Tools / Options to open the Options dialog, then selectingthe Environment category, and checking or clearing the box before Skip GettingStarted window on launch.

Section 1.5Figure 1.6LabVIEW title screen, shown as program is loading.LabVIEW Nomenclature: VI is synonymous with LabVIEW program. LabVIEW programs are storedas files with .vi extensions. LabVIEW VIs include a graphical user interface ( frontpanel), and a block diagram that contains the programming elements. A project is a collection of related program elements that are intended towork together. A project can contain multiple VIs plus additional programelements.1.5.1 The LabVIEW Editing EnvironmentLabVIEW VIs can be created quickly, can be modified as needed, and give scientistsand engineers the ability to collect and analyze the data they need in order toaccomplish their goals. LabVIEW provides an editing environment that makes iteasy to create, modify, and run VIs.Creating a LabVIEW VI is easy. First, you open a blank VI, then you add controls to the front panel and programming functions to the block diagram, and wirethem together to create a functioning program. For now, we will create a blank VIjust so we can look around at the LabVIEW workspace.To create a blank VI in LabVIEW, Start LabVIEW (Start / All Programs / National Instruments LabVIEW). Waitfor the Getting Started screen to be displayed. Click Blank VI on the Getting Started window.Note: If your version of LabVIEW has been set to skip the Getting Started window,starting LabVIEW should automatically open a blank VI.Starting LabVIEW7

8IntroductionFigure 1.7LabVIEW Getting Started window.The blank VI will be displayed in two windows: front Panel, labeled Untitled 1 Front Panel block Diagram, labeled Untitled 1 Block DiagramControls PaletteWhen the front panel is displayed, the Controls Palette (Figure 1.8) is opened aswell. The Controls Palette provides access to the objects (controls, indicators, knobs,and graphs) that are placed on the front panel.Note: By default, the Controls Palette is displayed any time a front panel is beingedited, but the default can be changed. If the Controls Palette is not visible, use menuoptions View / Controls Palette from the front panel to display the Controls Palette.Since there are a large number of controls available, they are collected into anumber of categories and each category can be expanded or collapsed. In Figure 1.8only the Express category is shown expanded.

Section 1.5Starting LabVIEWFigure 1.8The Controls Palette isavailable when editing theFront Panel of a VI. The Classic set of tools includes the switches and knobs that originally camewith LabVIEW, while the Modern set provides controls with a more updatedappearance. The Express set of controls collects the most commonly used tools in one place,which can be very handy when developing a front panel.Functions PaletteWhen editing a VI’s block diagram, the Functions Palette is shown. In Figure 1.9 theProgramming and Express categories are shown expanded.Note: By default, the Functions Palette is displayed any time a block diagram isbeing edited, but the default can be changed. If the Functions Palette is not visible,use menu options View / Functions Palette from the block diagram to display theFunctions Palette.Programming in LabVIEW is all about selecting objects from the Controls andFunctions Palettes and placing them on either the front panel (controls) or blockdiagram (functions). Then, the objects must be connected (wired) appropriately onthe block diagram. We will demonstrate this process many times throughout the restof this book.Note: The Functions Palette contains functions, VIs, and Express VIs. All of these canbe placed on a block diagram to create your graphical programs—they can be used inthe same fashion. In this text we use the term function loosely, applying the term tomost of the programming elements on the Functions Palette. The more specific definitions are as follows: Function—a program element that does not have a front panel or block diagram,but does have a connector pane indicating how the function should be wired.Functions appear on the Functions Palette with a pale yellow background. VI—a VI is a LabVIEW program. A VI can be used within another VI. When thisis done, it is called a SubVI. VIs appear on the Functions Palette with a paleyellow strip across the top of the icon (or yellow border when expanded) and“.vi” in the name.9

10IntroductionFigure 1.9The Functions Palette isavailable when editing theBlock Diagram of a VI. Express VI—an Express VI is a more sophisticated VI that can be configuredusing a dialog box. The dialog box automatically opens when the Express VI isplaced on the block diagram. Double-click the VI’s icon to re-open the dialogwhen needed. Express VIs appear on the Functions Palette with a blue stripacross the top of the icon (or blue border when expanded).PRACTICE!Look in the Functions Palette to find the groups containing the following functions: Add Wait (look for a wristwatch icon)Look in the Controls Palette for the groups containing: Dial Numeric Control Toggle Switch

Section 1.5Starting LabVIEWSolutionAdd function:From the block diagram: functions Palette/Mathematics Group/Numeric Group/Add function functions Palette/Express Group/Arithmetic & Comparison Group/ExpressNumeric Group/Add functionWait function:From the block diagram: functions Palette/Programming Group/Timing Group/Wait (ms) functionDial Numeric Control:From the front panel: controls Palette/Express Group/Numeric Controls Group/Dial controls Palette/Modern Group/Numeric Group/Dial controls Palette/Classic Group/Classic Numeric Group/DialToggle Switch:From the front panel: controls Palette/Express Group/Buttons & Switches Group/Toggle Switch controls Palette/Modern Group/Boolean Group/Vertical (or Horizontal) ToggleSwitch controls Palette/Classic Boolean Group/Vertical (or Horizontal) Toggle Switch1.5.2 The Tools PaletteLabVIEW provides a third palette, called the Tools Palette (see Figure 1.10), but it isnot automatically displayed. By default, automatic tool selection is activated and theTools Palette is not shown.Figure 1.10The Tools Palette.The Tools Palette is not needed for routine tasks, but it can be displayedusing menu options View / Tools Palette from either the front panel or the blockdiagram.The Tools Palette options provide a good overview of the various tasks thatmust be accomplished to program in LabVIEW. In the following list, the usage ofeach of the tools in the Tools Palette are described, along with the way to accomplish the same task using automatic tool selection.11

12Introduction Automatic Tool Selection Button (top of Tools Palette)—this is a toggle buttonwith a green LED display that indicates when automatic tool selection is activated. Operate Value Tool (finger)—used to push buttons (to toggle a Boolean value, toselect a menu item, etc). If automatic tool selection is activated, moving themouse over a control that can be operated selects this tool. Position / Size / Select Tool (arrow)—used to relocate and resize controls. If automatic tool selection is activated, moving the mouse near the border of a controlselects this control. Edit Text Tool (A with cursor)—used to enter text (on labels and string constants). Ifautomatic tool selection is activated, double-click in a text field to select this control. Connect Wire Tool (Spool)—used to connect wires between block outputs andinputs. If automatic tool selection is activated, positioning the mouse near a connector or a wire selects this tool. Object Shortcut Menu Tool (Menu icon)—opens a pop-up menu of options forcontrols and programming blocks. Right-clicking on any object also opens thepop-up menu. Scroll Window Tool (Cupped Hand)—used to drag a window (e.g., to scroll to ahidden portion of a large block diagram). If automatic tool selection is activated,you must use the scroll bars at the edges of the windows to scroll. Set / Clear Breakpoint Tool (Stop sign)—Breakpoints are used when debuggingprograms to freeze execution so you can see what is happening within the program.Breakpoints are always set on the block diagram. If automatic tool selection is activated, you can right-click on a function or wire and select Set Breakpoint from thepop-up menu. Probe Data Tool (Probe symbol: yellow circle, arrow, P character)—Probes canbe placed on wires to show the value in the wire when the program is run. Probesare placed on the block diagram, but they are visible over the front panel as well.If automatic tool selection is activated, you can right-click on a wire and selectProbe from the pop-up menu. Get Color Tool (Dropper)—used to set the current foreground and backgroundcolors. Click the dropper on a colored object, and the foreground and backgroundcolors shown at the bottom of the Tools Palette will be set to the colors of theselected object.Note: You can also click on the foreground and background colors shown at thebottom of the Tools Palette and select colors from a color selection palette. Set Color Tool (Paintbrush)—sets the foreground and background colors of acolored object to the colors shown at the bottom of the Tools Palette. This is predominantly used on the front panel, although there are a few objects that can becolored on the block diagram as well (e.g., labels).For most common tasks, the automatic tool selection mechanism works verywell and eliminates the need to keep changing the currently selected tool.1.6 CREATING A VIWe will demonstrate how to build a LabVIEW programs VIs with an example. Inthe example, we will build a very simple VI that has a toggle switch and an LEDindicator that illuminates when the switch is “on” (Figure 1.11).The example is intended to be about as simple as possible. It contains two controls (toggle switch and stop button) and one indicator (LED). It takes one wire onthe block diagram to complete the programming.

Section 1.6Creating a VIFigure 1.11Power Indicator VIdevel

6.3 Writing LabVIEW Data to a Measurement File 185 6.4 Reading a LabVIEW Measurement File 189 6.5 Reading a Spreadsheet File in LabVIEW 190 6.6 Using Spreadsheet Data to Initialize a Matrix Control 199 Key Terms 209 Summary 209 Self-Assessment 211 Problems 212 7 GRAPHING WITH LABVIEW

Related Documents:

Certified LabVIEW Architect Exam LabVIEW Core 1 LabVIEW Core 3 LabVIEW Core 2 Managing Software Engineering in LabVIEW Advanced Architectures in LabVIEW LabVIEW Connectivity Object-Oriented Design and Programming in LabVIEW LabVIEW Performance LabVIEW Real-Time 1

examples. So launch LabVIEW and explore the LabVIEW environment as you read this section. 1.3.1 Starting LabVIEW . If your version of LabVIEW was installed using the default installation procedure, launch LabVIEW by selecting All Programs National Instruments LabVIEW 2013 (or LabVIEW 2014) LabVIEW 2013 (or LabVIEW 2014) from the Start menu .

Labview Exercises for Labview 7.0 Installation of Labview: 1. Install the Labview 7.0 software and drivers onto your computer. These files can be found by mapping a network drive to \\poohbah\labview, and by running the ‗autorun‘ file in the ‗Labview 7‘ folder. The serial num

WELCOME TO CONCORDIA COLLEGE! As your employer at Concordia College, we want to introduce ourselves. Concordia College-Selma was founded as Alabama Lutheran Academy and Junior College in 1922. Our name was changed to Concordia College on July 1, 1981. Concordia College-Selma is one of ten colleges and universities in the Concordia

in LabVIEW Object-Oriented Design & Programming in LabVIEW LabVIEW Learning Path LabVIEW Core 1 LabVIEW Getting Started LabVIEW LabVIEW Core 3 Core 2. Student Guide x ni.com C.What You Need to Get Started Befor

Sound and Vibration Measurement Suite Sound and Vibration Toolkit LabVIEW Internet Toolkit LabVIEW Advanced Signal Processing Toolkit . LabVIEW Report Generation Toolkit for Microsoft Office LabVIEW Database Connectivity Toolkit LabVIEW DataFinder Toolkit LabVIEW S

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

The American Board of Radiology . i The Diagnostic Radiology Milestone Project The Milestones are designed only for use in evaluation of resident physicians in the context of their participation in ACGME accredited residency or fellowship programs. The Milestones provide a framework for the assessment of the development of the resident physician in key dimensions of the elements of physician .