
Section 7: TSP command reference
2606B System SourceMeter® Instrument Reference Manual
7-154
2606B-901-01 Rev. B / May 2018
Example
format.data = format.ASCII
format.asciiprecision = 6
printbuffer(1, rb1.n, rb1)
This assumes that
rb1
is a valid reading buffer in the run-time 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
(on page 7-25)
(on page 7-26)
(on page 7-92)
(on page 7-93)
(on page 7-94)
(on page 7-154)
printnumber()
This function prints numbers using the configured format.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
printnumber(
value1
)
printnumber(
value1
,
value2
)
printnumber(
value1
, ...,
valueN
)
value1
First value to print in the configured format
value2
Second value to print in the configured format
valueN
Last value to print in the configured format
...
One or more values separated with commas
Details
There are multiple ways to use this function, depending on how many numbers are to be printed.
This function prints the given numbers using the data format specified by
format.data
and
format.asciiprecision
.
Example
format.asciiprecision = 10
x = 2.54
printnumber(x)
format.asciiprecision = 3
printnumber(x, 2.54321, 3.1)
Configure the ASCII precision to 10 and set
x
to 2.54.
Read the value of
x
based on these settings.
Change the ASCII precision to 3.
View how the change affects the output of
x
and some
numbers.
Output:
2.54000
2.54e+00, 2.54e+00, 3.10e+00