Section 14: TSP command reference
2470 High Voltage SourceMeter Instrument Reference Manual
14-10
2470-901-01 Rev. A /
May
2019
buffer.getstats()
This function returns statistics from a specified reading buffer.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
statsVar
= buffer.getstats()
statsVar
= buffer.getstats(
bufferVar
)
statsVar
= buffer.getstats(
bufferVar
,
absStartTime
,
absStartFractional
,
absEndTime
,
absEndFractional
)
statsVar
= buffer.getstats(
bufferVar
,
relStartTime
,
relEndTime
)
statsVar
A table that contains the entries for buffer statistics; see
Details
for information
on the entries
bufferVar
The name of the reading buffer, which may be a default buffer (
defbuffer1
or
defbuffer2
) or a user-defined buffer; if no buffer is specified, this parameter
defaults to
defbuffer1
absStartTime
An integer that represents the absolute start time in seconds
absStartFractional
An integer that represents the portion of the absolute start time that is in
fractional seconds
absEndTime
An integer that represents the absolute end time in seconds
absEndFractional
An integer that represents the portion of the absolute end time that is in
fractional seconds
relStartTime
The start time in seconds relative to the start time of the data in the buffer
relEndTime
The end time in seconds relative to the start time of the data in the buffer
Details
This function returns a table with statistical data about the data that was placed in the reading buffer.
The instrument automatically updates reading buffer statistics as data is added to the reading buffer.
When the reading buffer is configured to fill continuously and overwrite old data with new data, the
buffer statistics include the data that was overwritten. To get statistics that do not include data that
has been overwritten, define a large buffer size that will accommodate the number of readings you
will make.
The table returned from this function provides statistics at the time the function is called. Although the
instrument continues to update the statistics, the table that is returned is not updated. To get fresh
statistics, call this function again.