8: TSP command reference Model DMM7510 7½ Digit Graphical Sampling Multimeter
8-32 DMM7510-901-01 Rev. B / May 2015
bufferVar.n
This attribute contains the number of readings in the specified reading buffer.
Type TSP-Link accessible Affected by Where saved Default value
Attribute (R) Yes
Restore configuration
Instrument reset
Power cycle
Not applicable Not applicable
Usage
numberOfReadings = bufferVar.n
The number of readings stored in the reading buffer
The name of the reading buffer, which may be a default buffer (defbuffer1 or
defbuffer2) or a user-defined buffer
Details
You can call this command to return the number of readings stored in the specified reading buffer.
You can use the bufferVar.n attribute in other commands. For example, to print all of the readings
in a buffer, use the following command:
printbuffer(1, bufferVar.n, bufferVar.readings)
Where bufferVar is the name of the buffer to use.
Example
testData = buffer.make(100)
trigger.model.load("SimpleLoop", 3, 0, testData)
trigger.model.initiate()
waitcomplete()
print(testData.n)
print(defbuffer1.n)
print(defbuffer2.n)
Create a reading buffer named
testData, configure the instrument to
make three measurements, and store the
readings in the buffer.
Print the number of readings in
testData.
Output:
3
Print the number of readings in
defbuffer1.
Example output:
0
Print the number of readings in
defbuffer2.
Example output:
Also see
buffer.delete() (on page 8-16)
buffer.make() (on page 8-18)
bufferVar.clear() (on page 8-24)
print() (on page 8-231)
printbuffer() (on page 8-232)
Reading buffers (on page 3-13)
Remote buffer operation (on page 3-30)