Example Code

Simple Test Executive (Mac/PC)

Code and Documents

Attachment

Overview

A basic Test Executive which was designed to run on a Mac, but can also run on a Windows or Linux machine.

 

Description

This Test Executive has been written entirely in LabVIEW and should run equally well on Macs, Windows and Linux. The LabVIEW code has been kept as simple as possible, allowing it to be easily understood, modified and run in earlier versions of LabVIEW.

 

The test sequence is defined in a normal text file, and can contain any number of tests and test parameters. The sequence file "Sequence - Main.ini" is loaded on startup but other sequence files can be written and loaded manually.

 

An example test sequence is included along with a number of dummy tests for demonstration purposes. These dummy tests can be copied and then modified to include proper test code.

 

Results are stored in CSV format, they are written on the fly by a number of VIs for storing numeric, pass/fail and text string results. At the completion of testing the results file is renamed to include PASS/FAIL/ABORTED status.

 

The following VIs are called to perform the testing:

 

Sequence - Action Test.vi

Sequence - Check Test Equipment.vi

Sequence - Define Test Equipment.vi

Sequence - Power Down.vi

Sequence - Power Up.vi

Sequence - Reset All.vi

 

A manual control tab is present on the user interface which can be used to call single tests and other VIs directly, also a help tab displays the contents of an easily modified "help.txt" file.

 

Also Included is a facility for recording test equipment asset numbers and calibration dates, these are also stored within the results file.

 

 

 

Test Executive.jpg

 

Version 2

Version 2 of this software has added a calibration tab. Both the manual control and calibration tabs are now SubPanel containers, the actual controls are stored within "Panel - Manual Control.vi" and "Panel - Calibration.vi". These VIs can be updated/run independantly without any modifications to the main "Test Executive.vi".

 

manual.jpg

 

Also a few minor tweaks including the addition of a combined user name and serial number dialog box complete with a comments field.

 

Version 3

The latest version of the Simple Test Executive contains mainly cosmetic appearance changes. All of the controls and indicators have been changed to a "flat" style which has the benefit of the software appearing virtually identical on Mac/Linux/Windows. The tab control has been hidden and is now controlled via four buttons placed top/centre.

 

Main.png

 

Note that the font used in the Progress area has to be changed to suit the system being used, it should be set to any of the monospaced fonts at a size that doesn't cause wrapping to occur.

 

Also available for download is a very simple Results Analyser VI. This allows individual test results to be displayed complete with histogram and CPK analysis. It is a bit basic but could easily be expanded.

 

Screenshot 2019-11-13 at 19.32.11.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
LuisMontoya
Member
Member
on

I saw your Code and It's great!

Thank you!

antony.g
Member
Member
on

Glad you like it, hope you find some of my code useful.

Contributors