LabVIEW Basics 1 for 6.1.pdf

(1860 KB) Pobierz
152297007 UNPDF
LabVIEW TM Basics I
Introduction
Course Manual
Course Software Version 6.1
December 2001 Edition
Part Number 320628J-01
LabVIEW Introduction Course Manual
Copyright
© 1993, 2001 National Instruments Corporation. All rights reserved.
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including
photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written
consent of National Instruments Corporation.
Trademarks
LabVIEW™, National Instruments™, and ni.com™ are trademarks of National Instruments Corporation.
Product and company names mentioned herein are trademarks or trade names of their respective companies.
Patents
For patents covering National Instruments products, refer to the Help»About dialog box in your software (if applicable),
the patents.txt file on your CD (if applicable), and/or ni.com/legal/patents .
 
Worldwide Technical Support and Product Information
ni.com
National Instruments Corporate Headquarters
11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 683 0100
Worldwide Offices
Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 757 00 20, Brazil 011 284 5011, Canada (Calgary) 403 274 9391,
Canada (Montreal) 514 288 5722, Canada (Ottawa) 613 233 5949, Canada (Québec) 514 694 8521,
Canada (Toronto) 905 785 0085, China (Shanghai) 021 6555 7838, China (ShenZhen) 0755 3904939,
Czech Republic 02 2423 5774, Denmark 45 76 26 00, Finland 09 725 725 11, France 01 48 14 24 24, Germany 089 741 31 30,
Greece 30 1 42 96 427, Hong Kong 2645 3186, India 91805275406, Israel 03 6120092, Italy 02 413091, Japan 03 5472 2970,
Korea 02 596 7456, Malaysia 603 9596711, Mexico 001 800 010 0793, Netherlands 0348 433466, New Zealand 09 914 0488,
Norway 32 27 73 00, Poland 0 22 528 94 06, Portugal 351 1 726 9011, Russia 095 2387139, Singapore 2265886,
Slovenia 386 3 425 4200, South Africa 11 805 8197, Spain 91 640 0085, Sweden 08 587 895 00, Switzerland 056 200 51 51,
Taiwan 02 2528 7227, United Kingdom 01635 523545
Contents
Student Guide
A. About This Manual ...............................................................................................vii
B. What You Need to Get Started .............................................................................ix
C. Installing the Course Software..............................................................................x
D. Course Goals and Non-Goals ...............................................................................xi
E. Course Conventions ..............................................................................................xii
Lesson 1
Introduction to LabVIEW
A. LabVIEW..............................................................................................................1-2
B. Virtual Instruments ...............................................................................................1-3
C. LabVIEW Environment ........................................................................................1-6
D. LabVIEW Help and Manuals ...............................................................................1-18
Lesson 2
Creating, Editing, and Debugging a VI
A. Creating a VI.........................................................................................................2-2
B. Editing Techniques ...............................................................................................2-11
C. Debugging Techniques .........................................................................................2-20
Lesson 3
Creating a SubVI
A. SubVIs ..................................................................................................................3-2
B. Icon and Connector Pane ......................................................................................3-3
C. Using SubVIs ........................................................................................................3-10
D. Creating a SubVI from Sections of a VI...............................................................3-17
Lesson 4
Loops and Charts
A. While Loops..........................................................................................................4-2
B. Waveform Charts ..................................................................................................4-4
C. Shift Registers.......................................................................................................4-17
D. For Loops ..............................................................................................................4-26
© National Instruments Corporation
iii
LabVIEW Introduction Course Manual
152297007.001.png 152297007.002.png
Contents
Lesson 5
Arrays, Graphs, and Clusters
A. Arrays....................................................................................................................5-2
B. Auto-Indexing .......................................................................................................5-4
C. Array Functions ....................................................................................................5-6
D. Polymorphism .......................................................................................................5-8
E. Waveform and XY Graphs ...................................................................................5-11
F. Clusters .................................................................................................................5-25
G. Cluster Functions ..................................................................................................5-28
Lesson 6
Case and Sequence Structures
A. Case Structures .....................................................................................................6-2
B. Sequence Structures ..............................................................................................6-10
C. Formula and Expression Nodes ............................................................................6-14
D. Avoiding Overusing Sequence Structures ............................................................6-18
Lesson 7
Strings and File I/O
A. Strings ...................................................................................................................7-2
B. String Functions ....................................................................................................7-4
C. File I/O VIs and Functions....................................................................................7-9
D. Formatting Spreadsheet Strings ............................................................................7-17
E. High-Level File I/O VIs........................................................................................7-21
Lesson 8
Data Acquisition and Waveforms
A. Overview and Configuration ................................................................................8-2
B. Organization of Data Acquisition VIs ..................................................................8-11
C. Performing a Single Analog Input ........................................................................8-13
D. DAQ Wizards .......................................................................................................8-17
E. Waveform Analog Input .......................................................................................8-20
F. Writing Waveform Data to File ............................................................................8-22
G. Analog Output.......................................................................................................8-25
H. Counters ................................................................................................................8-28
Lesson 9
Instrument Control
A. Instrument Control Overview ...............................................................................9-2
B. GPIB Communication and Configuration ............................................................9-3
C. Communicating with Instruments.........................................................................9-9
D. Using Instrument Driver VIs ................................................................................9-12
E. VISA .....................................................................................................................9-18
LabVIEW Introduction Course Manual
iv
ni.com
Contents
F. Using VISA VIs and Functions ............................................................................9-20
G. Serial Port Communication...................................................................................9-24
H. Waveform Transfers (Optional)............................................................................9-33
Appendix A
A. Additional Information .........................................................................................A-1
B. ASCII Character Code Equivalents Table ............................................................A-4
C. Instructor Notes.....................................................................................................A-7
© National Instruments Corporation
v
LabVIEW Introduction Course Manual
Zgłoś jeśli naruszono regulamin