
2-29
Sample Programs
BASIC Programming Examples
320 ! BEGIN SUBPROGRAMS
330 !
340 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
350 !
360 !
370 ! Subprogram name: Initialize
380 ! Parameters: none
390 ! Return value: none
400 ! Description: This routine initializes the interface and the scope. The instrument
410 ! is reset to a known state and the interface is cleared. System headers
420 ! are turned off to allow faster throughput and immediate access to the
430 ! data values requested by the queries. The analyzer time base,
440 ! channel, and trigger subsystems are then configured. Finally, the
450 ! acquisition subsystem is initialized.
460 !
470 !
480 SUB Initialize
490 COM /Io/@Scope,@Path,Interface
500 COM /Variables/ REAL Xinc,Xref,Xorg,Yinc,Yref,Yorg
510 COM /Variables/ INTEGER Record_length
520 Interface=7
530 ASSIGN @Scope TO 707
540 RESET Interface
550 CLEAR @Scope
560 OUTPUT @Scope;"*RST"
570 OUTPUT @Scope;"*CLS"
580 OUTPUT @Scope;":SYSTem:HEADer OFF"
590 !Initialize Timebase: center reference, 2 ms full-scale (200 us/div), 20 us delay
600 OUTPUT @Scope;":TIMebase:REFerence CENTer;RANGe 2e-3;POSition 20e-6"
610 ! Initialize Channel1: 1.6V full-scale (200mv/div), -415mv offset
620 OUTPUT @Scope;":CHANnel1:RANGe 1.6;OFFSet -415e-3"
630 !Initialize Trigger: Edge trigger, channel1 source at -415mv
640 OUTPUT @Scope;":TRIGger:SOURce FPANel;SLOPe POSitive"
650 OUTPUT @Scope;":TRIGger:LEVel-0.415"
660 ! Initialize acquisition subsystem
665 ! Real time acquisition, Averaging off, memory depth 4096
670 OUTPUT @Scope;":ACQuire:AVERage OFF;POINts 4096"
680 Record_length=4096
690 SUBEND
700 !
710 !
720 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
730 !
740 !
750 ! Subprogram name: Acquire_data
760 ! Parameters: none
770 ! Return value: none
780 ! Description: This routine acquires data according to the current instrument
790 ! setting. It uses the root level :DIGitize command. This command
800 ! is recommended for acquisition of new data because it will initialize
810 ! the data buffers, acquire new data, and ensure that acquisition
820 ! criteria are met before acquisition of data is stopped. The captured
830 ! data is then available for measurements, storage, or transfer to a
840 ! PC. Note that the display is automatically turned off by the :DIGitize
850 ! command and must be turned on to view the captured data.
860 !
Содержание 86100A
Страница 18: ...1 14 Introduction Status Reporting Figure 1 4 Status Reporting Data Structures...
Страница 19: ...1 15 Introduction Status Reporting Status Reporting Data Structures continued...
Страница 94: ...2 40 Sample Programs BASIC Programming Examples...
Страница 124: ...4 16 Root Level Commands VIEW...
Страница 125: ...5 DATE 5 2 DSP 5 2 ERRor 5 3 HEADer 5 4 LONGform 5 5 MODE 5 6 SETup 5 7 TIME 5 7 System Commands...
Страница 132: ...5 8 System Commands TIME...
Страница 140: ...6 8 Acquire Commands SWAVeform RESet...
Страница 152: ...7 12 Calibration Commands STATus...
Страница 192: ...11 12 Display Commands SSAVer...
Страница 202: ...12 10 Function Commands VERTical RANGe...
Страница 203: ...13 AREA 13 2 DPRinter 13 2 FACTors 13 3 IMAGe 13 3 PRINters 13 4 Hardcopy Commands...
Страница 316: ...21 12 TDR TDT Commands Rev A 05 00 and Below STIMulus...
Страница 332: ......
Страница 353: ...26 DISPlay 26 2 LOAD 26 2 SAVE 26 3 XOFFset 26 3 XRANge 26 3 YOFFset 26 3 YRANge 26 4 Waveform Memory Commands...