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 #86 background imageLoading...
Page #86 background image
2-32
Sample Programs
BASIC Programming Examples
1990 COM /Variables/ INTEGER Record_length
2000 ! define waveform data source and format
2010 OUTPUT @Scope;":WAVeform:SOURce CHANnel1"
2020 OUTPUT @Scope;":WAVeform:FORMat WORD"
2030 ! request values needed to convert raw data to real
2040 OUTPUT @Scope;":WAVeform:XINCrement?"
2050 ENTER @Scope;Xinc
2060 OUTPUT @Scope;":WAVeform:XORigin?"
2070 ENTER @Scope;Xorg
2080 OUTPUT @Scope;":WAVeform:XREFerence?"
2090 ENTER @Scope;Xref
2100 OUTPUT @Scope;":WAVeform:YINCrement?"
2110 ENTER @Scope;Yinc
2120 OUTPUT @Scope;":WAVeform:YORigin?"
2130 ENTER @Scope;Yorg
2140 OUTPUT @Scope;":WAVeform:YREFerence?"
2150 ENTER @Scope;Yref
2160 !
2170 ! request data
2180 OUTPUT @Scope;":WAVeform:DATA?"
2190 ENTER @Scope USING "#,1A";First_chr$ !ignore leading #
2200 ENTER @Scope USING "#,1D";Header_length !input number of bytes in header value
2210 ENTER @Scope USING "#,"&VAL$(Header_length)&"D";Record_length !Record length in bytes
2220 Record_length=Record_length/2 !Record length in words
2230 ENTER @Scope USING "#,W";Data(*)
2240 ENTER @Scope USING "#,A";Term$ !Enter terminating character
2250 !
2260 SUBEND
2270 !
2280 !
2290 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2300 !
2310 !
2320 ! Subprogram name: Convert_data
2330 ! Parameters: none
2340 ! Return value: none
2350 ! Description: This routine converts the waveform data to time/voltage information
2360 ! using the values Xinc, Xref, Xorg, Yinc, Yref, and Yorg used to describe
2370 ! the raw waveform data.
2380 !
2390 !
2400 SUB Convert_data
2410 COM /Io/@Scope,@Path,Interface
2420 COM /Raw_data/ INTEGER Data(4095)
2430 COM /Converted_data/ REAL Time(4095),Volts(4095)
2440 COM /Variables/ REAL Xinc,Xref,Xorg,Yinc,Yref,Yorg
2450 COM /Variables/ INTEGER Record_length
2460 !
2470 FOR I=0 TO Record_length-1
2480 Time(I)=(((I)-Xref)*Xinc)+Xorg
2490 Volts(I)=((Data(I)-Yref)*Yinc)+Yorg
2500 NEXT I
2510 SUBEND
2520 !
2530 !
2540 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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