High Voltage SourceMeter Instrument Reference Manual Section 6:
2470-901-01 Rev. A / May 2019 6-31
The following loop uses the print command instead of the printbuffer command. This loop
s
hows the same information described in the previous example (reading, units, and relative
timestamps for all readings stored in the buffer). However, because the print() command is use
d
i
nstead of printbuffer(), each line is tab-delimited (rather than comma-delimited) to produce
a
columnar output, as shown below:
for x = 1, mybuffer.n do
print(mybuffer.readings[x], mybuffer.units[x], mybuffer.relativetimestamps[x])
end
Example columnar-delimited output of above code:
-1.5794739960384e-09 Amp DC 0
-1.5190692453926e-11 Amp DC 0.411046134
-2.9570144943758e-11 Amp DC 0.819675745
-2.9361919146043e-11 Amp DC 1.228263492
-3.0666566508408e-11 Amp DC 1.636753752
-4.0868204653766e-11 Amp DC 2.034403917
Writable reading buffers
Writable reading buffers allow you to add external data manually to a user-defined buffer on the 2470.
You can create a writable buffer by specifying the writable or full writable style when you create the
buffer over a remote interface using SCPI or TSP commands. You cannot create a writable buffer
from the 2470 front panel.
Be aware that when you create a writable buffer, it immediately becomes the active buffer. If you try
to save readings from the instrument to the writable buffer, errors occur.
If you switch to front-panel control to make readings after selecting or creating a writable buffer, be
sure that you select a buffer that is not of the writable style to be the active buffer before you try to
store readings. Writable buffers are for manual entry of user-supplied data only and do not store
readings measured by the instrument.
To create a writable reading buffer named extData with a capacity of 20 readings, send t
he
f
ollowing SCPI or TSP command.
Using SCPI commands:
TRACe:MAKE "extData", 20, WRITable