Section 11: TSP command reference Series 3700A System Switch/Multimeter Reference Manual
11-22 3700AS-901-01 Rev. D/June 2018
testData = dmm.makebuffer(50)
testData.appendmode = 1
dmm.measurecount = 3
dmm.measure(testData)
printbuffer(1,testData.n, testData )
testData.clear()
print("Readings in buffer after clear ="
.. testData.n)
dmm.measurecount = 3
dmm.measure(testData)
printbuffer(1,testData.n, testData )
Create a reading buffer named testData and
enable append mode for it. Take three readings and
store them in testData, and then view the
readings.
Output:
3.515871341e-07, 5.596728126e-07,
3.944283032e-07
Next, clear the data and verify there are no readings
in buffer.
Output:
Readings in buffer after clear = 0
Store three new readings in the buffer and view
those when done.
Output:
4.923509754e-07, 3.332266330e-07,
3.974883867e-07
Also see
Reading buffers (on page 6-7, on page 6-1)
bufferVar.clearcache()
This function clears the cache.
Usage
bufferVar.clearcache()
Details
This function clears all readings from the specified cache.
If you run successive operations that overwrite reading buffer data, the reading buffer may return
stale cache data. This can happen when initiating successive scans without reconfiguring the scan
measurements. Watch for this when running Lua code remotely on more than one node, because
values in the reading buffer cache may change while the Lua code is running.To avoid this, you can
include explicit calls to the bufferVar.clearcache() function to remove stale values from the
reading buffer cache.
Example
Clears the reading buffer cache for a
user-defined buffer named testData.
Also see
bufferVar.cachemode (on page 11-19)
Reading buffers (on page 6-7, on page 6-1)