EasyManuals Logo

Agilent Technologies Infiniium DCA User Manual

Agilent Technologies Infiniium DCA
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #84 background imageLoading...
Page #84 background image
2-30
Sample Programs
BASIC Programming Examples
870 !
880 SUB Acquire_data
890 COM /Io/@Scope,@Path,Interface
900 OUTPUT @Scope;":DIGitize CHANnel1"
910 OUTPUT @Scope;":CHANnel1:DISPlay ON"
920 SUBEND
930 !
940 !
950 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
960 !
970 !
980 ! Subprogram name: Auto_msmts
990 ! Parameters: none
1000 ! Return value: none
1010 ! Description: This routine performs automatic measurements of volts peak-to-peak
1020 ! and frequency on the acquired data. It also demonstrates two methods
1030 ! of error detection when using automatic measurements.
1040 !
1050 !
1060 SUB Auto_msmts
1070 COM /Io/@Scope,@Path,Interface
1080 REAL Period,Vpp
1090 DIM Vpp_str$[64]
1100 DIM Period_str$[64]
1110 Bytes_read=0
1120 !
1130 ! Error checking on automatic measurements can be done using one of two methods.
1140 ! The first method requires that you turn on results in the Measurement subsystem
1150 ! using the command ":MEASure:SEND ON". When this is on, the scope will return the
1160 ! measurement and a result indicator. The result flag is zero if the measurement
1170 ! was successfully completed, otherwise a non-zero value is returned which indicates
1180 ! why the measurement failed. See the Programmer's Manual for descriptions of result
1190 ! indicators. The second method simply requires that you check the return value of
1200 ! the measurement. Any measurement not made successfully will return with the value
1210 ! +9.999e37. This could indicate that either the measurement was unable to be
1220 ! performed or that insufficient waveform data was available to make the measurement.
1230 !
1240 ! METHOD ONE
1250 !
1260 OUTPUT @Scope;":MEASure:SEND ON" !turn on results
1270 OUTPUT @Scope;":MEASure:VPP? CHANnel1" !Query volts peak-to-peak
1280 ENTER @Scope;Vpp_str$
1290 Bytes_read=LEN(Vpp_str$) !Find length of string
1300 CLEAR SCREEN
1310 IF Vpp_str$[Bytes_read;1]="0" THEN !Check result value
1320 PRINT
1330 PRINT "VPP is ";VAL(Vpp_str$[1,Bytes_read-1])
1340 PRINT
1350 ELSE
1360 PRINT
1370 PRINT "Automated vpp measurement error with result ";Vpp_str$[Bytes_read;1]
1380 PRINT
1390 END IF
1400 !
1410 !
1420 OUTPUT @Scope;":MEASure:PERiod? CHANnel1" !Query frequency

Other manuals for Agilent Technologies Infiniium DCA

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies Infiniium DCA and is the answer not in the manual?

Agilent Technologies Infiniium DCA Specifications

General IconGeneral
BrandAgilent Technologies
ModelInfiniium DCA
CategoryTest Equipment
LanguageEnglish

Related product manuals