User`s manual

Visual BASIC and
Visual C/C++ Program
Versions
The Visual BASIC example program, SIN_D.FRM, is in directory
“VBPROG” and the Visual C example program, SIN_D.C, is in directory
“VCPROG” on the CD that came with your Agilent E1445A.
Generating an
Exponential
Charge/Discharge
Waveform
The CHARGE program generates an Exponential Charge/Discharge
waveform with 4096 segments or points.
BASIC Program Example (CHARGE)
This program is similar to the “SIN_X” BASIC program on page 105, with
the following differences:
1 !RE-STORE “CHARGE”
2 !This program generates an exponential charge/discharge waveform
3 !as an arbitrary waveform.
180 !Call the subprogram which defines the exponential charge/
190 !discharge waveform and output sequence.
200 CALL Charge_def
210 !Select the output sequence and start the waveform.
220 OUTPUT @Afg;"SOUR:FUNC:USER CHARGE_OUT"
230 OUTPUT @Afg;"INIT:IMM"
280 SUB Charge_def
290 Charge_def:!Compute waveform (exponential) and define segment and
300 !sequence.
310 COM @Afg
320 DIM Waveform(1:4096)
330 Rc=400
340 FOR T=1 TO 4096
350 IF T>=0 AND T<2047 THEN
360 Waveform(T)=1*(1-EXP(-T/Rc))
370 END IF
Continued on Next Page
108 Generating Arbitrary Waveforms Chapter 3