EasyManua.ls Logo

Keysight E4428C ESG RF - Page 252

Keysight E4428C ESG RF
404 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...
244 Keysight Signal Generators Programming Guide
Creating and Downloading Waveform Files
Creating Waveform Data
Line Code—Create I and Q data
1
2
3
4
5
6
7
8
9
10
11
const int NUMSAMPLES=500;
main(int argc, char* argv[]);
{
short idata[NUMSAMPLES];
short qdata[NUMSAMPLES];
int numsamples = NUMSAMPLES;
for(int index=0; index<numsamples; index++);
{
idata[index]=23000 * sin((2*3.14*index)/numsamples);
qdata[index]=23000 * cos((2*3.14*index)/numsamples);
}
Line Code Description—Create I and Q data
1 Define the number of waveform points. Note that the maximum number of waveform points that you can set
is based on the amount of available memory in the signal generator. For more information on signal generator
memory, refer to
“Waveform Memory” on page 228.
2 Define the main function in C++.
4 Create an array to hold the generated I values. The array length equals the number of the waveform points.
Note that we define the array as type short, which represents a 16–bit signed integer in most C++ compilers.
5 Create an array to hold the generated Q values (signed 16–bit integers).
6 Define and set a temporary variable, which is used to calculate the I and Q values.

Table of Contents

Related product manuals