Section 11: TSP command reference
Details
The readings buffer recall attribute is like an array (a Lua table) of the readings stored in the
reading buffer. This array holds the same data that is returned when the reading buffer is accessed
directly; that is, rb[2] and rb.readings[2] access the same value.
Example
reset()
testData = dmm.makebuffer(1000)
testData.collectchannels = 1
dmm.nplc = 0.5
dmm.range = 0
dmm.configure.set("Dcv_100mV")
dmm.setconfig("slot2", "Dcv_100mV")
scan.create("2035:2040")
scan.execute(testData)
print(testData.readings[1])
printbuffer(1, 6, testData.readings)
Also see
bufferVar.formattedreadings
bufferVar.fractionalseconds
bufferVar.relativetimestamps
bufferVar.seconds
bufferVar.statuses
bufferVar.times
bufferVar.units
Reading buffers
11-30
(on page 11-26)
(on page 11-27)
(on page 11-31)
(on page 11-32)
(on page 11-33)
(on page 11-34)
(on page 11-37)
(on page 6-7, on page 6-1)
Series 3700A System Switch/Multimeter Reference Manual
This example creates a reading buffer named
testData, configures the buffer to collect
channel data, sets and saves the DMM
configuration, creates a scan list, and then
runs the scan.
The print() command then outputs the first
reading in the reading buffer.
Output:
6.239269805e-07
The printbuffer() command then outputs
the readings for measurements 1 to 6 in the
reading buffer.
Output:
6.239269805e-07, 6.943093615e-07,
4.954026325e-07, 7.432710179e-07,
6.943093615e-07, 6.331072911e-07
NOTE: An alternative way to use the
printbuffer() command for this example
is printbuffer(1, 6, testData),
because "readings" is an optional
parameter and is assumed if it has not been
specified.
3700AS-901-01 Rev. D/June 2018