Section 5: Axial-lead device high current test
Model 8010 High Power Device Test Fixture User's Manual
5-4
8010-900-01 Rev. C / March 2017
Example program code
The example code is designed to be run from Test Script Builder. It can also be run from other
programming environments, such as Microsoft
®
Visual Studio
®
or National Instruments LabVIEW
TM
.
However, you may need to make changes to the example code to use other programming
environments.
The following script contains all the code necessary to output and capture a current or voltage pulse
using the Model 2561 fast ADC. The script sets up the source-measure unit (SMU), configures the
trigger model, prepares the reading buffers, executes the test, and outputs the collected data in a
format that can be copied and pasted from the instrument console to a Microsoft
®
Excel
®
spreadsheet.
The script is written using Test Script Processor (TSP) functions rather than as a single block of
in-line code. TSP functions are similar to functions in other programming languages, such as
Microsoft
®
Visual C
®
or Visual Basic
®
. They must be called before the code in them is executed.
Because of this, running the script alone will not execute the test. To execute the test, you need to
run the script to load the functions into test script memory. You then call the functions.
Refer to the documentation for Test Script Builder for directions on how to run scripts and enter
commands using the instrument console.
The script contains comments that describe what is being performed by the lines of code and
documentation for the functions in the script.