
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Section 8: TSP command reference
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
Function
Yes
Usage
bufferVar
.clear()
bufferVar
The name of the reading buffer, which may be a default buffer (
defbuffer1
or
defbuffer2
) or a user-defined buffer
Example
reset()
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,
3.974883867e-07
Also see
(on page 8-9)
(on page 8-11)
(on page 8-17)
(on page 8-77)
(on page 8-78)
(on page 3-10)
(on page 3-27)