Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 398

Multimètre

Publicité

7
BASIC Language for the 3458A
Writing and Loading Subprograms
The subprogram example programs in this section illustrate relatively simple
3458AA operations which you can copy and use in more complex mainline
programs of your own design. This section also shows how to create and edit
subprograms.
PROGRAMMING HINT
NOTE
You should execute the SCRATCH command and download the subprograms
from your system controller at the beginning of your test system program. This
helps memory management for the 3458AA and ensures that the subprograms
are downloaded and ready when they are needed.
Executing the SUB command instructs the 3458AA to store all subsequent
commands, until the SUBEND command, in the specified subprogram.
Subprogram 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 ("?"). Subprogram
names must not be the same as 3458AA commands or parameters, previously
defined array or variable names, or stored state names.
The following program shows how to create a simple subprogram which
configures the multimeter to make three dc voltage measurements.
10 OUTPUT 722; "SUB DMM_CONF"
20 OUTPUT 722; "DCV8,0.00125"
30 OUTPUT 722; "NRDGS 3"
40 OUTPUT 722; "TRIG SGL"
50 OUTPUT 722; "SUBEND"
60 END
The two statements SUB DMM_CONF and SUBEND along with the three
commands on line 20, 30, and 40 form the subprogram named DMM_CONF.
When a subprogram is entered, the 3458AA checks for syntax errors just like any
other commands. If the syntax is not correct, an error is generated and the
command is not stored in the subprogram. You must then edit your subprogram in
the system controller and download it again. The 3458AA stores the subprogram
in non-volatile memory. You can then execute the subprogram from either the
front-panel keyboard or the system controller. The subprogram will not be stored
398
Keysight 3458A User's Guide

Publicité

loading