EasyManuals Logo

Tektronix Keithley SourceMeter 2470 Reference Manual

Tektronix Keithley SourceMeter 2470
995 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #722 background imageLoading...
Page #722 background image
Section
14: TSP command reference 2470 High Voltage SourceMeter Instrument
Reference Manual
14-82 2470-901-01 Rev. A / May 2019
Example
file_num = file.open("testfile.txt",
file.MODE_WRITE)
if file_num != nil then
file.write(file_num, "This is my test file")
file.close(file_num)
end
Opens file testfile.txt for writing. If no
errors were found while opening, writes
This
is my test file and closes the file.
Also see
file.close() (on page 14-76)
file.flush() (on page 14-77)
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
Restore configuration
Instrument reset
Power cycle
Configuration script
0 (Automatic)
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
from 1 to 16; set to 0 to have the instrument select the precision automatically based
on the number that is being formatted
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.
Note that the precision is the number of significant digits printed. There is always one digit to the left
of the decimal point; be sure to include this digit when setting the precision.
Example
format.asciiprecision = 10
x = 2.54
printnumber(x)
format.asciiprecision = 3
printnumber(x)
Output:
2.540000000e+00
2.54e+00
Also see
format.byteorder (on page 14-83)
format.data (on page 14-84)
print() (on page 14-99)
printbuffer() (on page 14-100)
printnumber() (on page 14-103)

Table of Contents

Other manuals for Tektronix Keithley SourceMeter 2470

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix Keithley SourceMeter 2470 and is the answer not in the manual?

Tektronix Keithley SourceMeter 2470 Specifications

General IconGeneral
BrandTektronix
ModelKeithley SourceMeter 2470
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals