EasyManua.ls Logo

Keysight Technologies N5173B EXG - Page 269

Keysight Technologies N5173B EXG
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 269
Creating and Downloading Waveform Files
Programming Examples
char s2[256];
sprintf(s2, "mmem:data \"%s\", #%d%d", instDestFile, lenLen,
lenToSend);
iwrite(id, s2, strlen(s2), 0, 0);
// Send file in BUFFER_SIZE chunks
long numRead;
do
{
numRead = fread(buf, sizeof(char), BUFFER_SIZE, file);
iwrite(id, buf, numRead, 0, 0);
} while (numRead == BUFFER_SIZE);
// Send the terminating newline and EOM
iwrite(id, "\n", 1, 1, 0);
delete [] buf;
}
else
{
fprintf(stderr, "Could not allocate memory for copy
buffer\n");
}
fclose(file);
iclose(id);
return 0;
}
Importing and Downloading Using VISA—Big Endian Order
On the documentation CD, this programming example’s name is
DownLoad_Visa_c++.txt.”
This C++ programming example (compiled using Microsoft Visual C++ 6.0)
assumes that the data is in big endian order and performs the following
functions:
—error checking

Table of Contents

Other manuals for Keysight Technologies N5173B EXG

Related product manuals