REMOTE PROGRAMMING
4-21
EXAMPLE PROGRAM 4
IBM PC, IBM BASIC using the RS232 interface
In this example, the IBM PC serial port COM1: is used at 9600 baud. Configure the SR715/720 to 9600 baud,
8 bits, no parity before running the program. The RS232 configuration is set using switch SW1 on the rear
panel.
10 ' Sample program to trigger a measurement and read the results from the LCR
20 '
30 'Open com1 port for 9600 baud, 8 bits, no parity, no handshaking
40 OPEN "com1:9600,n,8,2,cs,ds,cd" AS #1
50 PRINT #1," " 'clear out com port
60 '
70 ' reset LCR, set to triggered mode, read C and R, brief ascii data
80 PRINT #1,"*RST;MMOD1;PMOD4;OUTF1"
90 '
100 PRINT "Resistance (ohms) Capacitance (uF)"
110 PRINT #1,"STRT;*WAI" 'take a reading, wait til finished before proceeding
120 PRINT #1,"XMAJ?" 'capacitance
130 INPUT #1,VAL1$
140 PRINT #1,"XMIN?" 'resistance
150 INPUT #1,VAL2$
160 PRINT " "VAL2$" "VAL1$
170 END