Interactive SourceMeter® Instrument Reference Manual Section 8:
2450-901-01 Rev. B/September 2013 8-17
bufferVar.clear()
This function clears all readings and statistics from the specified buffer.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
bufferVar.clear()
The name of the reading buffer, which may be a default buffer (defbuffer1 or
defbuffer2) or a user-defined buffer
Example
testData = buffer.make(50)
trigger.model.load("SimpleLoop", 3, 0, testData)
trigger.model.initiate()
waitcomplete()
printbuffer(1, testData.n, testData)
testData.clear()
print("Readings in buffer after clear ="
.. testData.n)
trigger.model.initiate()
waitcomplete()
printbuffer(1, testData.n, testData)
Create a reading buffer named
testData, make three readings and
store them in testData, and then view
the readings.
Print number of readings in testData.
Output:
-4.5010112303956e-10, -
3.9923108222095e-12, -
4.5013931471161e-10
Clear the readings in testData.
Verify that there are no readings in
testData.
Output:
Readings in buffer after
clear = 0
Store three new readings in testData
and view those when complete.
Output:
4.923509754e-07,
3.332266330e-07,
Also see
buffer.delete() (on page 8-9)
buffer.make() (on page 8-11)
bufferVar.clear() (on page 8-17)
print() (on page 8-77)
printbuffer() (on page 8-78)
Reading buffers (on page 3-10)
Remote buffer operation (on page 3-27)