. . . continued
’
’ Calculate data points
’
PRINT "Calculating Data Points..."
pi = 3.1415
FOR I = 1 TO npnts
waveform(I) = EXP(DAMPFACTOR * I / npnts) * SIN(2 * pi * NCYCLES * I / npnts)
NEXT I
’
’ Download data points to volatile memory
’
PRINT "Downloading Arb..."
PRINT #1, "DATA VOLATILE,";
FOR I = 1 TO npnts - 1
PRINT #1, STR$(waveform(I)) + ",";
NEXT I
PRINT #1, STR$(waveform(npnts))
’
PRINT #1, "*OPC?" ’ Wait for download to complete
LINE INPUT #1, resp$
PRINT "Download Complete"
PRINT #1, "DATA:COPY DAMP_SIN, VOLATILE" ’ Copy to non-volatile memory
PRINT #1, "FUNC:USER DAMP_SIN" ’ Select the active arb
PRINT #1, "FUNC:SHAP USER" ’ Output the selected arb
PRINT #1, "*OPC?" LINE INPUT #1, resp$
PRINT "Program Complete"
END
End of Program 5
6
Chapter 6 Application Programs
Downloading an Arbitrary Waveform over RS-232
269