User manual

Series 3700 System Switch/Multimeter Reference Manual Section 13: Instrument Control Library (ICL)
3700S-901-01 Rev. C / July 2008 13-183
file:write()
Remarks
Any error encountered is logged to the error queue.
This command is not remotely accessible.
format attributes
Use the format attributes to configure the output formats used by the
printnumber() (on page 13-222) and printbuffer() (on page 13-221) functions.
These attributes can set the data format (ASCII or binary), ASCII precision
(number of digits), and binary byte order (normal or swapped).
format.asciiprecision
Attribute
The precision (number of digits) for all numbers printed with the ASCII format.
Usage
To read precision:
precision = format.asciiprecision
To write precision:
format.asciiprecision = precision
precision: Set from 1 to 16. Default value: 10.
Remarks
This attribute selects the precision (number of digits) for data printed with the print,
printnumber() (on page 13-222), and printbuffer() (on page 13-221) functions. The
precision attribute is only used with the ASCII format. The precision must be a
number between 1 and 16.
Note that the precision is the number of significant digits printed. There will always
be one digit to the left of the decimal point. Be sure to include this digit when
setting the precision.
The default and reset precision is 10.
Overflow readings (9.9E+37) may not appear as expected when ASCII precision is
set to 1 or 16 (the extreme values).
Also see
format.byteorder (on page 13-183)
format.data (on page 13-184)
printbuffer() (on page 13-221)
printnumber() (on page 13-222)
Example
Sets the ASCII precision to 7 digits and prints a number:
format.asciiprecision = 7
print(2.5)
Output: 2.500000E+00