
2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-153
Example 1
x = 10
print(x)
Example of an output response message:
10
Note that your output might be different if you set
your ASCII precision setting to a different value.
Example 2
x = true
print(tostring(x))
Example of an output response message:
true
Also see
(on page 7-92)
printbuffer()
This function prints data from tables or reading buffer subtables.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
printbuffer(
startIndex
,
endIndex
,
bufferVar)
printbuffer(
startIndex
,
endIndex
,
bufferVar
,
bufferVar2
)
printbuffer(
startIndex
,
endIndex
,
bufferVar
, ...,
bufferVarN
)
startIndex
Beginning index of the buffer to print; this must be more than one and less than
endIndex
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
bufferVar
First table or reading buffer subtable to print
bufferVar2
Second table or reading buffer subtable to print
bufferVarN
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.