Labview Intermediate I For 8, Materialy, Interfejsy szeregowe

 

[ Pobierz całość w formacie PDF ]
LabVIEW
TM
Intermediate I
Successful Development
Practices Course Manual
Course Software Version 8.0
October 2005 Edition
Part Number 323756B-01
LabVIEW Intermediate I Course Manual
Copyright
© 2004–2005 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.
In regards to components used in USI (Xerces C++, ICU, and HDF5), the following copyrights apply. For a listing of the conditions and
disclaimers, refer to the
USICopyrights.chm
.
This product includes software developed by the Apache Software Foundation (
http:/www.apache.org/
).
Copyright
© 1999 The Apache Software Foundation. All rights reserved.
Copyright © 1995–2003 International Business Machines Corporation and others. All rights reserved.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998, 1999, 2000, 2001, 2003 by the Board of Trustees of the University of Illinois. All rights reserved.
Trademarks
National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the
Terms of Use
section
on
ni.com/legal
for more information about National Instruments trademarks.
Other product and company names mentioned herein are trademarks or trade names of their respective companies.
Members of the National Instruments Alliance Partner Program are business entities independent from National Instruments and have
no agency, partnership, or joint-venture relationship with National Instruments.
Patents
For patents covering National Instruments products, refer to the appropriate location:
Help»Patents
in your software,
the
patents.txt
file on your CD, 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 1800 300 800, Austria 43 0 662 45 79 90 0, Belgium 32 0 2 757 00 20, Brazil 55 11 3262 3599, Canada 800 433 3488,
China 86 21 6555 7838, Czech Republic 420 224 235 774, Denmark 45 45 76 26 00, Finland 385 0 9 725 725 11,
France 33 0 1 48 14 24 24, Germany 49 0 89 741 31 30, India 91 80 51190000, Israel 972 0 3 6393737, Italy 39 02 413091,
Japan 81 3 5472 2970, Korea 82 02 3451 3400, Lebanon 961 0 1 33 28 28, Malaysia 1800 887710, Mexico 01 800 010 0793,
Netherlands 31 0 348 433 466, New Zealand 0800 553 322, Norway 47 0 66 90 76 60, Poland 48 22 3390150,
Portugal 351 210 311 210, Russia 7 095 783 68 51, Singapore 1800 226 5886, Slovenia 386 3 425 4200,
South Africa 27 0 11 805 8197, Spain 34 91 640 0085, Sweden 46 0 8 587 895 00, Switzerland 41 56 200 51 51,
Taiwan 886 02 2377 2222, Thailand 662 278 6777, United Kingdom 44 0 1635 523545
For further support information, refer to the
Additional Information and Resources
appendix. To comment on National Instruments
documentation, refer to the National Instruments Web site at
ni.com/info
and enter the info code
feedback
.
Contents
Student Guide
A. NI Certification .....................................................................................................vii
B. Course Description ...............................................................................................viii
C. What You Need to Get Started .............................................................................viii
D. Installing the Course Software..............................................................................ix
E. Course Goals.........................................................................................................ix
F. Course Conventions ..............................................................................................x
Lesson 1
Successful Development Practices
A. Scalable, Readable, and Maintainable VIs ...........................................................1-2
B. Successful Development Practices .......................................................................1-4
C. Course Project Overview ......................................................................................1-11
Summary .....................................................................................................................1-12
Lesson 2
Analyzing the Project
A. Evaluating the Needs of the Customer .................................................................2-2
Exercise 2-1 Analyze the Specifications ...............................................................2-5
B. Communicating with the Customer ......................................................................2-6
C. Developing the Requirements Document .............................................................2-8
Exercise 2-2 Analyze a Requirements Document .................................................2-9
D. Defining the Application ......................................................................................2-16
Summary .....................................................................................................................2-29
Lesson 3
Designing the User Interface
A. User Interface Design Issues.................................................................................3-2
B. User Interface Layout Issues.................................................................................3-4
C. Front Panel Prototyping ........................................................................................3-16
D. User Interface Example ........................................................................................3-17
E. Localizing User Interfaces ....................................................................................3-18
Exercise 3-1 Concept: User-Interface Design Techniques....................................3-20
Summary .....................................................................................................................3-26
©
National Instruments Corporation
iii
LabVIEW Intermediate I Course Manual
Contents
Lesson 4
Designing the Project
A. Design Patterns .....................................................................................................4-2
Exercise 4-1 Concept: Experiment with Design Patterns......................................4-12
B. Event-Based Design Patterns................................................................................4-13
Exercise 4-2 Concept: Experiment with Event Structures ....................................4-22
Exercise 4-3 Concept: Experiment with Event-Based Design Patterns ................4-28
C. Advanced Event-Based Design Patterns...............................................................4-29
Exercise 4-4 Concept: User Event Techniques .....................................................4-32
Exercise 4-5 Choose a Scalable Architecture........................................................4-40
D. Creating a Hierarchical Architecture ....................................................................4-41
E. Using the LabVIEW Project and Project Libraries ..............................................4-42
Exercise 4-6 Using the LabVIEW Project.............................................................4-54
F. Choosing Data Types............................................................................................4-55
Exercise 4-7 Choose Data Types...........................................................................4-57
G. Information Hiding ...............................................................................................4-60
Exercise 4-8 Information Hiding ...........................................................................4-64
H. Designing Error Handling Strategies ....................................................................4-76
Exercise 4-9 Design Error Handling Strategy .......................................................4-80
Summary .....................................................................................................................4-84
Lesson 5
Implementing the User Interface
A. Implementing User Interface-Based Data Types ..................................................5-2
Exercise 5-1 Implement User Interface-Based Data Types...................................5-8
B. Implementing Meaningful Icons...........................................................................5-12
Exercise 5-2 Implement a Meaningful Icon ..........................................................5-14
C. Implementing Appropriate Connector Panes........................................................5-15
Exercise 5-3 Implement an Appropriate Connector Pane .....................................5-18
Summary .....................................................................................................................5-19
Lesson 6
Implementing Code
A. Configuration Management ..................................................................................6-2
B. Implementing a Design Pattern.............................................................................6-7
Exercise 6-1 Implement the Design Pattern ..........................................................6-12
C. Implementing Code...............................................................................................6-27
Exercise 6-2 Timing ..............................................................................................6-49
D. Develop Scalable and Maintainable Modules ......................................................6-60
Exercise 6-3 Implement Code ...............................................................................6-67
E. Implement an Error Handling Strategy.................................................................6-76
Exercise 6-4 Implement Error Handling Strategy .................................................6-77
Summary .....................................................................................................................6-81
LabVIEW Intermediate I Course Manual
iv
ni.com
Contents
Lesson 7
Implementing a Test Plan
A. Verifying the Code................................................................................................7-2
B. Implementing a Test Plan for Individual VIs .......................................................7-2
C. Implementing a Test Plan for Integrating VIs ......................................................7-6
Exercise 7-1 Integrate Initialize and Shutdown Functions ....................................7-10
Exercise 7-2 Integrate Display Module .................................................................7-16
Exercise 7-3 Integrate Record Function ................................................................7-22
Exercise 7-4 Integrate Play Function.....................................................................7-28
Exercise 7-5 Integrate Stop Function ....................................................................7-33
Exercise 7-6 Integrate Error Module .....................................................................7-35
Exercise 7-7 Integrate Save and Load Functions ..................................................7-39
Exercise 7-8 Integrate Select Cue Function ..........................................................7-46
Exercise 7-9 Integrate Move Cue Functions .........................................................7-48
Exercise 7-10 Integrate Delete Function .................................................................7-51
D. Implementing a Test Plan for the System .............................................................7-53
Exercise 7-11 Stress and Load Testing....................................................................7-59
Summary .....................................................................................................................7-61
Lesson 8
Evaluating VI Performance
A. Steps to Improving Performance ..........................................................................8-2
B. Using VI Metrics to Identify VI Issues.................................................................8-2
Exercise 8-1 Identify VI Issues with VI Metrics ...................................................8-4
C. Further Identifying VI Issues with VI Analyzer (Optional) .................................8-5
Exercise 8-2 Identify VI Issues with VI Analyzer (Optional)...............................8-12
D. Identifying Performance Problems .......................................................................8-13
E. Fixing Performance Problems ..............................................................................8-14
Exercise 8-3 Concept: Methods of Updating Indicators .......................................8-22
Summary .....................................................................................................................8-24
Lesson 9
Implementing Documentation
A. Designing Documentation ....................................................................................9-2
B. Developing User Documentation..........................................................................9-2
C. Describing VIs, Controls, and Indicators..............................................................9-5
Exercise 9-1 Document User Interface..................................................................9-7
D. Creating Help Files ...............................................................................................9-9
Exercise 9-2 Implement Documentation ...............................................................9-10
Summary .....................................................................................................................9-12
©
National Instruments Corporation
v
LabVIEW Intermediate I Course Manual
[ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • leborskikf.pev.pl
  •