Keysight E4428C ESG RF Programming Manual page 252

Signal generators
Table of Contents

Advertisement

Creating and Downloading Waveform Files
Creating Waveform Data
Line
Code—Create I and Q data
1
const int NUMSAMPLES=500;
2
main(int argc, char* argv[]);
3
{
4
short idata[NUMSAMPLES];
5
short qdata[NUMSAMPLES];
6
int numsamples = NUMSAMPLES;
7
for(int index=0; index<numsamples; index++);
8
{
9
10
11
}
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
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.
244
idata[index]=23000 * sin((2*3.14*index)/numsamples);
qdata[index]=23000 * cos((2*3.14*index)/numsamples);
"Waveform Memory" on page 228
.
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents