EasyManuals Logo

Keysight Technologies N5173B EXG Programming Guide

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
Page #264 background imageLoading...
Page #264 background image
264 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
fprintf(outfile, “%d, %d\n”, idata[index], qdata[index]);
}
fclose(outfile);
// Little endian order data, use the character array and for
loop.
// If big endian order, comment out this character array and for
loop,
// and use the next loop (Big Endian order data).
// We need a buffer to interleave the I and Q data.
// 4 bytes to account for 2 I bytes and 2 Q bytes.
char iqbuffer[NUMSAMPLES*4];
// Interleave I and Q, and swap bytes from little
// endian order to big endian order.
for(index=0; index<numsamples; index++)
{
int ivalue = idata[index];
int qvalue = qdata[index];
iqbuffer[index*4] = (ivalue >> 8) & 0xFF; // high byte of i
iqbuffer[index*4+1] = ivalue & 0xFF; // low byte of i
iqbuffer[index*4+2] = (qvalue >> 8) & 0xFF; // high byte of q
iqbuffer[index*4+3] = qvalue & 0xFF; // low byte of q
}
// Big Endian order data, uncomment the following lines of code.
// Interleave the I and Q data.
// short iqbuffer[NUMSAMPLES*2]; // Big endian order,
uncomment this line
// for(index=0; index<numsamples; index++) // Big endian order,
uncomment this line
// { // Big endian order,
uncomment this line

Table of Contents

Other manuals for Keysight Technologies N5173B EXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5173B EXG and is the answer not in the manual?

Keysight Technologies N5173B EXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5173B EXG
CategoryPortable Generator
LanguageEnglish

Related product manuals