
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Section 8: TSP command reference
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
(on page 8-23)
(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)
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
Attribute (R)
Yes
Restore configuration
Instrument reset
Power cycle
Not applicable
Not applicable
Usage
relativetimestamp
=
bufferVar
.relativetimestamp[
N
]
relativetimestamp
The timestamps, in seconds
bufferVar
The name of the reading buffer, which may be a default buffer (
defbuffer1
or
defbuffer2
) or a user-defined buffer
N
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.