Section 5: Capturing high power pulse waveforms Model 2651A High Power System SourceMeter® Instrument User's Manual
5. Timer 2 receives the SOURCE_COMPLETE_EVENT_ID event trigger from timer 1 and begins its
countdown.
6. The SMU trigger model continues to the End Pulse Event, where it pauses and waits for an event
trigger from timer 2.
7. The timer 2 countdown expires and timer 2 outputs an event trigger to the SMU End Pulse Event.
8. The SMU End Pulse Event receives the event trigger from timer 2 and outputs the falling edge of
the pulse, after which it allows the SMU trigger model to continue.
9. The SMU trigger model then compares the current Trigger Layer loop iteration with the trigger
count:
•
If the current iteration is less than the trigger count, the Trigger Layer repeats and the SMU trigger
model reaches Source Event, where it waits for another trigger from timer 1. The trigger model then
repeats from step 3.
•
If the current iteration is equal to the trigger count, the SMU trigger model exits the Trigger Layer,
passes through the Arm Layer, and returns to idle.
Example program code
NOTE
The example code is designed to be run from Test Script Builder or TSB Embedded. It can also be
run from other programming environments, such as Microsoft
®
Visual Studio
®
or National Instruments
LabVIEW
TM
. However, modification of the example code may be required to do so.
The following script contains all the code necessary to output and capture a current or voltage pulse
using the Model 2651A 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
inline code. TSP functions are similar to functions in other programming languages, such as
Microsoft
®
Visual C
®
or Visual Basic
®
, and must be called before the code contained in them is
executed. Because of this, running the script alone will not execute the test. To execute the test, run
the script to load the functions into test script memory and then call the functions. Refer to the
documentation for Test Script Builder or
(on page 3-3) 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.
--[[
Title: Fast ADC Usage
Description: This script is designed to output pulses and capture
both the current and the voltage of the pulse using the fast ADC of
the Model 2651A High Power System SourceMeter instrument.
Equipment Needed:
1x 2651A
]]
5-4
2651A-900-01 Rev. A / March 2011