Section 5: Reading buffers Model 2601B-PULSE System SourceMeter Instrument Reference Manual
5-6 2601B-PULSE-901-01A April 2020
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. Nonoverlapped 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
The 2601B-PULSE contains two dedicated reading buffers:
• smua.nvbuffer1 (buffer 1)
• smua.nvbuffer2 (buffer 2)
To access a reading buffer, include the name of the buffer in the command. For example, the
following command stores readings into buffer 1:
smua.measure.overlappedi(smua.nvbuffer1)
Reading buffer commands
The following tables summarize commands associated with the reading buffers. See TSP command
reference (on page 11-1) for detailed reading buffer command information.
Commands to save or clear readings:
smua.savebuffer(smua.nvbufferY)
Saves the reading buffer to the nonvolatile memory on the
2601B-PULSE.
mybuffer = smua.makebuffer(n)
Creates a dynamically allocated buffer for n readings.
Deletes the dynamically allocated buffer.
savebuffer(smua.nvbuffer1,"csv",
"/usb1/mybuffer.csv")
Saves the reading buffer to the USB flash drive.