
2-33
Sample Programs
BASIC Programming Examples
2550 !
2560 !
2570 ! Subprogram name: Store_csv
2580 ! Parameters: none
2590 ! Return value: none
2600 ! Description: This routine stores the time and voltage information about the waveform
2610 !
as time/voltage pairs in a comma-separated variable file format.
2620 !
2630 !
2640 SUB Store_csv
2650 COM /Io/@Scope,@Path,Interface
2660 COM /Converted_data/ REAL Time(4095),Volts(4095)
2670 COM /Variables/ REAL Xinc,Xref,Xorg,Yinc,Yref,Yorg
2680 COM /Variables/ INTEGER Record_length
2690 !Create a file to store pairs in
2700 ON ERROR GOTO Cont
2710 PURGE "Pairs.csv"
2720 Cont: OFF ERROR
2730 CREATE "Pairs.csv",Max_length
2740 ASSIGN @Path TO "Pairs.csv";FORMAT ON
2750 !Output data to file
2760 FOR I=0 TO Record_length-1
2770 OUTPUT @Path;Time(I),Volts(I)
2780 NEXT I
2790 SUBEND
2800 !
2810 !
2820 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2830 !
2840 !
2850 ! Subprogram name: Close
2860 ! Parameters: none
2870 ! Return value: none
2880 ! Description: This routine closes the IO paths.
2890 !
2900 !
2910 SUB Close
2920 COM /Io/@Scope,@Path,Interface
2930 !
2940 RESET Interface
2950 ASSIGN @Path TO *
2960 SUBEND
Service Request Example
File: srq.bas
10 !File: srq.bas
20 !
30 ! This program demonstrates how to set up and check Service Requests from
40 ! the scope. It assumes an interface select code of 7 with a scope at
50 ! address 7. It also assumes a signal is connected to the scope.
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: ......