
Section 7: TSP command reference
2606B System SourceMeter® Instrument Reference Manual
7-92
2606B-901-01 Rev. B / May 2018
fileVar:write()
This function writes data to a file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
fileVar
:write(
data
)
fileVar
:write(
data1
,
data2
)
fileVar
:write(
data1
, ...,
datan
)
fileVar
The file descriptor variable
data
Write all data to the file
data1
The first data to write to the file
data2
The second data to write to the file
datan
The last data to write to the file
...
One or more entries (or values) separated by commas
Details
This function may buffer data until a flush (
fileVar
:flush()
or
io.flush()
) or close
(
fileVar
:close()
or
io.close()
) operation is performed.
Also see
(on page 7-89)
(on page 7-90)
(on page 7-107)
(on page 7-107)
(on page 7-109)
format.asciiprecision
This attribute sets the precision (number of digits) for all numbers returned in the ASCII format.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Attribute (RW)
No
Instrument reset
Recall setup
Not saved
6
Usage
precision
= format.asciiprecision
format.asciiprecision =
precision
precision
A number representing the number of digits to be printed for numbers printed with
the
print()
,
printbuffer()
, and
printnumber()
functions; must be a
number between
1
and
16
Details
This attribute specifies the precision (number of digits) for numeric data printed with the
print()
,
printbuffer()
, and
printnumber()
functions. The
format.asciiprecision
attribute is only
used with the ASCII format. The precision value must be a number from 0 to 16.