
Section 3: Functions and features
2606B System SourceMeter® Instrument Reference Manual
3-10
2606B-901-01 Rev. B / May 2018
Remote reading buffer programming
You can get readings by making overlapped or sequential measurements. Overlapped commands do
not finish executing before the next command starts. Sequential commands complete execution
before the next command starts executing.
The measured value is not the only component of a reading. The measurement status (for example,
“In Compliance” or “Overranged”) is also an element of data associated with a particular reading.
All routines that return measurements can store the measurements in the reading buffers.
Overlapped measurements always return readings in a reading buffer. Non-overlapped measurement
functions can return single-point measurement values or store multiple values in a reading buffer.
A reading buffer is based on a Lua table. The measurements are accessed by ordinary array
accesses. If
rb
is a reading buffer, the first measurement is accessed as
rb[1]
and the ninth
measurement as
rb[9]
. The additional information in the table is accessed as additional members of
the table.
The load, save, and write operations for reading buffers function differently in the remote state. From
a remote command interface, you can extract data from reading buffers as the instrument acquires
the data.
Dedicated reading buffer designations
Each source-measure unit (SMU) contains two dedicated reading buffers:
•
smu
X
.nvbuffer1
(buffer 1)*
•
smu
X
.nvbuffer2
(buffer 2)*
* smu
X
can be
smua
for SMU Channel A or
smub
for SMU Channel B
To access a reading buffer, include the name of the SMU in the attribute. For example, the following
command would store readings from channel A into buffer 1:
smua.measure.overlappedi(smua.nvbuffer1)
Reading buffer commands
The following tables summarize commands associated with the reading buffers. See
(on page 7-1) for detailed reading buffer command information.
Reading buffer commands*
Command
Description
Commands to save/clear readings:
smu
X
.savebuffer(smu
X
.nvbuffer
Y
)
Saves the reading buffer to the nonvolatile memory on the
2606B.
smu
X
.nvbuffer1.clear()
Clears buffer 1.
smu
X
.nvbuffer2.clear()
Clears buffer 2.
mybuffer = smu
X
.makebuffer(
n
)
Creates a dynamically allocated buffer for
n
readings.
mybuffer = nil
Deletes the dynamically allocated buffer.
savebuffer(smu
X
.nvbuffer1,"csv",
"/usb1/mybuffer.csv")
Saves the reading buffer to the USB flash drive.