2-44
Sample Programs
Listings of the Sample Programs
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
srq.bas Sample Program
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.
60 !
70 !
80 COM /Io/@Scope,Interface
90 COM /Variables/Temp
100 CALL Initialize
110 CALL Setup_srq
120 ON INTR Interface CALL Srq_handler !Set up routine to handle interrupt
130 ENABLE INTR Interface;2 !Enable SRQ Interrupt for Interface
140 CALL Create_srq
150 CALL Close
160 END
170 !
180 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
190 !
200 ! BEGIN SUBPROGRAMS
210 !
220 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
230 !
240 !
250 ! Subprogram name: Initialize
260 ! Parameters: none
270 ! Return value: none
280 ! Description: This routine initializes the interface and the scope.
290 ! The instrument is reset to a known state and the interface is
300 ! cleared. System headers are turned off to allow faster throughput
310 ! and immediate access to the data values requested by the queries.
320 !
330 !
340 SUB Initialize
350 COM /Io/@Scope,Interface
360 ASSIGN @Scope TO 707
370 Interface=7
380 RESET Interface