Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 387

Multimètre

Publicité

OUTPUT 722; "LET B=3.14159"
Some 3458AA commands expect a specific variable type when defining variables
for parameters. For example, the TIME command expects a real number. Similarly,
commands which return numeric results will return specific number types. The
LINE? command returns an integer number. Measurements returned are real
numbers. All variables are REAL unless otherwise specified.
PROGRAMMING HINT
NOTE
Once you declare an array type, you cannot re-declare it as a different type
without scratching memory first (see the SCRATCH command in chapter 6). If
you refer to a real number within a command that expects an integer, the
3458AA converts the real number to an integer. Likewise, if you refer to an
integer number within a command that expects a real number, the 3458AA
converts the integer number to a real number. Therefore, you can minimize
system overhead time by allocating variables according to their use. For
example,
OUTPUT 722; "REAL TIME_INT; LET TIME_INT=2.25; TIMER TIME_INT"
Type conversions
The 3458AA automatically converts between real and integer values whenever
necessary. When real numbers are converted to integer representations,
information may be lost. Two potential problem areas exist in this conversion,
rounding errors and range errors.
– When a real number is converted to an integer, the real value is rounded to the
– Range errors exist when converting real values to integer values. While real
Keysight 3458A User's Guide
closest integer value. All information to the right of the decimal point is lost.
values range from approximately –10
from –32768 to +32767 (approximately –10
numbers can be rounded to an equivalent integer value. This problem can
generate "Integer Overflow" error.
BASIC Language for the 3458A
308
308
to +10
,the integer range is only
4
4
to +10
). Therefore, not all real
7
387

Publicité

loading