PROGRAM EXAMPLES
97
10 ' EXAMPLE PROGRAM USING BASIC AND THE COM1 SERIAL PORT
20 ' THIS PROGRAM ASSUMES THAT A TTL TRIGGER SOURCE IS CONNECTED TO THE TRIGGER IN-
PUT
30 '
40 OPEN "COM1:9600,n,8,2,CS,DS,CD" AS #1
50 '
60 WRT$="OUTP 0"
' DIRECT SR430 OUTPUT TO RS232 PORT
70 PRINT #1, WRT$
80 '
90 WRT$="BREC 1"
' SET RECORD LENGTH TO 1024 BINS
100 PRINT #1,WRT$
110'
120 WRT$="TRLV .5"
' SET TRIGGER LEVEL TO .5 V
130 PRINT #1,WRT$
140 '
150 WRT$="TRLV?"
' QUERY TRIGGER LEVEL
160 PRINT #1,WRT$
170 INPUT #1,TL
' INPUT TRIGGER LEVEL
180 PRINT "Trigger Level =";TL
' PRINT TRIGGER LEVEL
190 '
200 WRT$="CLRS"
' RESET DATA MEMORY
210 PRINT #1,WRT$
220 '
230 WRT$="SSCN"
' START SCAN WITH NEXT TRIGGER
240 PRINT #1,WRT$
250 '
260 WRT$="*STB?"
' READ SERIAL POLL STATUS BYTE
270 PRINT #1,WRT$
280 INPUT #1,SP%
290 IF SP% MOD 2 = 0 GOTO 270
' WHILE SCAN IS IN PROGRESS
300 '
310 FOR I=1 TO 1024 STEP 1
' READ 1024 DATA POINTS
320 PRINT #1,"BINA?";I-1
' USING BINA?
330 INPUT #1,BIN
340 PRINT I,BIN
350 NEXT I
360 '
400 STOP
IBM PC, IBM BASIC using the RS232 interface
In this example, the IBM PC serial port COM1: is used at 9600 baud. Configure the SR430 to 9600 baud, 8
bits, no parity before running the program.
To read the data record over the RS232 interface, the BINA? n command is used to read points individually.
Binary transfer is not supported over the RS232 interface, all data is transmitted in ASCII format.
Содержание SR430
Страница 2: ......
Страница 6: ...4 ...
Страница 22: ...20 Guide To Operation ...
Страница 26: ...24 Guide To Operation ...
Страница 36: ...34 Mode Menu ...
Страница 54: ...52 Save Menu ...
Страница 60: ...58 Recall Menu ...
Страница 70: ...68 Plot Menu ...
Страница 74: ...72 Test Menu ...
Страница 76: ...74 Info Menu ...
Страница 97: ...96 Remote Programming ...
Страница 99: ...98 98 Program Examples ...
Страница 107: ...106 106 Test and Calibration ...
Страница 113: ...112 112 Using Photomultiplier Tubes ...
Страница 125: ...124 124 124 Circuit Description ...