
. . . continued
for (loop = 211; loop <= 4000; loop++)
{
waveform[loop] = 0; /* Set remaining points to zero */
}
/* Call function to download the 4000 data points to volatile memory */
download_data(waveform, num_points);
/* Free memory allocated for data points */
free(waveform);
}
/**************************************************************************/
void download_data(float *waveform, int num_points)
{
/* Download the waveform array (4000 points) to volatile memory.
The function generator expects to receive the arb waveform data as
one contiguous block. To do this, suppress the carriage return (CR)
and line feed (LF) before downloading the data. */
static char state[2] = {13, 10}; /* ASCII 13 = carriage return
ASCII 10 = line feed */
/* First, disable EOI (End-or-Identify) and EOL (End-of-Line) */
IOEOI (ISC,0); IOEOL (ISC, " ", 0);
/* Send "DATA VOLATILE" header and suppress CR/LF */
printf("Downloading Arb...\n\n");
IOOUTPUTS (ADDR, "DATA VOLATILE,", 14);
/* Re-enable EOI and EOL for normal GPIB operation and send the data */
IOEOI (ISC,1); IOEOL (ISC, state, 2);
/* Use the IOOUTPUTA to output the waveform data as an ASCII array */
IOOUTPUTA (ADDR, waveform, num_points); printf("Download Complete\n\n");
/* Call the function to check for errors */
check_error("download_data");
}
/**************************************************************************/
Chapter 6 Application Programs
Downloading an Arbitrary Waveform over GPIB
258
Summary of Contents for 33120A
Page 2: ......
Page 10: ...8 ...
Page 14: ...Contents Contents 12 ...
Page 15: ...1 Quick Start 1 ...
Page 31: ...2 Front Panel Menu Operation 2 ...
Page 55: ...3 Features and Functions 3 ...
Page 126: ...124 ...
Page 127: ...4 Remote Interface Reference 4 ...
Page 204: ...SCPI Status System Chapter 4 Remote Interface Reference The SCPI Status Registers 202 ...
Page 228: ...226 ...
Page 229: ...5 Error Messages 5 ...
Page 244: ...242 ...
Page 245: ...6 Application Programs 6 ...
Page 272: ...270 ...
Page 273: ...7 Tutorial 7 ...
Page 299: ...8 Specifications 8 ...
Page 304: ...302 ...