8: TSP command reference Model 2461 Interactive SourceMeter® Instrument
8-18 2461-901-01 A/November 2015
bufferVar.capacity
This attribute contains the number of readings a buffer can store.
Type TSP-Link accessible Affected by Where saved Default value
Attribute (R/W) Yes
Restore configuration
Instrument reset
Not applicable Not applicable
Usage
bufferCapacity = bufferVar.capacity
bufferVar.capacity = bufferCapacity
The maximum number of readings the buffer can store
The name of the reading buffer, which may be a default buffer (defbuffer1 or
defbuffer2
) or a user-defined buffer
Details
This command allows you to change or view how many readings a buffer can store. Changing the
size of a buffer will cause any existing data in the buffer to be lost.
The overall capacity of all buffers stored in the instrument cannot exceed 6,875,000 readings for
standard reading buffers and 27,500,000 for compact reading buffers. For more information about
buffer capacity, see Setting reading buffer capacity (on page 3-8).
Example
testData = buffer.make(500)
capTest = buffer.make(300)
bufferCapacity = capTest.capacity
print(bufferCapacity)
print(testData.capacity)
testData.capacity = 600
print(testData.capacity)
print(defbuffer1.capacity)
Create two user-defined reading buffers: testData and
capTest.
Create a variable called bufferCapacity to hold the
capacity of the capTest buffer.
Print bufferCapacity.
Output:
300
Print the capacity of testData.
Output:
500
Changes the capacity of testData to 600.
Print the capacity of testData.
Output:
600
Print the capacity of the default buffer defbuffer1.
Output:
Also see
buffer.delete() (on page 8-11)
buffer.make() (on page 8-14)
bufferVar.clear() (on page 8-19)
print() (on page 8-92)
printbuffer() (on page 8-93)
Reading buffers (on page 3-2)
Remote buffer operation (on page 3-23)