EasyManua.ls Logo

Keysight Technologies N5173B EXG - Creating and Using Bit Files

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 265
Creating and Downloading Waveform Files
Programming Examples
// iqbuffer[index*2] = idata[index]; // Big endian order,
uncomment this line
// iqbuffer[index*2+1] = qdata[index]; // Big endian order,
uncomment this line
// } // Big endian order,
uncomment this line
// Open a connection to write to the instrument
INST id=iopen(instOpenString);
if (!id)
{
fprintf(stderr, “iopen failed (%s)\n”, instOpenString);
return -1;
}
// Declare variables to hold portions of the SCPI command
int bytesToSend;
char s[20];
char cmd[200];
bytesToSend = numsamples*4; // calculate the number of
bytes
sprintf(s, “%d”, bytesToSend); // create a string s with that
number of bytes
// The SCPI command has four parts.
// Part 1 = :MEM:DATA “filename”,#
// Part 2 = length of Part 3 when written to a string
// Part 3 = length of the data in bytes. This is in s from
above.
// Part 4 = the buffer of data
// Build parts 1, 2, and 3 for the I and Q data.
sprintf(cmd, “:MEM:DATA \”WFM1:FILE1\”, #%d%d”, strlen(s),
bytesToSend);
// Send parts 1, 2, and 3

Table of Contents

Other manuals for Keysight Technologies N5173B EXG

Related product manuals