
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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Summary of Contents for 86100A
Page 18: ...1 14 Introduction Status Reporting Figure 1 4 Status Reporting Data Structures...
Page 19: ...1 15 Introduction Status Reporting Status Reporting Data Structures continued...
Page 94: ...2 40 Sample Programs BASIC Programming Examples...
Page 124: ...4 16 Root Level Commands VIEW...
Page 132: ...5 8 System Commands TIME...
Page 140: ...6 8 Acquire Commands SWAVeform RESet...
Page 152: ...7 12 Calibration Commands STATus...
Page 192: ...11 12 Display Commands SSAVer...
Page 202: ...12 10 Function Commands VERTical RANGe...
Page 203: ...13 AREA 13 2 DPRinter 13 2 FACTors 13 3 IMAGe 13 3 PRINters 13 4 Hardcopy Commands...
Page 316: ...21 12 TDR TDT Commands Rev A 05 00 and Below STIMulus...
Page 332: ......