Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-154 2601B-PULSE-901-01A April 2020
printbuffer()
This function prints data from tables or reading buffer subtables.
Usage
printbuffer(startIndex, endIndex, bufferVar)
printbuffer(startIndex, endIndex, bufferVar, bufferVar2)
printbuffer(startIndex, endIndex, bufferVar, ..., bufferVarN)
Beginning index of the buffer to print; this must be more than one and less than endIndex
Ending index of the buffer to print; this must be more than startIndex and less than the
index of the last entry in the tables
First table or reading buffer subtable to print
Second table or reading buffer subtable to print
The last table or reading buffer subtable to print
One or more tables or reading buffer subtables separated with commas
Details
If startIndex ≤ 1, 1 is used as startIndex. If n < endIndex, n is used as endIndex.
When any given reading buffers are used in overlapped commands that have not yet completed (at
least to the specified index), this function outputs data as it becomes available.
When there are outstanding overlapped commands to acquire data, n refers to the index that the last
entry in the table has after all the measurements have completed.
If you pass a reading buffer instead of a reading buffer subtable, the default subtable for that reading
buffer is used.
This command generates a single response message that contains all data. The response message
is stored in the output queue.
The format.data attribute controls the format of the response message.
Example
format.data = format.ASCII
format.asciiprecision = 6
printbuffer(1, rb1.n, rb1)
This assumes that rb1 is a valid reading buffer in the runtime environment. The use of rb1.n
(bufferVar.n) indicates that the instrument should output all readings in the reading buffer. In this example,
rb1.n equals 10.
Example of output data (rb1.readings):
4.07205e-05, 4.10966e-05, 4.06867e-05, 4.08865e-05, 4.08220e-05, 4.08988e-05,
4.08250e-05, 4.09741e-05, 4.07174e-05, 4.07881e-05
Also see
bufferVar.n (on page 11-28)
bufferVar.readings (on page 11-29)
format.asciiprecision (on page 11-89)
format.byteorder (on page 11-89)
format.data (on page 11-91)
printnumber() (on page 11-155)