Agilent Technologies 86100-90086 Sprinkler User Manual


 
2-39
Sample Programs
Listings of the Sample Programs
70 ! PC as time/voltage pairs in a comma-separated file format useful for spreadsheet
80 ! applications. It assumes an interface card at interface select code 7, an
90 ! Agilent 86100 scope at address 7, and the Agilent 86100 cal signal connected to Channel 1.
100 !
110 !
120 !
130 COM /Io/@Scope,@Path,Interface
140 COM /Raw_data/ INTEGER Data(4095)
150 COM /Converted_data/ REAL Time(4095),Volts(4095)
160 COM /Variables/ REAL Xinc,Xref,Xorg,Yinc,Yref,Yorg
170 COM /Variables/ INTEGER Record_length
180 !
190 !
200 CALL Initialize
210 CALL Acquire_data
220 CALL Auto_msmts
230 CALL Transfer_data
240 CALL Convert_data
250 CALL Store_csv
260 CALL Close
270 END
280 !
290 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
300 !
310 !
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"