Preface |
|
xvii | |
1 LabVIEW Basics |
|
1 | |
|
1.1 System Configuration Requirements |
|
|
2 | |
|
1.2 Installing the LabVIEW Student Edition |
|
|
2 | |
|
1.3 The LabVIEW Environment |
|
|
3 | |
|
1.4 The Getting Started Screen |
|
|
5 | |
|
1.5 Panel and Diagram Windows |
|
|
8 | |
|
1.5.1 Front Panel Toolbar |
|
|
10 | |
|
1.5.2 Block Diagram Toolbar |
|
|
12 | |
|
|
14 | |
|
|
16 | |
|
|
16 | |
|
|
16 | |
|
|
17 | |
|
|
19 | |
|
|
19 | |
|
|
20 | |
|
|
22 | |
|
|
22 | |
|
|
23 | |
|
|
23 | |
|
|
24 | |
|
|
26 | |
|
1.8.4 Searching the Palettes and Quick Drop |
|
|
27 | |
|
1.9 Opening, Loading, and Saving Vls |
|
|
30 | |
|
1.10 LabVIEW Help Options |
|
|
33 | |
|
1.10.1 Context Help Window |
|
|
33 | |
|
|
34 | |
|
1.11 Building Blocks: Pulse Width Modulation |
|
|
35 | |
|
1.12 Relaxed Reading: Controlling the World's Largest Particle Accelerator |
|
|
37 | |
|
|
39 | |
|
|
41 | |
|
|
45 | |
|
|
48 | |
2 Virtual Instruments |
|
52 | |
|
2.1 What Are Virtual Instruments? |
|
|
53 | |
|
2.2 Several Worked Examples |
|
|
55 | |
|
|
62 | |
|
2.3.1 Numeric Controls and Indicators |
|
|
62 | |
|
2.3.2 Boolean Controls and Indicators |
|
|
64 | |
|
2.3.3 Configuring Controls and Indicators |
|
|
68 | |
|
|
68 | |
|
2.4.1 Vls and Express Vls |
|
|
69 | |
|
|
70 | |
|
|
71 | |
|
|
74 | |
|
2.5 Building Your First VI |
|
|
77 | |
|
2.6 Data Flow Programming |
|
|
82 | |
|
2.7 Building a VI Using Express Vls |
|
|
84 | |
|
2.8 Building Blocks: Pulse Width Modulation |
|
|
91 | |
|
2.9 Relaxed Reading: Autonomous Driving in the DARPA Urban Challenge |
|
|
93 | |
|
|
96 | |
|
|
97 | |
|
|
102 | |
|
|
106 | |
3 Editing and Debugging Virtual Instruments |
|
111 | |
|
|
112 | |
|
3.1.1 Creating Controls and Indicators on the Block Diagram |
|
|
112 | |
|
|
114 | |
|
|
116 | |
|
3.1.4 Deleting and Duplicating Objects |
|
|
117 | |
|
|
117 | |
|
|
119 | |
|
3.1.7 Changing Font, Style, and Size of Text |
|
|
120 | |
|
3.1.8 Selecting and Deleting Wires |
|
|
122 | |
|
3.1.9 Wire Stretching and Broken Wires |
|
|
123 | |
|
3.1.10 Aligning, Distributing, and Resizing Objects |
|
|
128 | |
|
|
130 | |
|
3.1.12 Cleaning Up the Block Diagram |
|
|
137 | |
|
|
139 | |
|
3.1.14 Reusing Snippets of Code |
|
|
140 | |
|
|
141 | |
|
|
142 | |
|
3.2.2 Highlight Execution |
|
|
144 | |
|
3.2.3 Single-Stepping Through a VI and Its SubVls |
|
|
146 | |
|
3.2.4 Breakpoints and Probes |
|
|
147 | |
|
|
152 | |
|
|
153 | |
|
|
155 | |
|
3.5 Building Blocks: Pulse Width Modulation |
|
|
156 | |
|
3.6 Relaxed Reading: Using Graphical System Design for Tumor Treatments |
|
|
158 | |
|
|
160 | |
|
|
162 | |
|
|
164 | |
|
|
168 | |
4 SubVls |
|
172 | |
|
|
173 | |
|
|
174 | |
|
4.3 Editing the Icon and Connector |
|
|
177 | |
|
|
177 | |
|
|
180 | |
|
4.3.3 Selecting and Modifying Terminal Patterns |
|
|
182 | |
|
4.3.4 Assigning Terminals to Controls and Indicators |
|
|
183 | |
|
|
184 | |
|
4.5 Using a VI as a SubVI |
|
|
188 | |
|
4.6 Creating a SubVI from a Selection |
|
|
191 | |
|
4.7 Error Checking and Error Handling |
|
|
193 | |
|
4.7.1 Automatic Error Handling |
|
|
193 | |
|
4.7.2 Manual Error Handling |
|
|
194 | |
|
|
194 | |
|
|
195 | |
|
4.9 The VI Hierarchy Window |
|
|
196 | |
|
4.10 Building Blocks: Pulse Width Modulation |
|
|
198 | |
|
4.11 Relaxed Reading: Embedded Graphical System Design Empowers Life-Saving Spider Robots |
|
|
201 | |
|
|
203 | |
|
|
204 | |
|
|
207 | |
|
|
210 | |
5 Structures |
|
213 | |
|
|
214 | |
|
|
216 | |
|
5.1.2 For Loops with Conditional Terminals |
|
|
220 | |
|
|
221 | |
|
5.3 Shift Registers and Feedback Nodes |
|
|
227 | |
|
|
227 | |
|
5.3.2 Using Shift Registers to Remember Data Values from Previous Loop Iterations |
|
|
229 | |
|
5.3.3 Initializing Shift Registers |
|
|
231 | |
|
|
233 | |
|
|
236 | |
|
5.4.1 Adding and Deleting Cases |
|
|
239 | |
|
5.4.2 Wiring Inputs and Outputs |
|
|
241 | |
|
5.5 Flat Sequence Structures |
|
|
247 | |
|
5.5.1 Evaluate and Control Timing in a Sequence Structure |
|
|
248 | |
|
5.5.2 Avoid the Overuse of Sequence Structures |
|
|
250 | |
|
|
250 | |
|
5.6.1 Formula Node Input and Output Variables |
|
|
251 | |
|
|
251 | |
|
5.7 Diagram Disable Structures |
|
|
254 | |
|
|
255 | |
|
5.8.1 Creating Local Variables |
|
|
255 | |
|
5.8.2 Use Local Variables with Care |
|
|
257 | |
|
5.8.3 Initializing Local Variables |
|
|
257 | |
|
5.8.4 Memory and Execution-Speed Considerations |
|
|
258 | |
|
5.9 Common Programming Techniques |
|
|
258 | |
|
5.9.1 Sequential Programming |
|
|
258 | |
|
5.9.2 State Programming and State Machines |
|
|
260 | |
|
|
264 | |
|
5.10 Some Common Problems in Wiring Structures |
|
|
265 | |
|
5.10.1 Failing to Wire a Tunnel in All Cases of a Case Structure |
|
|
265 | |
|
5.10.2 Overlapping Tunnels |
|
|
266 | |
|
5.10.3 Wiring Underneath Rather Than through a Structure |
|
|
266 | |
|
5.11 Building Blocks: Pulse Width Modulation |
|
|
267 | |
|
5.12 Relaxed Reading: Refining the Process of Steel Recycling |
|
|
271 | |
|
|
272 | |
|
|
275 | |
|
|
279 | |
|
|
284 | |
6 Arrays and Clusters |
|
288 | |
|
|
289 | |
|
6.1.1 Creating Array Controls and Indicators |
|
|
290 | |
|
6.1.2 Multidimensional Arrays |
|
|
292 | |
|
6.2 Creating Arrays with Loops |
|
|
293 | |
|
6.2.1 Creating Two-Dimensional Arrays |
|
|
296 | |
|
|
297 | |
|
|
297 | |
|
|
298 | |
|
|
300 | |
|
|
301 | |
|
|
302 | |
|
|
310 | |
|
|
313 | |
|
6.6 Creating Cluster Controls and Indicators |
|
|
314 | |
|
|
316 | |
|
6.6.2 Using Clusters to Pass Data to and from SubVls |
|
|
318 | |
|
|
319 | |
|
6.7.1 The Bundle Function |
|
|
319 | |
|
6.7.2 The Unbundle Function |
|
|
323 | |
|
6.7.3 Creating Cluster Constants on the Block Diagram |
|
|
323 | |
|
6.7.4 Using Polymorphism with Clusters |
|
|
325 | |
|
6.8 Matrix Data Type and Matrix Functions |
|
|
326 | |
|
6.8.1 Creating Matrix Controls, Indicators, and Constants |
|
|
326 | |
|
|
328 | |
|
|
330 | |
|
6.10 Building Blocks: Pulse Width Modulation |
|
|
331 | |
|
6.11 Relaxed Reading: User Friendly and Intelligent Acupuncture |
|
|
334 | |
|
|
336 | |
|
|
338 | |
|
|
341 | |
|
|
344 | |
7 Charts and Graphs |
|
348 | |
|
|
349 | |
|
|
357 | |
|
|
365 | |
|
7.4 Customizing Charts and Graphs |
|
|
368 | |
|
|
368 | |
|
|
372 | |
|
7.4.3 The Graph Palette and Scale Legend |
|
|
374 | |
|
7.4.4 Special Chart Customization Features |
|
|
376 | |
|
7.4.5 Special Graph Customization Features: Cursor Legend |
|
|
377 | |
|
7.4.6 Using Graph Annotations |
|
|
380 | |
|
7.4.7 Exporting Images of Graphs, Charts, and Tables |
|
|
381 | |
|
|
381 | |
|
7.5 Using Math Plots for 2D and 3D Graphs |
|
|
382 | |
|
|
382 | |
|
|
386 | |
|
7.6 Building Blocks: Pulse Width Modulation |
|
|
390 | |
|
7.7 Relaxed Reading: Environmental Monitoring In the Costa Rican Rain Forest |
|
|
391 | |
|
|
394 | |
|
|
396 | |
|
|
397 | |
|
|
399 | |
8 Data Acquisition |
|
402 | |
|
8.1 Components of a DAQ System |
|
|
403 | |
|
|
404 | |
|
|
406 | |
|
|
407 | |
|
|
408 | |
|
8.2.4 Analog Frequency-Domain Signals |
|
|
409 | |
|
8.2.5 One Signal—Five Measurement Perspectives |
|
|
411 | |
|
8.3 Common Transducers and Signal Conditioning |
|
|
412 | |
|
8.4 Signal Grounding and Measurements |
|
|
416 | |
|
8.4.1 Signal Source Reference Configuration |
|
|
416 | |
|
|
417 | |
|
8.5 Analog to Digital Conversion Considerations |
|
|
422 | |
|
|
427 | |
|
8.7 Choosing Your Data Acquisition Device |
|
|
428 | |
|
8.7.1 M Series Data Acquisition Devices |
|
|
429 | |
|
8.7.2 Low Cost Data Acquisition for Students |
|
|
429 | |
|
8.7.3 Simulated Data Acquisition |
|
|
429 | |
|
8.7.4 Macintosh, Linux, Palm OS, Windows Mobile for Pocket PC, and Select Windows CE OS Devices |
|
|
430 | |
|
8.8 DAQ Hardware Configuration |
|
|
431 | |
|
|
431 | |
|
|
439 | |
|
8.9 Using the DAQ Assistant |
|
|
441 | |
|
8.9.1 DAQmx Task Name Constant |
|
|
445 | |
|
|
448 | |
|
|
448 | |
|
|
449 | |
|
|
453 | |
|
|
454 | |
|
|
455 | |
|
8.12 Digital Input and Output |
|
|
460 | |
|
8.13 Building Blocks: Pulse Width Modulation |
|
|
466 | |
|
8.13.1 Generating Pulse Width Modulated Signals with Hardware Counters |
|
|
467 | |
|
8.13.2 Applications of Pulse Width Modulation |
|
|
468 | |
|
8.14 Relaxed Reading: Structural Health Monitoring of the Olympic Venues |
|
|
469 | |
|
|
471 | |
|
|
474 | |
|
|
475 | |
|
|
476 | |
9 Strings and File I/O |
|
478 | |
|
|
479 | |
|
9.1.1 Converting Numeric Values to Strings with Build Text Express VI |
|
|
486 | |
|
|
487 | |
|
9.2.1 Writing Data to a File |
|
|
491 | |
|
9.2.2 Reading Data from a File |
|
|
494 | |
|
9.2.3 Manipulating Spreadsheet Files |
|
|
495 | |
|
9.2.4 File I/O Express Vls |
|
|
498 | |
|
9.2.5 Obtaining the Path to the System Directories |
|
|
503 | |
|
9.3 Building Blocks: Pulse Width Modulation |
|
|
504 | |
|
9.4 Relaxed Reading: Optimizing Professional Cyclist Performance |
|
|
506 | |
|
|
508 | |
|
|
509 | |
|
|
511 | |
|
|
512 | |
10 MathScript RT Module |
|
516 | |
|
10.1 What Is MathScript RT Module? |
|
|
517 | |
|
10.2 Accessing the MathScript Interactive Window |
|
|
518 | |
|
10.2.1 The Command History and Output Windows |
|
|
520 | |
|
10.2.2 Viewing Data in a Variety of Formats |
|
|
521 | |
|
10.3 MathScript Help 524 10.4 Syntax |
|
|
526 | |
|
10.4.1 Key MathScript Functions |
|
|
535 | |
|
10.5 Defining Functions and Creating Scripts |
|
|
536 | |
|
10.5.1 User-Defined Functions |
|
|
537 | |
|
|
540 | |
|
10.6 Saving, Loading, and Exporting Data Flies |
|
|
543 | |
|
10.6.1 Saving and Loading Data Files |
|
|
543 | |
|
|
546 | |
|
|
547 | |
|
10.7.1 Accessing the MathScript Node |
|
|
548 | |
|
10.7.2 Entering Scripts into the MathScript Node |
|
|
550 | |
|
10.7.3 Input and Output Variables |
|
|
550 | |
|
10.7.4 Script Highlighting |
|
|
554 | |
|
|
556 | |
|
10.7.6 Saving Scripts from within the MathScript Node |
|
|
561 | |
|
10.8 Applications of MathScript RT Module |
|
|
563 | |
|
10.8.1 Instrument Your Algorithms |
|
|
563 | |
|
10.8.2 Graphical Signal Processing, Analysis, and Mathematics |
|
|
564 | |
|
10.8.3 Integrating Measurement Hardware |
|
|
565 | |
|
10.9 Building Blocks: Pulse Width Modulation |
|
|
566 | |
|
10.10 Relaxed Reading: Acquiring and Analyzing the Bioacoustic Communication of Killer Whales |
|
|
568 | |
|
|
570 | |
|
|
572 | |
|
|
573 | |
|
|
574 | |
11 Analysis |
|
576 | |
|
|
577 | |
|
11.1.1 Review of Matrices |
|
|
577 | |
|
11.1.2 Systems of Algebraic Equations |
|
|
581 | |
|
|
584 | |
|
11.2 Statistics and Curve Fitting |
|
|
587 | |
|
11.2.1 Curve Fits Based on Least Squares Methods |
|
|
587 | |
|
11.2.2 Fitting a Curve to Data with Normal Distributions |
|
|
591 | |
|
11.2.3 The Curve Fitting Express VI |
|
|
593 | |
|
11.3 Differential Equations |
|
|
597 | |
|
11.4 Finding Zeroes of Functions |
|
|
606 | |
|
11.5 Integration and Differentiation |
|
|
609 | |
|
|
611 | |
|
11.6.1 Normalized Frequency |
|
|
611 | |
|
11.6.2 Wave, Pattern, and Noise VIs |
|
|
615 | |
|
11.6.3 The Simulate Signal Express VI |
|
|
618 | |
|
|
620 | |
|
11.7.1 The Fourier Transform |
|
|
620 | |
|
|
624 | |
|
11.7.3 The Spectral Measurements Express VI |
|
|
629 | |
|
|
632 | |
|
11.7.5 The Filter Express VI |
|
|
641 | |
|
11.8 Building Blocks: Pulse Width Modulation |
|
|
644 | |
|
11.9 Relaxed Reading: Controlling the World's Largest Telescope in Real Time |
|
|
646 | |
|
|
648 | |
|
|
650 | |
|
|
651 | |
|
|
651 | |
A Instrument Control |
|
653 | |
|
A.1 Components of an Instrument Control System |
|
|
654 | |
|
|
654 | |
|
|
655 | |
|
A.1.3 GPIB Devices and Configurations |
|
|
657 | |
|
A.1.4 Serial Port Communication |
|
|
659 | |
|
A.1.5 Other Bus Technologies |
|
|
661 | |
|
A.2 Detecting and Configuring Instruments |
|
|
662 | |
|
|
662 | |
|
|
662 | |
|
A.3 Using the Instrument I/O Assistant |
|
|
665 | |
|
|
672 | |
|
A.4.1 Developing. Your Own Instrument Driver |
|
|
679 | |
|
A.5 Future of Instrument Drivers and Instrument Control |
|
|
680 | |
|
|
681 | |
B LabVIEW Developer Certification |
|
684 | |
|
B.1 Overview of the NI LabVIEW Certification Structure |
|
|
685 | |
|
B.2 Logistics of the CLAD Examination |
|
|
685 | |
|
|
686 | |
|
B.4 Sample CLAD Examination |
|
|
687 | |
|
B.5 Detailed Sample CLAD Test Solutions |
|
|
698 | |
|
B.6 Additional Study Resources |
|
|
705 | |
|
|
705 | |
Index |
|
707 | |