41
ni.com The Art of LabVIEW in TestStand Rejwan Ali

The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

Embed Size (px)

Citation preview

Page 1: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

ni.com

The Art of LabVIEW in TestStand

Rejwan Ali

Page 2: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

2ni.com

Agenda

• TestStand vs LabVIEW

• The Art

• Additional Resources

Page 3: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

3ni.com

Agenda

• TestStand vs LabVIEW

• The Art

• Additional Resources

Page 4: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

4ni.com

VSAND

TestStand vs LabVIEWTestStand AND LabVIEW

Page 5: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

5ni.com

TestStand AND LabVIEW

• LabVIEW is a development environment

• TestStand is a test executive

• LabVIEW could be used to build a test executive

• TestStand is an off-the-shelf test executive

Page 6: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

6ni.com

NI TestStand – Test Management Software

• Graphical development

environment

• Automate tests written in

10 different test languages

• Multithreaded sequence

execution

• ASCII, HTML/Web, XML,

and ATML report

generation

• Access, Oracle,

SQL Server database

connectivity

Page 7: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

7ni.com

NI TestStand – Test Management Software

• Full Featured and Simple User Interfaces are provided in NI

LabVIEW, NI LabWindows™/CVI, C#, C++, and VB.NET

• TestStand Deployment Utility builds a simple installer with

necessary dependencies

Page 8: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

8ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

AND

Page 9: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

9ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

• Layers of an automated test

Drivers

Test Executive

Programming Language/Script

Hardware Layer

Page 10: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

10ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

• Using TestStand as your test

executive

Drivers

TestStand

Code Modules

Hardware Layer

LabVIEW CVI VC++ .NET

Page 11: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

11ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

• Components of a test executive

Test Executive

Drivers

Code Modules

Hardware Layer

User

Interface

Result

Collection

Report

Generation

Database

Logging

Tools/

UtilitiesTest Flow

User MgmtTest

SequenceEngine

Page 12: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

12ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

• Components that can be customized with LabVIEW

Test Executive

Drivers

Code Modules

Hardware Layer

User

Interface

Result

Collection

Report

Generation

Database

Logging

Tools/

UtilitiesTest Flow

User MgmtTest

SequenceEngine

Page 13: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

13ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

How do I know if TestStand is the right

tool?

Page 14: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

14ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

Key Words:

• Volume Production Test

• User Management

• Parallel/Multi-head Test

• Report Generation

• Database Logging

• Product Family

• Multi-Developer Environment

• Framework

• Phased Approach

Page 15: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

15ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

Scenario 1-

“We want to test 15 UUTs in a temperature chamber

at the same time AND simultaneously. If certain

people log in to the test they need to be able to

debug the UUTs.”

• Batch/Parallel Testing

• User Management

Page 16: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

16ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

Scenario 2-

“We want to be able to do extensive

troubleshooting of our contraption. We only

make 2 contraptions per year”

• Not production but could tests be reused by

production?

• Low Volume

Page 17: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

17ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

Other considerations:

• Are there multiple groups making

similar tests in the company?

• Can I meet my customer’s deadline?

• Will this grow over time?

• Training costs? Both on in house test

executive and COTS test executive

Page 18: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

18ni.com

TestStand AND LabVIEW

• Components of a

Test Executive

• LabVIEW

Compliments

TestStand

• Pick the Right

Tool for the Job

• Summary:

• LabVIEW and TestStand can be

used together to create a fully

automated test

• Choosing the right tool for the right

job can save you time and money

Page 19: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

19ni.com

Agenda

• TestStand AND LabVIEW

• The Art

• Additional Resources

Page 20: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

20ni.com

The Art

• Drawing the Line

• Examples

• Making the Right

Choice

Page 21: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

21ni.com

The Art

• Because some functionality in

TestStand and LabVIEW overlap it is

an art to know which tool to use for

which task

• Does it make sense to keep this

functionality in TestStand

• Does it make sense to push this

functionality to LabVIEW

• Drawing the Line

• Examples

• Making the Right

Choice

Page 22: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

22ni.com

The Art Chart

Native Functions/Operators

TS Datatypes

Limit Evaluation

Result Collection

Locking

Synchronization

API

Looping

Database Com.

FTP

Popups

Executables

Options Loading

Limit Loading

Hardware Communication

Data Display

Advanced Math

Network Communication

User Event Driven

Page 23: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

23ni.com

The Art Chart

Native Functions/Operators

TS Datatypes

Limit Evaluation

Result Collection

Locking

Synchronization

API

Looping

Database Com.

FTP

Popups

Executables

Options Loading

Limit Loading

Hardware Communication

Data Display

Advanced Math

Network Communication

User Event Driven

Page 24: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

24ni.com

The Art

• Native Functions/Operators

• For Instance:

Generate a random number

between 1000 and 2000

• Drawing the Line

• Examples

• Making the Right

Choice

Page 25: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

25ni.com

The Art

• Native Functions/Operators

• TestStand:

• LabVIEW:

• Drawing the Line

• Examples

• Making the Right

Choice

Page 26: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

26ni.com

The Art

• Native Functions/Operators

• Using native functions eliminates code

modules

• However, some advanced functions

may not exist in TestStand but are

available in LabVIEW

• (e.g. Reverse 1D Array)

• Drawing the Line

• Examples

• Making the Right

Choice

Page 27: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

27ni.com

The Art Chart

Native Functions/Operators

TS Datatypes

Limit Evaluation

Result Collection

Locking

Synchronization

API

Looping

Database Com.

FTP

Popups

Executables

Options Loading

Limit Loading

Hardware Communication

Data Display

Advanced Math

Network Communication

User Event Driven

Page 28: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

28ni.com

The Art

• Hardware Communication

• Communicate with Instruments and

UUT

• For Instance:

Set a current limit on a power supply

• Drawing the Line

• Examples

• Making the Right

Choice

Page 29: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

29ni.com

The Art

• Hardware Communication

• TestStand:

• Need a code module

• LabVIEW:

• Drawing the Line

• Examples

• Making the Right

Choice

Page 30: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

30ni.com

The Art

• Hardware Communication

• TestStand cannot directly call drivers

without a code module

• Drawing the Line

• Examples

• Making the Right

Choice

Page 31: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

31ni.com

The Art Chart

Native Functions/Operators

TS Datatypes

Limit Evaluation

Result Collection

Locking

Synchronization

TestStand API

Looping

Database Com.

FTP

Popups

Executables

Options Loading

Limit Loading

Hardware Communication

Data Display

Advanced Math

Network Communication

User Event Driven

Page 32: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

32ni.com

The Art

• API Calls

• For Instance:

Programmatically returning the result

of a specific step by name

• Drawing the Line

• Examples

• Making the Right

Choice

Page 33: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

33ni.com

The Art

• API Calls

• TestStand:

• LabVIEW:

• Drawing the Line

• Examples

• Making the Right

Choice

Page 34: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

34ni.com

The Art

• Example: API Calls

• Simpler in TestStand

• Unnecessary code module

• Do not need to close refs

• However, one must use API in

LabVIEW when creating a standalone

TS application (such as a custom UI)

• Drawing the Line

• Examples

• Making the Right

Choice

Page 35: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

35ni.com

The Art Chart

Native Functions/Operators

TS Datatypes

Limit Evaluation

Result Collection

Locking

Synchronization

API

Looping

Database Com.

FTP

Popups

Executables

Options Loading

Limit Loading

Hardware Communication

Data Display

Advanced Math

Network Communication

Data Analysis

Page 36: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

36ni.com

The Art

• Shared Functionality

• How complex is it in LabVIEW?

• How complex is it in TestStand?

• Can I reuse it in a LabVIEW only app?

• Do I already have something?

• What are my company’s standards?

• Which is easier to maintain?

• What is the performance?

• Drawing the Line

• Examples

• Making the Right

Choice

Page 37: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

37ni.com

The Art

• Making the Right Choice• Drawing the Line

• Examples

• Making the Right

Choice

LabVIEW TestStand

Pros:

• Faster

• More Flexible

• Lower Level Access

Pros:

• Garbage Cleanup

• Less Code (maintain)

• Direct API Access

• More readable

Cons:

• More Code

- Deployment

- Maintenance

• Close References

Cons:

• Less Flexible

• Step Action Overhead

Page 38: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

38ni.com

Agenda

• TestStand AND LabVIEW

• Most Common Mistakes

• Additional Resources

Page 39: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

39ni.com

Additional Resources

• I’m still hungry for information?

• UsingLabVIEWLabWindowsCVIwithTestStand.pdf

• Located on the web and on disk:

<TestStand>\Doc\Manuals

• Key topics:

• Using LabVIEW Data Types

with TestStand

• Effectively Using LabVIEW with

TestStand

• Using LabVIEW

with TestStand

• Advanced

Architecture

Series

Page 40: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

40ni.com

The Art

• I’m still hungry for information?

• Advanced Architecture Series

• http://www.ni.com/white-paper/7022/en/

• Key topics:

• Best Practices for Code Module Development – Ray Farmer

• NI TestStand Type Management Best Practices

– Santiago Delgado

• Using LabVIEW

with TestStand

• Advanced

Architecture

Series

Page 41: The Art of LabVIEW in TestStand - National Instrumentsaustralia.ni.com/sites/default/files/Art of LabVIEW in TestStand.pdf · ni.com 7 NI TestStand –Test Management Software •

41ni.com

Agenda

• TestStand AND LabVIEW

• The Art

• Additional Resources