Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 389

Multimètre

Publicité

BASIC Language for the 3458A
7
Numeric calculations
Any variables, whether simple or array, can be used in numeric calculations.
Several math functions are available in the 3458AA command set to allow you to
manipulate data. The 3458AA's math functions are described in more detail later
in this supplement.
Reading multimeter values
The OUTPUT command returns the value of a specified variable. An example is
included below to illustrate the use of the OUTPUT command.
10 DIM A$[50]!Dimension controller variable
20 OUTPUT 722; "LET VAL=COS(.5235)!Compute value
30 OUTPUT 722; "OUTPUT VAL"!Read result into variable
40 ENTER 722: A$!Enter result
50 PRINT A$!Print result
60 END
Arrays
You can allocate memory space in the 3458AA for one-dimensional arrays. For
real arrays, use either the DIM name(size) or REAL name(size) commands to
define the array. For integer arrays, use the INTEGER name(size) command. All
arrays have a lower bound of zero (option base 0). Arrays do not have a default
size. For example, to create a 10-element array, specify a size of 9 as shown
below.
OUTPUT 722; "DIM TESTER(9)"
Array names are subject to the same rules as numeric variable names. To specify a
particular array element, you must specify the subscript enclosed in parentheses.
The range of subscripts is an integer from 0 through 999, but the maximum array
size is determined by available 3458AA memory (approximately 10 kbytes if no
stored states or subprograms are stored). A non-integer subscript is rounded to
the nearest integer.
Arrays may be resized by re-declaring them. This initializes each element in the
array to a value of zero. You cannot, however, redefine the type of array (real or
integer) without scratching memory first (refer to the SCRATCH command in
chapter 6). Array elements may be used in the same ways simple variables are
used.
Keysight 3458A User's Guide
389

Publicité

loading