Keithley 2651A Reference Manual page 124

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual
Buffer examples
Dedicated reading buffer example
The following programming example illustrates how to store data using dedicated reading buffer 1 for
channel A. In the example, the Model 2651A loops for voltages from 0.01 V to 1 V with 0.01 V steps
(essentially performing a staircase sweep), stores 100 current readings and source values in buffer 1,
and then recalls all 100 readings and source values.
-- Restore Model 2651A defaults.
smua.reset()
-- Select channel A display.
display.screen = 0
-- Display current.
display.smua.measure.func = display.MEASURE_DCAMPS
-- Select measure I autorange.
smua.measure.autorangei = smua.AUTORANGE_ON
-- Select ASCII data format.
format.data = format.ASCII
-- Clear buffer 1.
smua.nvbuffer1.clear()
-- Enable append buffer mode.
smua.nvbuffer1.appendmode = 1
-- Enable source value storage.
smua.nvbuffer1.collectsourcevalues = 1
-- Set count to 1.
smua.measure.count = 1
-- Select source voltage function.
smua.source.func = smua.OUTPUT_DCVOLTS
-- Set bias voltage to 0 V.
smua.source.levelv = 0.0
-- Turn on output.
smua.source.output = smua.OUTPUT_ON
-- Loop for voltages from 0.01 V to 1 V.
for v = 1, 100 do
-- Set source voltage
smua.source.levelv = v * 0.01
-- Measure current, store in buffer.
smua.measure.i(smua.nvbuffer1)
end
-- Turn off output.
smua.source.output = smua.OUTPUT_OFF
-- Output readings 1 to 100.
printbuffer(1, smua.nvbuffer1.n, smua.nvbuffer1.readings)
-- Output source values 1 to 100.
printbuffer(1, smua.nvbuffer1.n, smua.nvbuffer1.sourcevalues)
2651A-901-01 Rev. A / March 2011
Section 3: Functions and features
3-17

Advertisement

Table of Contents
loading

Table of Contents