EasyManua.ls Logo

Keysight Technologies X Series - Page 268

Keysight Technologies X Series
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...
268 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
{
fprintf(stderr, "iopen failed (%s)\n", instOpenString);
return -1;
}
FILE* file = fopen(localSrcFile, "rb");
if (!file)
{
fprintf(stderr, "Could not open file: %s\n", localSrcFile);
return 0;
}
if( fseek( file, 0, SEEK_END ) < 0 )
{
fprintf(stderr,"Cannot seek to the end of file.\n" );
return 0;
}
long lenToSend = ftell(file);
printf("File size = %d\n", lenToSend);
if (fseek(file, 0, SEEK_SET) < 0)
{
fprintf(stderr,"Cannot seek to the start of file.\n");
return 0;
}
char* buf = new char[BUFFER_SIZE];
if (buf && lenToSend)
{
// Prepare and send the SCPI command header
char s[20];
sprintf(s, "%d", lenToSend);
int lenLen = strlen(s);

Table of Contents

Other manuals for Keysight Technologies X Series

Related product manuals