
2-35
Sample Programs
BASIC Programming Examples
620 !
630 ! Enable Standard Event Status Enable Register:
640 ! enable bit 4 - Command Error - value 32
650 ! bit 1 - Query Error - value 4
660 OUTPUT @Scope;"*ESE 36"
670 SUBEND
680 !
690 !
700 !
710 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
720 !
730 !
740 ! Subprogram name: Create_srq
750 ! Parameters: none
760 ! Return value: none
770 ! Description: This routine will send an illegal command to the scope to
780 ! show how to detect and handle an SRQ. A query is sent to
790 ! the scope which is then followed by another command causing
800 ! a query interrupt error. An illegal command header is then
810 ! sent to demonstrate how to handle multiple errors in the error queue.
820 !
830 !
840 !
850 SUB Create_srq
860 COM /Io/@Scope,Interface
870 DIM Buf$[256]
880 OUTPUT @Scope;":CHANnel2:DISPlay?"
890 OUTPUT @Scope;":CHANnel2:DISPlay OFF" !send query interrupt
900 OUTPUT @Scope;":CHANnel:DISPlay OFF" !send illegal header
910 ! Do some stuff to allow time for SRQ to be recognized
920 !
930 OUTPUT @Scope;"*IDN?" !Request IDN to verify communication
940 ENTER @Scope;Buf$ !NOTE: There is a leading zero to this query response
950 PRINT !which represents the response to the interrupted query above
960 PRINT Buf$
970 PRINT
980 SUBEND
990 !
1000 !
1010 !
1020 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1030 !
1040 !
1050 ! Subprogram name: Srq_handler
1060 ! Parameters: none
1070 ! Return value: none
1080 ! Description: This routine verifies the status of the SRQ line. It then checks
1090 ! the status byte of the scope to determine if the scope caused the
1100 ! SRQ. Note that using a SPOLL to read the status byte of the scope
1110 ! clears the SRQ and allows another to be generated. The error queue
1120 ! is read until all errors have been cleared. All event registers and
1130 ! queues, except the output queue, are cleared before control is returned
1140 ! to the main program.
1150 !
1160 !
1170 !
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: ......