. . . 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
Содержание 33120A
Страница 2: ......
Страница 10: ...8 ...
Страница 14: ...Contents Contents 12 ...
Страница 15: ...1 Quick Start 1 ...
Страница 31: ...2 Front Panel Menu Operation 2 ...
Страница 55: ...3 Features and Functions 3 ...
Страница 126: ...124 ...
Страница 127: ...4 Remote Interface Reference 4 ...
Страница 204: ...SCPI Status System Chapter 4 Remote Interface Reference The SCPI Status Registers 202 ...
Страница 228: ...226 ...
Страница 229: ...5 Error Messages 5 ...
Страница 244: ...242 ...
Страница 245: ...6 Application Programs 6 ...
Страница 272: ...270 ...
Страница 273: ...7 Tutorial 7 ...
Страница 299: ...8 Specifications 8 ...
Страница 304: ...302 ...