Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 386

Multimètre

Publicité

7
BASIC Language for the 3458A
Variables and Arrays
The 3458AA employs two forms of numeric variables: simple variables (also called
"scalars") and subscripted arrays. Variable usage in the 3458AA is very similar to
variable usage in an enhanced BASIC language. The 3458AA does not provide
string variables. All variables are global among front panel, GPIB. and subprogram
operations. This means that you can dynamically change variable values.
Type declarations
The 3458AA uses two data types for its variables: Integer or Real. All variables are
real unless you declare them as integer. The valid range for real numbers is:
The smallest non-zero real value allowed is:
A real number can have a value of zero.
An integer can have any whole-number value from:
The DIM command declares real arrays. The INTEGER command declares integer
variables or arrays. The REAL command declares real variables or arrays.
The following program statement declares real array A with 10 elements
(numbered 0 through 9).
OUTPUT 722; "DIM A(9)"
The following program statement declares integer array IARRAY with 10 elements
(numbered 0 through 9) and integer variable B.
OUTPUT 722; "INTEGER IARRAY(9),B"
The following program statement declares real array RARRAY with 10 elements
(numbered 0 through 9) with real variable C.
OUTPUT 722; "REAL RARRAY(9), C"
The 3458AA declares variables automatically when a variable name appears in an
assignment statement with the LET command. For example, the following
statements automatically declare the variable names specified.
OUTPUT 722; "LET A=SIN(.223)"
386
–1.797 693 134 862 315 X 10
±2.225 073 858 507 202 X 10
–32767 through +32767
308
to 1.797 693 134 862 315 X 10
–308
Keysight 3458A User's Guide
308

Publicité

loading