320 CLEAR @Isc !clear GPIB interfac e
330 OUTPUT @Scop e;":SELECT 2" !select the osci lloscope
340 OUTPUT @Scope;"*RST" !set oscilloscope to default config
350 OUTPUT @Scope;":AUTOSCALE" !AUTOSCALE
360 OUTPUT @Scop e;":SYST:HEA DER OFF" !turn header s off
370 CLEAR SCREEN !clear screen
380 RETURN
390 !
400 !DIGIT IZE waveform to acquire data and sto p oscillosco pe for furth er
410 !measurement. Measurement is NOT displayed on the front panel.
420 !
430 Get_wa veform:
440 OUTPUT @Scope;":WAVEFORM:SOURCE CHAN1" !set source to channel 1
450 OUTPUT @Scope;":DIGITIZE" !macro to acquire data & stop
460 RETURN
470 !
480 !have oscill oscope do a freque ncy measuremen t and read results into
490 !compu ter.
500 !
510 Measur e:
520 OUTPUT @Scope;":MEASURE:FREQUENCY?" !FREQUENCY query
530 ENTER @Scope ;Value !read from oscillosc ope
540 PRINT "FREQUENCY = ";Value;"Hz"
550 OUTPUT @Scope;":MEASURE:VPP?" !Vpp query
560 ENTER @Scope ;Value
570 PRINT "Vpp = ";Value;"V"
580 RETURN
590 END
Programming Examples
Using Sub-routines in a measurement program36–34