Agilent Technologies 86100-90086 Sprinkler User Manual


 
2-40
Sample Programs
Listings of the Sample Programs
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 !
870 !
880 SUB Acquire_data
890 COM /Io/@Scope,@Path,Interface
900 OUTPUT @Scope;":DIGitize CHANnel1"
910 OUTPUT @Scope;":CHANnel1:DISPlay ON"
920 SUBEND
930 !
940 !
950 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
960 !
970 !
980 ! Subprogram name: Auto_msmts
990 ! Parameters: none
1000 ! Return value: none
1010 ! Description: This routine performs automatic measurements of volts peak-to-peak
1020 ! and frequency on the acquired data. It also demonstrates two methods
1030 ! of error detection when using automatic measurements.
1040 !
1050 !
1060 SUB Auto_msmts
1070 COM /Io/@Scope,@Path,Interface
1080 REAL Period,Vpp
1090 DIM Vpp_str$[64]
1100 DIM Period_str$[64]
1110 Bytes_read=0
1120 !
1130 ! Error checking on automatic measurements can be done using one of two methods.
1140 ! The first method requires that you turn on results in the Measurement subsystem
1150 ! using the command ":MEASure:SEND ON". When this is on, the scope will return the
1160 ! measurement and a result indicator. The result flag is zero if the measurement
1170 ! was successfully completed, otherwise a non-zero value is returned which indicates