240 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Creating Waveform Data
To download the data created in the above example, see
Programming Languages” on page 243
Line
Code—Interleaving I and Q data for Big Endian Order
20
21
22
23
24
25
26
short iqbuffer[NUMSAMPLES*2];
for(index=0; index<numsamples; index++)
{
iqbuffer[index*2] = idata[index];
iqbuffer[index*2+1] = qdata[index];
}
return 0;
Line
Code Description—Interleaving I and Q data for Big Endian Order
20
Define a 16–bit integer (short) array to store the interleaved I and Q data. The array size increases by two times
to accommodate two bytes of I data and two bytes of Q data.
NOTE
In rare instances, a compiler may define
short
as larger than 16 bits. If this
condition exists, replace
short
with the appropriate object or label that defines a
16–bit integer.
21–25
Create a loop to do the following:
— Store the I data values to the I/Q array location [
index
*2].
— Store the Q data values to the I/Q array location [
index
*2+1].
1 0 1 1 0 1 1 1
15...................... 8
Data
Bit Position
Interleaved I/Q Array in Big Endian Order
1 1 1 0 1 0 0 1
7.................... 0
1 1 1 0 0 1 0 1
15...................... 8
0 1 1 0 1 0 1 1
7.................... 0
I Data
Q Data
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...