Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 404

Multimètre

Publicité

7
BASIC Language for the 3458A
10 OUTPUT 722; "SUB DMM_CONF"
20 OUTPUT 722; "DCV 8, 0.00125"
30 OUTPUT 722; "TRIG SGL"
40 OUTPUT 722; "ENTER A'
60 OUTPUT 722; "IF A<5.06 THEN; RETURN"
70 OUTPUT 722; "ELSE"
80 OUTPUT 722; "TRIG SGL"
90 OUTPUT 722; "ENDIF"
100 OUTPUT 722; "SUBEND"
110 !
120 OUTPUT 722; "CALL DMM_CONF"
130 END
Nesting Subprograms
One subprogram may call a second (nested) subprogram for execution before the
first subprogram finishes execution. When the second subprogram executes the
SUBEND command, the first subprogram continues with the next command
following the embedded CALL command.
The 3458AA has two requirements for nesting subprograms. First, the subprogram
called from within another subprogram must be stored in internal memory before
the subprogram doing the calling is stored. This is because the 3458AA checks
the syntax of each command as it stores the subprogram. When it encounters an
embedded CALL command, the 3458AA checks to see if a subprogram by that
name exists in memory. If not, it generates an error. Second, subprograms may
not be nested more than 10 levels deep. You cannot place one subprogram inside
of another subprogram. For example, the following program will generate an
error.
10 OUTPUT 722; "SUB DMM_CONF"
20 OUTPUT 722;"DCV8,0.00125"
30 OUTPUT 722; "SUB TESTER" !This results in an error
40 OUTPUT 722; "SUBEND"
50 !
60 OUTPUT 722; "CALL DMM_CONF"
70 END
404
Keysight 3458A User's Guide

Publicité

loading