Preface |
|
xiii | |
About the Author |
|
xviii | |
1 Labview Program Development |
|
|
1.1 LabVIEW Programming Environment |
|
|
1 | (1) |
|
|
2 | (1) |
|
|
3 | (8) |
|
1.4 Block-Diagram Editing |
|
|
11 | (11) |
|
|
22 | (2) |
|
1.6 Pop-Up Menu and Data-Type Representation |
|
|
24 | (3) |
|
|
27 | (2) |
|
|
29 | (3) |
|
|
32 | (2) |
|
|
34 | (2) |
|
|
36 | (3) |
2 The While Loop And Waveform Chart |
|
39 | (44) |
|
2.1 Programming Structures and Graphing Modes |
|
|
39 | (1) |
|
|
40 | (2) |
|
2.3 Sine-Wave Plot Using a While Loop and Waveform Chart |
|
|
42 | (6) |
|
|
48 | (2) |
|
|
50 | (3) |
|
2.6 Waveform Chart Pop-Up Menu |
|
|
53 | (3) |
|
2.7 Finishing the Program |
|
|
56 | (1) |
|
|
57 | (2) |
|
|
59 | (11) |
|
2.10 Data Types and Automatic Creation Feature |
|
|
70 | (4) |
|
|
74 | (1) |
|
|
75 | (2) |
|
|
77 | (6) |
3 The For Loop And Waveform Graph |
|
83 | (44) |
|
|
83 | (1) |
|
3.2 Sine-Wave Plot Using a For Loop and Waveform Graph |
|
|
84 | (1) |
|
|
85 | (1) |
|
3.4 Owned and Free Labels |
|
|
86 | (1) |
|
3.5 Creation of Sine Wave Using a For Loop |
|
|
87 | (2) |
|
3.6 Cloning Block-Diagram Icons |
|
|
89 | (2) |
|
3.7 Auto-Indexing Feature |
|
|
91 | (3) |
|
|
94 | (1) |
|
3.9 X-Axis Calibration of the Waveform Graph |
|
|
94 | (6) |
|
3.10 Sine-Wave Plot Using a While Loop and Waveform Graph |
|
|
100 | (3) |
|
3.11 Front-Panel Array Indicator |
|
|
103 | (5) |
|
3.12 Debugging with the Probe Watch Window and Error List |
|
|
108 | (7) |
|
|
115 | (2) |
|
|
117 | (2) |
|
|
119 | (8) |
4 The Mathscript Node And Xy Graph |
|
127 | (52) |
|
4.1 MathScript Node Basics |
|
|
127 | (3) |
|
4.2 Quick MathScript Node Example: Sine-Wave Plot |
|
|
130 | (7) |
|
4.3 Waveform Simulator Using a MathScript Node and XY Graph |
|
|
137 | (5) |
|
4.4 Creating an XY Cluster |
|
|
142 | (1) |
|
|
143 | (1) |
|
4.6 LabVIEW MathScript Window |
|
|
144 | (4) |
|
4.7 Adding Shape Options Using an Enumerated Type Control |
|
|
148 | (3) |
|
4.8 Finishing the Block Diagram |
|
|
151 | (4) |
|
|
155 | (1) |
|
4.10 Control and Indicator Clusters |
|
|
156 | (7) |
|
4.11 Creating an Icon Using the Icon Editor |
|
|
163 | (1) |
|
|
163 | (5) |
|
4.13 Connector Assignment |
|
|
168 | (4) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (5) |
5 Introduction To Data Acquisition Devices Using Max |
|
179 | (27) |
|
5.1 Data Acquisition Hardware |
|
|
179 | (2) |
|
5.2 Measurement & Automation Explorer (MAX) |
|
|
181 | (4) |
|
|
185 | (2) |
|
|
187 | (1) |
|
5.5 Sampling Frequency and the Aliasing Effect |
|
|
187 | (2) |
|
5.6 Analog Input Operation Using MAX |
|
|
189 | (4) |
|
|
193 | (1) |
|
5.8 Analog Output Operation Using MAX |
|
|
193 | (4) |
|
|
197 | (1) |
|
5.10 Digital Input/Output Operation Using Max |
|
|
198 | (2) |
|
|
200 | (2) |
|
|
202 | (2) |
|
|
204 | (2) |
6 Data Acquisition Using Dad Assistant |
|
206 | (48) |
|
|
206 | (1) |
|
6.2 Simple Analog Input Operation on a DC Voltage |
|
|
207 | (11) |
|
|
218 | (10) |
|
|
228 | (6) |
|
6.5 Hardware-Timed Waveform Generator |
|
|
234 | (3) |
|
6.6 Placing a Custom-Made VI on a Block Diagram |
|
|
237 | (3) |
|
6.7 Completing and Executing Waveform Generator (Express) |
|
|
240 | (2) |
|
|
242 | (1) |
|
|
243 | (3) |
|
|
246 | (8) |
7 Data Files And Character Strings |
|
254 | (38) |
|
7.1 ASCII Text and Binary Data Files |
|
|
254 | (2) |
|
7.2 Storing Data in a Spreadsheet-Formatted File |
|
|
256 | (1) |
|
7.3 Storing a One-Dimensional Data Array |
|
|
257 | (3) |
|
|
260 | (2) |
|
7.5 Storing a Two-Dimensional Data Array |
|
|
262 | (4) |
|
7.6 Controlling the Format of Stored Data |
|
|
266 | (1) |
|
7.7 The Path Constant and Platform Portability |
|
|
267 | (2) |
|
7.8 Fundamental File I/O VIs |
|
|
269 | (5) |
|
7.9 Adding Text Labels to a Spreadsheet File |
|
|
274 | (3) |
|
|
277 | (2) |
|
|
279 | (3) |
|
|
282 | (2) |
|
|
284 | (8) |
8 Shift Registers |
|
292 | (56) |
|
8.1 Shift Register Basics |
|
|
292 | (3) |
|
8.2 Quick Shift Register Example: Integer Sum |
|
|
295 | (4) |
|
8.3 Noise and Signal Averaging |
|
|
299 | (2) |
|
|
301 | (6) |
|
8.5 Moving Average of Four Traces |
|
|
307 | (9) |
|
8.6 Modularity and Automatic SubVI Creation |
|
|
316 | (7) |
|
8.7 Moving Average of Arbitrary Number of Traces |
|
|
323 | (14) |
|
|
337 | (1) |
|
|
337 | (3) |
|
|
340 | (8) |
9 The Case Structure |
|
348 | (48) |
|
9.1 Case Structure Basics |
|
|
348 | (3) |
|
9.2 Quick Case Structure Example: Runtime Options Using Property Nodes |
|
|
351 | (12) |
|
9.3 State Machine Architecture: Guessing Game |
|
|
363 | (14) |
|
9.4 State Machine Architecture: Express VI-Based Digital Oscilloscope |
|
|
377 | (9) |
|
|
386 | (1) |
|
|
387 | (2) |
|
|
389 | (7) |
10 Data Dependency And The Sequence Structure |
|
396 | (29) |
|
10.1 Data Dependency and Sequence Structure Basics |
|
|
396 | (4) |
|
10.2 Event Timer Using a Sequence Structure |
|
|
400 | (7) |
|
10.3 Event Timer Using Data Dependency |
|
|
407 | (4) |
|
|
411 | (2) |
|
|
413 | (1) |
|
|
414 | (3) |
|
|
417 | (8) |
11 Analysis Vis: Curve Fitting |
|
425 | (45) |
|
11.1 Thermistor Resistance-Temperature Data File |
|
|
425 | (3) |
|
11.2 Temperature Measurement Using Thermistors |
|
|
428 | (3) |
|
11.3 The Linear Least-Squares Method |
|
|
431 | (2) |
|
11.4 Inputting Data to a VI Using a Front-Panel Array Control |
|
|
433 | (3) |
|
11.5 Inputting Data to a VI by Reading from a Computer File |
|
|
436 | (3) |
|
11.6 Slicing Up a Multidimensional Array |
|
|
439 | (4) |
|
|
443 | (1) |
|
11.8 Curve Fitting Using the Linear Least-Squares Method |
|
|
444 | (8) |
|
|
452 | (2) |
|
11.10 Curve Fitting Using the Nonlinear Least-Squares Method |
|
|
454 | (3) |
|
|
457 | (3) |
|
|
460 | (2) |
|
|
462 | (8) |
12 Analysis Vls: Fast Fourier Transform |
|
470 | (55) |
|
12.1 Quick Fast Fourier Transform Example |
|
|
470 | (10) |
|
12.2 The Fourier Transform |
|
|
480 | (1) |
|
12.3 Discrete Sampling and the Nyquist Frequency |
|
|
481 | (1) |
|
12.4 The Discrete Fourier Transform |
|
|
482 | (2) |
|
12.5 The Fast Fourier Transform |
|
|
484 | (1) |
|
12.6 Frequency Calculator VI |
|
|
485 | (3) |
|
|
488 | (3) |
|
12.8 Applying the FFT to Various Sinusoidal Inputs |
|
|
491 | (3) |
|
12.9 Magnitude of the Complex-Amplitude |
|
|
494 | (6) |
|
|
500 | (3) |
|
|
503 | (6) |
|
12.12 Estimating Frequency and Amplitude |
|
|
509 | (4) |
|
|
513 | (1) |
|
|
514 | (1) |
|
|
515 | (4) |
|
|
519 | (6) |
13 Data Acquisition And Generation Using DAQmx VIs |
|
525 | (49) |
|
|
525 | (2) |
|
13.2 Simple Analog Input Operation on a DC Voltage |
|
|
527 | (6) |
|
13.3 Digital Oscilloscope |
|
|
533 | (7) |
|
13.4 Express VI Automatic Code Generation |
|
|
540 | (1) |
|
13.5 Limitations of Express VIs |
|
|
541 | (2) |
|
13.6 Improving Digital Oscilloscope Using State Machine Architecture |
|
|
543 | (13) |
|
13.7 Analog Output Operations |
|
|
556 | (1) |
|
|
557 | (3) |
|
|
560 | (1) |
|
|
561 | (4) |
|
|
565 | (9) |
14 Control Of Stand-Alone Instruments |
|
574 | (110) |
|
14.1 Instrument Control Using VISA VIs |
|
|
574 | (1) |
|
|
575 | (4) |
|
14.3 The IEEE 488.2 Standard |
|
|
579 | (1) |
|
|
579 | (1) |
|
|
580 | (4) |
|
14.6 Device-Specific Commands |
|
|
584 | (2) |
|
14.7 Specific Hardware Used in This Chapter |
|
|
586 | (1) |
|
14.8 Measurement & Automation Explorer (MAX) |
|
|
587 | (7) |
|
14.9 Simple VISA-Based Query Operation |
|
|
594 | (4) |
|
14.10 Message Termination |
|
|
598 | (1) |
|
14.11 Getting and Setting Communication Properties Using a Property Node |
|
|
599 | (4) |
|
14.12 Performing a Measurement over the Interface Bus |
|
|
603 | (5) |
|
14.13 Synchronization Methods |
|
|
608 | (8) |
|
14.14 Measurement VI Based on the Serial Poll Method |
|
|
616 | (6) |
|
14.15 Measurement VI Based on the Service Request Method |
|
|
622 | (6) |
|
14.16 Creating an Instrument Driver |
|
|
628 | (14) |
|
14.17 Using the Instrument Driver to Write an Application Program |
|
|
642 | (5) |
|
|
647 | (1) |
|
|
648 | (3) |
|
|
651 | (2) |
|
Appendix A: Formula Node Programming For Chapter 4 |
|
|
653 | (8) |
|
|
653 | (1) |
|
A.2 Quick Formula Node Example: Sine-Wave Plot (Section 4.2) |
|
|
654 | (4) |
|
A.3 Formula Node-Based Waveform Simulator (Sections 4.3-4.4) |
|
|
658 | (1) |
|
A.4 Formula Node-Based Waveform Simulator (Section 4.8) |
|
|
659 | (1) |
|
A.5 Formula Node-Based Waveform Simulator (Section 4.10) |
|
|
660 | (1) |
|
Appendix B: Mathematics Of Leakage And Windowing |
|
|
661 | (9) |
|
B.1 Analytic Description of Leakage |
|
|
661 | (4) |
|
B.2 Description of Leakage Using the Convolution Theorem |
|
|
665 | (5) |
|
Appendix C: Pid Temperature Control Project |
|
|
670 | (14) |
|
|
670 | (1) |
|
C.2 Voltage-Controlled Bidirectional Current Driver for Thermoelectric Device |
|
|
670 | (2) |
|
C.3 PID Temperature Control Algorithm |
|
|
672 | (3) |
|
C.4 PID Temperature Control System |
|
|
675 | (1) |
|
C.5 Construction of Temperature Control System |
|
|
676 | (8) |
Index |
|
684 | |