Contents
© National Instruments Corporation v TestStand I Fundamentals Course Manual
Lesson 4
TestStand Parameters, Variables, and Expressions
Introduction.................................................................................................................4-1
TestStand Variables ....................................................................................................4-2
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 Globals............................................................................................................4-10
RunState Property Object ...........................................................................................4-11
RunState Subproperties...............................................................................................4-12
RunState Property Example........................................................................................4-13
The Expression Browser.............................................................................................4-14
Using the Expression Browser....................................................................................4-15
Defining Variables and Parameters ............................................................................4-16
Summary.....................................................................................................................4-21
Exercise 4-1 Using Local Variables ......................................................................4-22
Exercise 4-2 Examine the Uses and Differences between Locals,
File Globals, and Station Globals.....................................................4-25
Exercise 4-3 Using Expressions to Change Step Properties..................................4-32
Exercise 4-4 Passing Parameters ...........................................................................4-41
Exercise 4-5 Dynamically Selecting Which Sequence to Run..............................4-53
Lesson 5
Creating Test Modules in External Environments
Introduction.................................................................................................................5-1
Creating Tests in External Environments ...................................................................5-2
Data Transfer in TestStand .........................................................................................5-3
Using Clusters to Pass Data from LabVIEW..............................................................5-4
Using Structures to Pass Data from LabWindows/CVI..............................................5-6
Method 2—Passing Parameters Directly Without Using Structures ..........................5-8
Method 3—Using the ActiveX Automation API to Access Properties
and Methods .............................................................................................................5-12
What is ActiveX Automation?....................................................................................5-13
Summary of ActiveX Automation..............................................................................5-14
TestStand and ActiveX Automation ...........................................................................5-15
ActiveX Automation in LabVIEW .............................................................................5-16
An Example of ActiveX Automation in LabVIEW....................................................5-17
ActiveX Automation in LabWindows/CVI ................................................................5-18
An Example ActiveX Automation in In LabWindows/CVI.......................................5-19
Using TestStand Code Templates...............................................................................5-24
Code Templates ..........................................................................................................5-25
Summary.....................................................................................................................5-26