Models 707B and 708B Switching Matrix Reference Manual
Section 7: TSP command reference
707B-901-01 Rev. B / January 2015
7-89
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
Create configuration script 10
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.
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.5400000
2.54e+00
Also see
(on page 7-89)
(on page 7-90)
(on page 7-131)
(on page 7-132)
(on page 7-134)
format.byteorder
This attribute sets the binary byte order for the data that is printed using the
printnumber()
and
printbuffer()
functions.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Attribute (RW)
Yes
Instrument reset
Recall setup
Create configuration script
Save setup
format.LITTLEENDIAN