
2606B System SourceMeter® Instrument Reference Manual
Section 3: Functions and features
2606B-901-01 Rev. B / May 2018
3-19
Dynamically allocated buffer example
The programming example below illustrates how to store data to an allocated buffer called
mybuffer
. The 2606B stores 100 current readings in
mybuffer
and then recalls all the readings.
-- Restore 2606B defaults.
smua.reset()
-- Select measure I autorange.
smua.measure.autorangei = smua.AUTORANGE_ON
-- Select measure V autorange.
smua.measure.autorangev = smua.AUTORANGE_ON
-- Select ASCII data format.
format.data = format.ASCII
-- Set buffer count to 100.
smua.measure.count = 100
-- Set measure interval to 0.1 s.
smua.measure.interval = 0.1
-- Select source voltage function.
smua.source.func = smua.OUTPUT_DCVOLTS
-- Output 1 V.
smua.source.levelv = 1
-- Turn on output.
smua.source.output = smua.OUTPUT_ON
-- Create a temporary reading buffer.
mybuffer = smua.makebuffer(smua.measure.count)
-- Store current readings in mybuffer.
smua.measure.overlappedi(mybuffer)
-- Wait for buffer to fill.
waitcomplete()
-- Turn off output.
smua.source.output = smua.OUTPUT_OFF
-- Output readings 1 to 100 from mybuffer.
printbuffer(1, 100, mybuffer)
-- Delete mybuffer.
mybuffer = nil
Sweep operation
The 2606B can generate DC and pulsed sweeps to perform source-only sweeps,
source-and-measure sweeps, or measure-only sweeps. Three of the sweep types are described in
the following: DC and pulsed linear staircase sweeps, DC and pulsed logarithmic staircase sweeps,
and DC and pulsed list sweeps.
DC and pulsed linear staircase sweeps:
With this type of sweep, the voltage or current increases
or decreases in fixed steps, beginning with a start voltage or current and ending with a stop voltage or
current. The figure below shows an increasing linear staircase sweep and a pulsed staircase sweep.
Pulsed linear staircase sweeps function the same way that DC linear staircase sweeps function,
except that pulsed linear staircase sweeps return to the idle level between pulses.