Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 491

Multimètre

Publicité

First, the main program must be written to call the library subprograms. The main
program is a block of program code that controls and invokes the subprograms in
the order necessary to solve the measurement problem. The main program can be
short or long depending on the needs of the measurement task. Part of a main
program is shown in below. This program captures a wave form using the 3458A,
transfers the wave form to the computer, and plots the wave form on the
computer's CRT. It uses four Library subprograms: Setup_dig, the dmm setup
subprogram that determines the way you are going to digitize the wave form
(DCV, DSAC, DSDC, SSAC, SSDC), the time interval between samples, and the
number of samples (if you plan on using the FFT or IFT routines, the number of
samples must be a power of two); Wfdgtz, the wave form capture subprogram;
Wfmove, the transfer subprogram; and Wfplot, the plotting subprogram.
1280 CALL Setup_dig(1,1.e-5,1000)
1270 CALL Wfdgtz(1)
1280 CALL Wfmove("1","98",Scal(*),Wavf(*),Clip)
1290 CALL Wfplot(Scal(*),"Wave form 1",Wavf(*),1,1)
The subprogram is one of the most powerful elements available in any
programming language. Each subprogram has its own context or state as distinct
from the main program. This means that every subprogram has its own set of
variables and its own line labels.
Starter main program
Every program using the library subprogram requires a main program. Many of the
data arrays discussed in this part must be dimensioned in each main program.
Additionally, the COM statements used by many of the library subprograms are
needed in most main programs. Included with the Wave form Analysis Library is a
starter main program that can form the beginning of all main programs as shown
here.
10
20
30
40
50
60
70
80
90
100
Keysight 3458A User's Guide
! Main
! Core main program programming aid
!∗∗ COMMON
COM/Hp3458/@Recorder,Xist_plotter,Prt,Bus,Xist
!∗∗ Real Arrays
REAL Scal(0:4),Yamp(0:7)
∗∗
!
STRINGS
DIM Source$[50],Destin$[50],Titles$[30]
!∗∗ INTEGER ARRAYS
INTEGERWavf(1:16384),Redg(0:30),Fedg(0:30),Bandwf(0:163)
High Resolution Digitizing With the 3458A
E
491

Publicité

loading