Agilent Technologies 66309B Manuale Utente

Pagina di 190
       Example Programs - D
169
Pulse Measurements
The following programs illustrate how to make a pulse measurement over the GPIB. The measurement
function is set to ACDC, which gives the best results for current waveforms that have ac content. The
measurement incorporates 100 readings taken at time intervals of 20 microseconds, for a total
measurement time of 2 milliseconds. The trigger point for the pulse measurement occurs at 0.1 amperes
on the positive slope of the current pulse. The measurement offset is programmed so that 20
measurement points prior to the trigger are also returned as part of the measurement sample.
Because measurement triggers are initiated by the output pulse, a FETCh command is used to return the
measurement data. FETCh commands are also used to return the MAXimum, MINimum, HIGH, and
LOW values of the measurement. MEASure commands cannot be used to return data in this example
because they always acquire NEW measurement data each time they are used.
To produce the output pulses in this example, an electronic load must be connected and programmed to
generate 3-ampere pulses with a duty cycle of 100 microseconds at 1000 Hz. The dc source address is
705, and the load address is 706. If required, change these parameters in the appropriate statements.
Example 3. Current Pulse Measurement Using BASIC
10    !Rev A.00.00
20    OPTION BASE 1
30    DIM Curr_array(100)
40    !
50    ASSIGN @Ps TO 705
60    ASSIGN @Ld TO 706
80    OUTPUT @Ps;"*RST"                    ! Sets supply to default values
90    OUTPUT @Ps;"OUTP ON"                 ! Turn on power supply output
100   OUTPUT @Ps;"VOLT 5"                  ! Program power supply to 5 volts
110   !
120   OUTPUT @Ld;"CURR:LEVEL 0"            ! Set up electronic load to produce
pulses
130   OUTPUT @Ld;"CURR:TLEVEL 3"
140   !
150   OUTPUT @Ld;"TRAN:FREQ 1000"
160   OUTPUT @Ld;"TRAN:DCYCLE 10"
170   OUTPUT @Ld;"TRAN:MODE CONT"
180   OUTPUT @Ld;"TRAN:STATE ON"
190   !
200   OUTPUT @Ps;"SENS:CURR:DET ACDC"      ! Set meter to ACDC
210   OUTPUT @Ps;"SENS:CURR:RANG MAX"      ! High Current range
220   OUTPUT @Ps;"TRIG:ACQ:SOUR INT"       ! Set to trigger on pulse
230   OUTPUT @Ps;"SENS:FUNC ""CURR"""      ! Acquire current reading
240   OUTPUT @Ps;"TRIG:ACQ:LEV:CURR .1"    ! Trigger at 0.1 amps
250   OUTPUT @Ps;"TRIG:ACQ:SLOPE:CURR POS" ! Trigger on positive slope
260   OUTPUT @Ps;"TRIG:ACQ:HYST:CURR .05"  ! Set hysteresis of trigger
270   OUTPUT @Ps;"SENS:SWE:TINT 20E-6"     ! Set sample time interval to 20us
280   OUTPUT @Ps;"SENS:SWE:POIN 100"       ! Set number of measurement samples
in sweep
290   OUTPUT 705;"SENS:SWE:OFFS:POIN -20"  ! Number of sample points before
trigger
300   OUTPUT @Ps;"INIT:NAME ACQ"           ! Initiate the trigger system.
310   !                                      Controller now waits for trigger
to occur.
320   OUTPUT @Ps;"FETCH:ARRAY:CURR?"       ! Get the data after measurement
completes.
330   !
340   ENTER @Ps;Curr_array(*)              ! Enters all 100 data points
350   PRINT Curr_array(*)                  ! Print all data points