del 2450 Interactive SourceMeter® Instrument Reference Manual Section 8:
2450-901-01 Rev. B/September 2013 8-25
Example 2
printbuffer(1, 3, tD.readings)
For the buffer created in Example 1, print the three readings in buffer.
Output:
-9.6420389034124e-12, -4.5509945811872e-10, -9.1078204006445e-12
Example 3
for x = 1, 3 do printbuffer(x, x, tD.readings, tD.sourcevalues, tD.relativetimestamps)
end
For the buffer created in Example 1, print the 3 readings, including the measurement, source value, and relative time
for each reading.
Output:
-9.6420389034124e-12, 2, 0
-4.5509945811872e-10, 2, 0.277194856
-9.1078204006445e-12, 2, 0.569614783
Also see
bufferVar.n (on page 8-23)
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)
bufferVar.relativetimestamps
This attribute contains the timestamps, in seconds, when each reading occurred relative to the timestamp of
reading buffer entry number 1.
Type TSP-Link accessible Affected by Where saved Default value
Instrument reset
Usage
relativetimestamp = bufferVar.relativetimestamp[N]
The timestamps, in seconds
The name of the reading buffer, which may be a default buffer (defbuffer1 or
defbuffer2) or a user-defined buffer
The reading number N; can be any value between 1 and the number of
readings in the buffer; use the bufferVar.n command to determine the
number of readings in the buffer
Details
This read-only attribute is an array (a Lua table) of timestamps when each reading occurred relative to the
timestamp of reading buffer entry number 1. These timestamps are equal to the time that has lapsed for each
reading since the first reading was stored in the buffer. Therefore, the relative timestamp for entry number 1 in
the buffer is 0.