Chapter 4 169
Downloading and Using Files
Downloading ARB Waveform Data
110 PRINT "Data generated "
120 Nbytes=4*Num_points
130 ASSIGN @Psg TO 719;FORMAT ON
140 ASSIGN @Psgb TO 719;FORMAT OFF
150 Nbytes$=VAL$(Nbytes)
160 Ndigits=LEN(Nbytes$)
170 Ndigits$=VAL$(Ndigits)
180 WAIT 1
190 OUTPUT @Psg USING "#,K";"MMEM:DATA ""WFM1:data_file"",#"
200 OUTPUT @Psg USING "#,K";Ndigits$
210 OUTPUT @Psg USING "#,K";Nbytes$
220 WAIT 1
230 OUTPUT @Psgb;Int_array(*)
240 WAIT 2
241 OUTPUT @Psg;END
250 ASSIGN @Psg TO *
260 ASSIGN @Psgb TO *
270 PRINT
280 PRINT "*END*"
290 END
Program Comments
10: Program file name
20: Sets the number of points in the waveform.
30: Allocates integer data array for I and Q waveform points.
40: Sets HP BASIC to use degrees for cosine and sine functions.
50: Sets up first loop for I waveform points.
60: Calculate and interleave I waveform points.
70: End of loop
80 Sets up second loop for Q waveform points.
90: Calculate and interleave Q waveform points.
100: End of loop.
120: Calculates number of bytes in I/Q waveform.