Stanford Research Systems DS360 Operating Manual And Programming Reference page 83

Ultra low distortion function generator
Table of Contents

Advertisement

Example 2: RS232 communication in BASIC language
BASIC program to demonstrate communication with the DS360 via RS232.
Program assumes the DS360 BAUD rate is set to 9600.
10 OPEN "com2:9600,n,8,2,cs,ds,cd" FOR RANDOM AS #1 ' Setup com2'
20 PRINT #1, "
30 PRINT #1, "*RST"
40 GOSUB 190
50 PRINT #1, "FREQ123456"
60 GOSUB 190
70 PRINT #1, "*RST"
80 FOR I=0 TO 4
90 PRINT #1, "FUNC",I
100 GOSUB 190
110 NEXT I
120 PRINT #1, "*RST"
130 PRINT #1, "AMPL0VP"
140 FOR I=-5 TO 5
150 PRINT #1, "OFFS",I
160 GOSUB 190
170 NEXT I
180 END
190 PRINT #1, "FREQ?"
200 INPUT #1, F
210 PRINT #1, "AMPL?VP"
220 INPUT #1, A
230 PRINT #1, "OFFS?"
240 INPUT #1, O
250 PRINT "Freq="
260 RETURN
"
' Routine to query the DS360 frequency,'
' amplitude and offset and display them'
;F; "
Remote Programming 4-25
' Reset the DS360'
' Query DS360 and display result'
' Set new frequency to 123.456kHz'
' Query DS360 and display result'
' Reset the DS360'
' Step through all functions '
' Query DS360 and display result'
' Reset the DS360'
' Set amplitude to 0 volts'
' Set offset from -5V to 5v'
' and query each time'
' Query DS360 and display result'
Ampl="; A; "
DS360 Ultra Low Distortion Function Generator
Offs="; O

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents