Using measure? for a single measurement – Agilent Technologies 34401A User Manual

Page 191

Advertising
background image

Using MEASure? for a Single Measurement

The following example uses the

MEASure?

command to make a single

ac current measurement. This is the easiest way to program the
multimeter for measurements. However,

MEASure?

does not offer much

flexibility. The example is shown in BASIC and QuickBASIC.

10 REAL Rdg

20 ASSIGN @Dmm TO 722

30 CLEAR 7

! Clear GPIB and dmm

40 OUTPUT @Dmm; "*RST"

! Reset dmm

50 OUTPUT @Dmm; "*CLS"

! Clear dmm status registers

60 OUTPUT @Dmm; "MEASURE:CURRENT:AC? 1A,0.001MA" ! Set to 1 amp ac range

70 ENTER @Dmm; Rdg

80 PRINT Rdg

90 END

GPIB Operation Using BASIC

REM $Include "QBSetup"

DEV&=722

INFO1$="*RST"

LENGTH1%=LEN(INFO1$)

INFO2$="*CLS"

LENGTH2%=LEN(INFO2$)

INFO3$="MEASURE:CURRENT:AC? 1A,0.001MA"

LENGTH3%=LEN(INFO3$)

Call IOCLEAR(DEV&)

Call IOOUTPUTS(DEV&, INFO1$, LENGTH1%)

Call IOOUTPUTS(DEV&, INFO2$, LENGTH2%)

Call IOOUTPUTS(DEV&, INFO3$, LENGTH3%)

Call IOENTER(DEV&,Rdg)

Print Rdg

END

GPIB Operation Using QuickBASIC

6

Chapter 6 Application Programs
Using MEASure? for a Single Measurement

185

Advertising