Agilent Technologies 3458A Guia do Utilizador Página 268

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 374
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 267
268 Chapter 7 BASIC Language for the 3458A
OUTPUT 722; "LET TIME_INT =40*3E-3"
Variables can replace numeric parameters in any 3458A command that uses
numeric parameters. Two examples uses are (1) numeric data storage and (2)
numeric calculations. The following sections discuss these two uses.
Variables for Data
Storage
At power-on, numeric output data generated by the 3458A is placed into the
GPIB output buffer where it can be sent to the system controller. However,
for some applications you may want to store the output data directly into the
multimeter's internal memory. The ENTER command takes one reading out
of reading memory (destructively) and places the value in the specified
variable or array location.
The following program uses the ENTER command within a 3458A
subroutine to store readings.
10 OUTPUT 722; "SUB DMM_CONF"
20 OUTPUT 722; "NRDGS 100"
30 OUTPUT 722; "TRIG SGL"
40 OUTPUT 722; "INTEGER I"
50 OUTPUT 722; "FOR I = 1 TO 100"
60 OUTPUT 722; " ENTER A[I]"
70 OUTPUT 722; "NEXT I"
80 OUTPUT 722; "SUBEND"
90 !
100 OUTPUT 722; "CALL DMM_CONF"
110 END
Numeric Calculations Any variables, whether simple or array, can be used in numeric calculations.
Several math functions are available in the 3458A command set to allow you
to manipulate data. The 3458A'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 PRlNT A$ !Print result
60 END
Arrays You can allocate memory space in the 3458A 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
Vista de página 267
1 2 ... 263 264 265 266 267 268 269 270 271 272 273 ... 373 374

Comentários a estes Manuais

Sem comentários