SRS Labs SR510 Stereo Amplifier User Manual


 
47
Program Example 4:
IBM PC,Microsoft Basic,
via GPIB
This program requires the Capital Equipment
Corporation GPIB card for the IBM PC or XT. It
has firmware in ROM to interface high level
languages to the GPIB.
Subroutine calls in Microsoft BASIC are done to
memory locations specified by the name of the
subroutine. The address is relative to the segment
address specified by the DEF SEG statement
preceding CALL.
In this program, the CEC card's ROM starts at
OC0000H, the system controller's address is 21,
and the SR530 has been assigned as GPIB
address 23.
To monitor the GPIB activity with an RS232
terminal, SW1-6 should be down, and the ASCII
terminal should be attached to the rear panel
RS232 connector.
10 EXAMPLE PROGRAM TO READ THE SR510 OUTPUT AND RAMP THE X6 ANALOG OUTPUT
20 USING IBM PC BASICA AND THE CAPITAL EQUIPMENT CORP. GPIB INTERFACE CARD
30
40
50 ON THE SR510 REAR PANEL, SET SWITCHES #4 AND #6 ON SW1 TO DOWN (DEVICE
60 ADDRESS = 23, RS232 ECHO ON) AND SWITCH # 1 ON SW2 TO DOWN (RS232 BAUD
70 RATE = 9600). ALL OTHER SWITCHES SHOULD BE UP.
80 NOTE THAT THE RS232 ECHO IS FOR DEBUGGING AND DEMOSTRATION PURPOSES,
90 UNDER NORMAL CONDITIONING, SWITCH # 6 OF SW1 SHOULD BE UP SINCE THE RS232
100 ECHO SLOWS DOWN THE GPIB INTERFACE.
110
120 DEF SEG = &HC000 BASE ADDRESS OF CEC CARD
130 INIT=0: TRANSMIT=3: RECV=6: ADDRESSES OF CEC FIRM WARE ROUTINES
140 ADDR%=21: SYS%=0 CONTROLLER ADDRESS
150 INZ$ = IFC UNT UNL MTA LISTEN 23 DATA Z 13
160
170 Q$ = IFC MTA LISTEN 23 DATA Q 13
180 X6$ = IFC MTA LISTEN 23 DATA X6,
190 LISN$ = IFC UNT UNL MLA TALK 23
200
210
220 CALL INIT(ADDR%,SYS%) INIT X6 OUTPUT TO ZERO
230 CALL TRANSMIT(INZ$,STATUS%) RESET SR510
240 GOSUB 540 CHECK TRANSMIT STATUS
250
260 X = 0 INIT X6 OUTPUT TO ZERO
270
280 CALL TRANSMIT(Q$,STATUS%) READ OUTPUT
290 GOSUB 540
300 GOSUB 450 GET RESULT
310 V1 = VAL(ANS$) INTO V1
320
330
340 PRINT OUTPUT = ;V1
350
360 X = X + .0025 INCREMENT X6 OUTPUT BY 2.5 MV
370 IF X>10 THEN X 0 RESET RAMP
380 X$ = X6$ + STR$(X) + ″′ 13″′MAKE X6 COMMAND STRING