EasyManua.ls Logo

Stanford Research Systems PS310 - Program Examples

Stanford Research Systems PS310
42 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
17
PROGRAM EXAMPLES
This section lists example programs which use the GPIB port to control the PS300. All of the programs do the
same thing, only the language is different. The programs set up the PS300 to ramp the output voltage from 0 to
1000 Volts while reading the output current.
Program Example 1:
IBM PC, Microsoft BASIC, Via GPIB
This program requires the Capital Equipment Corporation GPIB card for the IBM PC. 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 the CALL.
In this program, the CEC card's ROM starts at C000H, the system controller's address is 21, and the PS300 is at
GPIB address 23. Make sure the address in the unit is set correctly and that the HIGH VOLTAGE ENABLE
switch is not OFF.
10 'EXAMPLE PROGRAM TO RAMP THE PS300 HV OUTPUT AND READ THE CURRENT
20 'USING IBM PC BASIC AND THE CAPITAL EQUIPMENT CORP.
30 'GPIB INTERFACE CARD
40 '
50 '
60 'SET THE PS300 GPIB ADDR=23
70 '
80 DEF SEG = &HC000 'BASE ADDRESS OF CEC CARD
90 INIT=0: TRANSMIT=3: SEND=9: ENTER=21 'ADDRESSES OF CEC FIRMWARE ROUTINES
100 ADDR%=21: SYS%=0 'CONTROLLER ADDRESS
110 PS300%=23 'PS300 ADDRESS
120 '
130 'STRING DEFINITIONS
140 IN$="IFC UNT UNL REN MTA LISTEN 23 SDC" 'CLEAR PS300
150 HV$="HVON" 'HV ENABLE
160 CR$="*RST" 'RESET PS300
170 IR$="IOUT?" 'READ CURRENT
180 VS$="VSET" 'SET HV OUTPUT LEVEL
190 '
200 '
210 CALL INIT(ADDR%,SYS%) 'INIT CEC CARD
220 CALL TRANSMIT(IN$,STATUS%): GOSUB 480 'CLEAR INTERFACE
230 CALL TRANSMIT(CR$,STATUS%):GOSUB 480 'RESET PS300
240 '
250 X=0 'INITIAL VOLTAGE=0
260 '
270 CALL SEND(PS300%,HV$,STATUS%): GOSUB 480 'ENABLE HV
280 '
290 X = X+10 'INCREMENT OUTPUT BY 10V
300 PRINT "VOLTAGE = "; X;
310 P$=VS$ + STR$(X) 'MAKE VSET COMMAND STRING
320 CALL SEND(PS300%,P$,STATUS%):GOSUB 480

Table of Contents

Related product manuals