Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-22 2601B-PULSE-901-01A April 2020
bufferVar.clearcache()
This function clears the cache.
Usage
bufferVar.clearcache()
The reading buffer; can be a dynamically allocated user-defined buffer or a dedicated
reading buffer
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 you:
• Initiate successive sweeps without reconfiguring the sweep 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.
• Overwrite data in the reading buffer by setting the bufferVar.fillmode attribute to
smua.FILL_WINDOW.
To avoid this, you can include explicit calls to the bufferVar.clearcache() function to remove
stale values from the reading buffer cache.
Example
smua.nvbuffer1.clearcache()
Clears the reading buffer cache for dedicated reading buffer 1.
Also see
bufferVar.fillmode (on page 11-25)
Reading buffers (on page 5-1)
Removing stale values from the reading buffer cache (on page 10-57)
smua.nvbufferY (on page 11-211)