
Programming Guide 3-9
ESG Family Signal Generators Remote Data Transfer
ARB Waveform Data Downloads
In the Output commands, USING “#,K” formats the data. The pound symbol (#) suppresses
the automatic EOL (End of Line) output. This allows multiple output commands to be
concatenated as if they were a single output. The “K” instructs HP BASIC to output the
following numbers or strings in the default format.
5 Npoints=20
10 ALLOCATE INTEGER Iwfm_data(1:Npoint),Qwfm_data(1:Npoints)
15 DEG
20 FOR I=1 TO Npoints
25 Iwfm_data(I)=INT(8191*(COS(I*360/Npoints))+8192)
30 Qwfm_data(I)=INT(8191*(COS(I*360/Npoints))+8192)
35 NEXT I
40 Nbytes=2*Npoints
45 Assign @ESG to 719;FORMAT ON
50 Assign @ESGb to 719; FORMAT OFF
55 Nbytes$=VAL$(Nbytes)
60 Ndigits$=(LEN$(Nbytes$))
65 OUTPUT @ESG USING "#,K";":MMEM:DATA ""ARBI:<name>"",#"
70 OUTPUT @ESG USING "#,K";Ndigits$
75 OUTPUT @ESG USING "#,K";Nbytes
80 OUTPUT @ESGb;Iwfm_data(*)
85 OUTPUT @ESG;
90 OUTPUT @ESG USING "#,K";":MMEM:DATA ""ARBQ:<name>"",#"
95 OUTPUT @ESG USING "#,K";Ndigits$
100 OUTPUT @ESG USING "#,K";Nbytes
105 OUTPUT @ESGb;Qwfm_data(*)
110 OUTPUT @ESG;";"
115 Assign @ESGb to *
120 Assign @ESG to *
125 END
Program Comments
5: Sets the number of points in the waveform.
10: Defines arrays for I and Q waveform points. Sets them to be integer arrays.
15: Sets HP BASIC to use degrees for cosine and sine functions.
20: Sets up loop to calculate waveform points.
25: Calculates I waveform points.
30: Calculates Q waveform points.
35: End of loop.
40: Calculates number of bytes in I or Q waveform.
45: Opens an I/O path to the signal generator using GPIB. 7 is the address of the GPIB
card in the computer, and 19 is the address of the signal generator. This I/O path is
used to send ASCII data to the signal generator.
50: Opens an I/O path for sending binary data to the signal generator.
55: Creates an ASCII string representation of the number of bytes in the waveform.
Comentarios a estos manuales