TestStand
TM
I: Introduction
Course Manual
Course Software Version 3.5
November 2005 Edition
Part Number 322317H-01
TestStand I: Introduction Course Manual
Copyright
© 1999–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.
Trademarks
National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section
onni.com/legal for more information about National Instruments trademarks.
Tektronix® and Tek are registered trademarks of Tektronix, Inc. 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,
thepatents.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 ExpresswayAustin, Texas 78759-3504USATel: 512 683 0100
Worldwide Offices
Australia1800300800, Austria4306624579900, Belgium32027570020, Brazil551132623599, Canada8004333488,
China862165557838, CzechRepublic420224235774, Denmark4545762600, Finland3850972572511,
France330148142424, Germany490897413130, India918051190000, Israel972036393737, Italy3902413091,
Japan81354722970, Korea820234513400, Lebanon96101332828, Malaysia1800887710, Mexico018000100793,
Netherlands310348433466, NewZealand0800553322, Norway47066907660, Poland48223390150,
Portugal351210311210, Russia70957836851, Singapore18002265886, Slovenia38634254200,
SouthAfrica270118058197, Spain34916400085, Sweden460858789500, Switzerland41562005151,
Taiwan8860223772222, Thailand6622786777, UnitedKingdom4401635523545
For further support information, refer to the Additional Information and Resources appendix. Tocomment on National Instruments
documentation, refer to the National Instruments Web site at
ni.com/info
and enter the info code
feedback
.
© National Instruments CorporationiiiTestStand I: Introduction Course Manual
Contents
Student Guide
About This Manual.....................................................................................................ix
What You Need to Get Started...................................................................................x
Course Goals...............................................................................................................xi
Course Conventions....................................................................................................xi
Lesson 1
Introduction to TestStand
Introduction to TestStand............................................................................................1-1
Role of Test Management Software...........................................................................1-2
What is TestStand?.....................................................................................................1-3
Why Use TestStand?...................................................................................................1-4
Build versus Buy Development Costs........................................................................1-5
TestStand Reduces Development Costs.....................................................................1-6
Integrated TestStand Architecture..............................................................................1-7
TestStand Architecture...............................................................................................1-8
TestStand Sequence Editor.........................................................................................1-10
TestStand Operator Interfaces....................................................................................1-11
TestStand Architecture: TestStand Engine.................................................................1-12
TestStand Architecture: Module Adapters.................................................................1-13
Summary.....................................................................................................................1-16
Exercise 1-1 Running a Sequence File..................................................................1-18
Exercise 1-2 ARunning a Sequence File from the LabVIEW OperatorInterface...1-22
Exercise 1-2 BRunning a Sequence File from the LabWindows/CVI
Operator Interface.....................................................................................................1-26
Lesson 2
TestStand Environment
Introduction.................................................................................................................2-1
TestStand Sequences...................................................................................................2-2
Step Groups.................................................................................................................2-3
TestStand Sequence Files...........................................................................................2-4
Debugging Tools.........................................................................................................2-5
What is a Process Model?...........................................................................................2-8
TestStand Process Models..........................................................................................2-10
Default Process Model: Test UUTs Mode..................................................................2-12
Role of a Process Model in TestStand........................................................................2-13
Workspaces.................................................................................................................2-15
Source Code Control...................................................................................................2-16
Sequence File Tools....................................................................................................2-17
Workspaces and Projects Demo.................................................................................2-18
Summary.....................................................................................................................2-19
Contents
TestStand I: Introduction Course Manualivni.com
Exercise 2-1 Understanding the Sequence File.....................................................2-20
Exercise 2-2 Running a Sequence File with Breakpoints and Single Stepping....2-25
Exercise 2-3 Understanding the Sequential Process Model..................................2-34
Lesson 3
Creating Sequences
Introduction.................................................................................................................3-1
How to Create Test Sequences...................................................................................3-2
Step 1: Specify the Module Adapter...........................................................................3-3
Step 2: Select the Step Type.......................................................................................3-5
Step Types...................................................................................................................3-6
Step 3: Specify the Code Module...............................................................................3-8
Specifying the Module................................................................................................3-9
Specifying the Module: Search Directories................................................................3-10
Step 4: Configure the Step Properties.........................................................................3-11
Step Properties: General Tab......................................................................................3-12
Step Properties: Preconditions....................................................................................3-13
Step Properties: Run Options Tab..............................................................................3-14
Step Properties: Post Actions Tab..............................................................................3-15
Step Properties: Loop Options Tab.............................................................................3-16
NI Switch Executive Demo........................................................................................3-17
Step Properties: Synchronization Tab.........................................................................3-18
Step Properties: Expressions Tab...............................................................................3-19
Step Properties: Requirements Tab.............................................................................3-20
Summary.....................................................................................................................3-25
Exercise 3-1 Creating Steps in the Sequence Editor.............................................3-26
Exercise 3-2 Configuring Loop Options...............................................................3-36
Exercise 3-3 Creating a Sequence.........................................................................3-41
Exercise 3-4 Running Simultaneous Sequences (Optional)..................................3-57
Lesson 4
TestStand Parameters, Variables,andExpressions
Introduction.................................................................................................................4-1
TestStand Parameters and Variables...........................................................................4-2
TestStand Parameters..................................................................................................4-3
Parameters: Passing Data to Subsequences................................................................4-4
Local Variables...........................................................................................................4-5
Creating Local Variables............................................................................................4-6
Sequence File Global Variables..................................................................................4-8
Creating Sequence File Global Variables...................................................................4-9
Station Global Variables.............................................................................................4-10
RunState Property Object...........................................................................................4-11
RunState Subproperties...............................................................................................4-12
RunState Property Example........................................................................................4-13
RunState Property Example using Find......................................................................4-14
Contents
© National Instruments CorporationvTestStand I: Introduction Course Manual
Expression Browser....................................................................................................4-15
Defining Variables and Parameters............................................................................4-16
Operators/Functions Tab.............................................................................................4-18
Summary.....................................................................................................................4-24
Exercise 4-1 Using Local Variables......................................................................4-25
Exercise 4-2 Examining the Uses and Differences between
Local, File Global, and Station Global Variables.............................4-29
Exercise 4-3 Using Expressions to Change Step Properties..................................4-36
Exercise 4-4 Passing Parameters...........................................................................4-44
Exercise 4-5 Dynamically Selecting Which Sequence to Run (Challenge)..........4-56
Lesson 5
Creating Code Modules in External Environments
Introduction.................................................................................................................5-1
Data Transfer in TestStand.........................................................................................5-3
Method 1—Passing Parameters Directly....................................................................5-4
Passing Parameters – LabVIEW Advanced Settings..................................................5-6
Passing Parameters – LabWindows/CVI....................................................................5-7
Method 2—Using the Methods and Properties of the TestStand ActiveX API
toPassData..............................................................................................................5-10
What is ActiveX Automation?....................................................................................5-11
Summary of ActiveX Automation..............................................................................5-12
TestStand and ActiveX Automation...........................................................................5-13
Lookup Strings............................................................................................................5-14
ActiveX Automation in LabVIEW.............................................................................5-15
Example: ActiveX Automation in LabVIEW.............................................................5-16
ActiveX Automation in LabWindows/CVI................................................................5-17
Example: ActiveX Automation in LabWindows/CVI................................................5-18
Differences in the C-Language Adapters....................................................................5-20
Using TestStand Code Templates...............................................................................5-23
Code Templates..........................................................................................................5-24
Summary.....................................................................................................................5-25
Exercise 5-1 ACreating Numeric Limit Tests with LabVIEW................................5-26
Exercise 5-1 BCreating Numeric Limit Tests with LabWindows/CVI...................5-34
Exercise 5-2 ADebugging Tests Using LabVIEW...................................................5-41
Exercise 5-2 BDebugging Tests Using LabWindows/CVI......................................5-44
Exercise 5-3 AUsing the ActiveX API in LabVIEW Code Modules......................5-47
Exercise 5-3 BUsing the ActiveX API in LabWindows/CVI
Code Modules..........................................................................................................5-52
Lesson 6
Importing and Exporting Properties
Introduction.................................................................................................................6-1
Import/Export Properties Tool....................................................................................6-2
Import/Export Properties Dialog Box.........................................................................6-3
评论0
最新资源