Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 388

Multimètre

Publicité

7
BASIC Language for the 3458A
Using variables
Simple variable and array names may contain up to 10 characters. The first
character must be a letter (A–Z) but the remaining nine characters can be letters,
numbers (0–9), the underscore character ("_"), or the question mark ("?"). Upper
case is the same as lower case. Variable names must not be the same as 3458AA
commands, parameters, or stored state names.
You can assign any numeric variable with the LET command (the keyword "LET" is
required). For example, the following statements are equivalent.
OUTPUT 722; "LET TIME_INT = 120E-3"
OUTPUT 722; "LET TIME_INT =40*3E-3"
Variables can replace numeric parameters in any 3458AA 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 3458AA 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 3458AA 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
388
Keysight 3458A User's Guide

Publicité

loading