ni teststandtm i: introduction course...

11
サンプル NI TestStand TM I: Introduction Course Manual Course Software Version 4.1 February 2009 Edition Part Number 372771A-01 NI TestStand I: Introduction Course Manual Copyright © 2009 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. National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction. Trademarks National Instruments, NI, ni.com, NI TestStand, 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/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/legal/patents.

Upload: phamdang

Post on 27-May-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

サンプル

NI TestStandTM I: IntroductionCourse Manual

Course Software Version 4.1February 2009 EditionPart Number 372771A-01NI TestStand I: Introduction Course Manual

Copyright© 2009 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.

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.

TrademarksNational Instruments, NI, ni.com, NI TestStand, 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.

PatentsFor patents covering National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/legal/patents.

サンプル

© National Instruments Corporation iii NI TestStand I: Introduction Course Manual

Contents

Student GuideA. NI Certification .....................................................................................................viiB. Course Description ...............................................................................................viiC. What You Need to Get Started .............................................................................viiiD. Installing the Course Software..............................................................................ixE. TestStand Directories............................................................................................ixF. Course Goals.........................................................................................................xG. Course Conventions ..............................................................................................x

Lesson 1Introduction to Testing

A. Types of Tests .......................................................................................................1-2B. Automated Testing................................................................................................1-6C. Test System Terminology.....................................................................................1-7D. Components of an Automated Test System..........................................................1-8E. Testing Roles ........................................................................................................1-9F. Test System Development Process .......................................................................1-11G. Covering and Tracking Requirements ..................................................................1-13

Lesson 2Introduction to TestStand

A. Role of Test Management Software .....................................................................2-2B. TestStand Terminology.........................................................................................2-4C. TestStand Components .........................................................................................2-11D. Using the TestStand Sequence Editor...................................................................2-16E. TestStand Execution Architecture ........................................................................2-24

Lesson 3Analyzing Sequences

A. Debugging and Diagnostics ..................................................................................3-2B. Informational Tools ..............................................................................................3-20

Lesson 4Creating Sequences

A. Overview...............................................................................................................4-2B. Creating Steps .......................................................................................................4-4C. Code Modules .......................................................................................................4-32D. Subsequences ........................................................................................................4-41E. Sequence Properties ..............................................................................................4-43F. Sequence File Properties .......................................................................................4-44

サンプル

Contents

NI TestStand I: Introduction Course Manual iv ni.com

Lesson 5Managing Data

A. TestStand Data Layout..........................................................................................5-2B. Expressions ...........................................................................................................5-12C. Custom Data Types...............................................................................................5-17D. Variables ...............................................................................................................5-24E. Importing and Exporting Properties .....................................................................5-32

Lesson 6Overriding Callbacks

A. Callbacks...............................................................................................................6-2B. Process Model Callbacks ......................................................................................6-4C. Engine Callbacks ..................................................................................................6-7

Lesson 7Configuring TestStand

A. Station Options .....................................................................................................7-2B. Adapter Configuration ..........................................................................................7-6C. Edit Search Directories .........................................................................................7-11D. Report Options ......................................................................................................7-12E. Database Options ..................................................................................................7-17

Lesson 8Executing Tests in Parallel

A. Multi-UUT Testing ...............................................................................................8-2B. Multithreading ......................................................................................................8-6C. Executing Sequences in New Threads..................................................................8-10D. Multithreaded Process Models..............................................................................8-12E. Multithreading Caveats.........................................................................................8-22F. Synchronization Step Types .................................................................................8-26

Lesson 9Best Practices for Test Development

A. Creating Modular Test Systems............................................................................9-2B. Using Appropriate Data Scope .............................................................................9-6C. Using Setup and Cleanup Groups .........................................................................9-9D. Handling Non-Product-Specific Operations .........................................................9-10E. Documenting Test Systems ..................................................................................9-11F. Additional Resources ............................................................................................9-16

サンプル

Contents

© National Instruments Corporation v NI TestStand I: Introduction Course Manual

Lesson 10User Management

A. TestStand User Management ................................................................................10-2B. User Groups ..........................................................................................................10-4C. Privileges ..............................................................................................................10-5D. Synchronizing with Other User Management Systems ........................................10-9

Lesson 11Deploying a Test System

A. Introduction to Deployment..................................................................................11-2B. Deployment Considerations..................................................................................11-4C. Deployment Process .............................................................................................11-6D. Common Deployment Scenarios ...........................................................................11-11

Appendix AAdditional Information and Resources

Course Evaluation

サンプル

A. CallbacksCallbacks are optional sequences that allow you to perform actions when certain events occur. The process model and TestStand Engine both define callbacks. Each callback corresponds to a certain point in the execution of a process model or to a certain event that can occur when the TestStand Engine performs operations. For each callback, the process model or TestStandEngine contains a default sequence to execute, although, in many cases, the default sequence is empty. The process model or sequence file can override the default sequence and replace the default actions. Process models override engine callbacks, and sequence files can override process model callbacks or engine callbacks.

サンプル

Callbacks – Creating a Callback SequenceEach sequence file can include sequences that override callbacks. To override a callback within a sequence file, open the sequence file, right-click in the Sequences pane and select Sequence File Callbacks. Select a callback from the available list and click Add. You can also edit or delete existing callbacks. Process model sequence files can also override callbacks. Refer to the NI TestStand II: Customization course for more information about modifying process model sequence files.

サンプル

B. Process Model CallbacksProcess models define process model callbacks, which are sequences that you call as steps in an entry point sequence. You can customize a process model to add new process model callbacks. Client sequence files can override process model callbacks. Examples of process model callbacks in the default SequentialModel process model are MainSequence, PreUUT, and TestReport. Some process model callbacks have default actions associated with them. For example, the TestReport callback generates a report for the test. Overriding a callback that includes default actions disables the default action. For example, if you override the TestReport callback, the SequentialModel generates a test report only if the overridden version of the callback contains the code to do so. Other callbacks do not have default code associated with them. For example, you can override the PreUUT callback to add steps that the process model executes each time a UUT is tested before prompting for the UUT serial number. Another example is the MainSequence callback, which most client sequence files override to define the basic behavior of the test routine.

サンプル

Process Model and CallbacksConsider two separate client sequence files, Client #1 and Client #2, that use the same process model. Client #1 contains code that reads a serial number from a database, and Client #2 uses the default PreUUT callback that prompts the user to enter the serial number. Client #2 does not display the Pass/Fail banner of the default PostUUT callback, but Client #1 does. Instead of creating two separate process models for each client sequence file, you can use callbacks to implement the unique requirements of each client and use the same process model for the client sequence files.When execution of Client #1 begins, the process model detects that there are two callback sequences within the sequence file—PreUUT and MainSequence. When the process model reaches these callbacks, it executes the callback of the client file instead of the callback sequence that the process model defines. Therefore, the default code that displays a serial number dialog box does not appear. Instead, TestStand executes the code contained in the callback. A Pass/Fail banner displays because Client #1 does not override the PostUUT Callback.When execution of Client #2 begins, the process model detects that there are two callback sequences within the client sequence file—PostUUT and MainSequence. When the process model reaches these callbacks, it executes the callback of the client sequence file instead of the callback sequence that is defined in the process model. Therefore, the default code that displays the Pass/Fail banner dialog box does not appear. Instead, the code contained in the PostUUT callback executes. Because Client #2 does not override the PreUUT Callback, the user is prompted to enter a serial number.

サンプル

サンプル

Contents

NI TestStand I: Introduction Course Manual iv ni.com/ja

Lesson 5Managing Data

A. TestStand Data Layout..........................................................................................5-2B. Expressions ...........................................................................................................5-12C. Custom Data Types...............................................................................................5-17D. Variables ...............................................................................................................5-24E. Importing and Exporting Properties .....................................................................5-32

Lesson 6Overriding Callbacks

A. Callbacks...............................................................................................................6-2B. Process Model Callbacks ......................................................................................6-4C. Engine Callbacks ..................................................................................................6-7

Lesson 7Configuring TestStand

A. Station Options .....................................................................................................7-2B. Adapter Configuration ..........................................................................................7-6C. Edit Search Directories .........................................................................................7-11D. Report Options ......................................................................................................7-12E. Database Options ..................................................................................................7-17

Lesson 8Executing Tests in Parallel

A. Multi-UUT Testing ...............................................................................................8-2B. Multithreading ......................................................................................................8-6C. Executing Sequences in New Threads..................................................................8-10D. Multithreaded Process Models..............................................................................8-12E. Multithreading Caveats.........................................................................................8-22F. Synchronization Step Types .................................................................................8-26

Lesson 9Best Practices for Test Development

A. Creating Modular Test Systems............................................................................9-2B. Using Appropriate Data Scope .............................................................................9-6C. Using Setup and Cleanup Groups .........................................................................9-9D. Handling Non-Product-Specific Operations .........................................................9-10E. Documenting Test Systems ..................................................................................9-11F. Additional Resources ............................................................................................9-16

サンプルLabVIEW リソース

このセクションでは、LabVIEW に関する上記以外の情報源をご紹介します。

LabVIEW 関連の出版物

LabVIEW 関連書籍LabVIEW プログラミングおよびアプリケーションに関する書籍は数多く出版さ

れています。ナショナルインスツルメンツのウェブサイトには、LabVIEW に関

する書籍の一覧と、これらの本を購入できるサイトへのリンクがあります。詳細

は、http://zone.ni.com/devzone/cda/tut/p/id/5389をご覧ください。

Contents

NI TestStand I: Introduction Course Manual iv ni.com/ja

Lesson 5Managing Data

A. TestStand Data Layout..........................................................................................5-2B. Expressions ...........................................................................................................5-12C. Custom Data Types...............................................................................................5-17D. Variables ...............................................................................................................5-24E. Importing and Exporting Properties .....................................................................5-32

Lesson 6Overriding Callbacks

A. Callbacks...............................................................................................................6-2B. Process Model Callbacks ......................................................................................6-4C. Engine Callbacks ..................................................................................................6-7

Lesson 7Configuring TestStand

A. Station Options .....................................................................................................7-2B. Adapter Configuration ..........................................................................................7-6C. Edit Search Directories .........................................................................................7-11D. Report Options ......................................................................................................7-12E. Database Options ..................................................................................................7-17

Lesson 8Executing Tests in Parallel

A. Multi-UUT Testing ...............................................................................................8-2B. Multithreading ......................................................................................................8-6C. Executing Sequences in New Threads..................................................................8-10D. Multithreaded Process Models..............................................................................8-12E. Multithreading Caveats.........................................................................................8-22F. Synchronization Step Types .................................................................................8-26

Lesson 9Best Practices for Test Development

A. Creating Modular Test Systems............................................................................9-2B. Using Appropriate Data Scope .............................................................................9-6C. Using Setup and Cleanup Groups .........................................................................9-9D. Handling Non-Product-Specific Operations .........................................................9-10E. Documenting Test Systems ..................................................................................9-11F. Additional Resources ............................................................................................9-16

ナシ ョナルインスツルメンツのト レーニングコース

ナショナルインスツルメンツでは、LabVIEW ユーザのためのトレーニングコー

スを多数実施しています。今回受講されたトレーニングの次のコースや、他の分

野を扱うコースもご用意しています。コーステキストのご購入や、講師によるト

レーニングのお申し込みについては、ni.com/jp/trainingをご覧ください。

ナシ ョナルインスツルメンツの認定プログラム

NI 認定資格は、NI 製品および技術に関する専門性を認定するものです。計測

オートメーション業界において、NI 認定資格は当該分野における経験やスキル、

知識の証として、雇用主、クライアント、同僚により高く評価されるものです。

なお、LabVIEW 認定試験の詳細については、ni.com/jp/trainingを参照し

てください。

Contents

NI TestStand I: Introduction Course Manual iv ni.com/ja

Lesson 5Managing Data

A. TestStand Data Layout..........................................................................................5-2B. Expressions ...........................................................................................................5-12C. Custom Data Types...............................................................................................5-17D. Variables ...............................................................................................................5-24E. Importing and Exporting Properties .....................................................................5-32

Lesson 6Overriding Callbacks

A. Callbacks...............................................................................................................6-2B. Process Model Callbacks ......................................................................................6-4C. Engine Callbacks ..................................................................................................6-7

Lesson 7Configuring TestStand

A. Station Options .....................................................................................................7-2B. Adapter Configuration ..........................................................................................7-6C. Edit Search Directories .........................................................................................7-11D. Report Options ......................................................................................................7-12E. Database Options ..................................................................................................7-17

Lesson 8Executing Tests in Parallel

A. Multi-UUT Testing ...............................................................................................8-2B. Multithreading ......................................................................................................8-6C. Executing Sequences in New Threads..................................................................8-10D. Multithreaded Process Models..............................................................................8-12E. Multithreading Caveats.........................................................................................8-22F. Synchronization Step Types .................................................................................8-26

Lesson 9Best Practices for Test Development

A. Creating Modular Test Systems............................................................................9-2B. Using Appropriate Data Scope .............................................................................9-6C. Using Setup and Cleanup Groups .........................................................................9-9D. Handling Non-Product-Specific Operations .........................................................9-10E. Documenting Test Systems ..................................................................................9-11F. Additional Resources ............................................................................................9-16