EasyManuals Logo

Keysight Technologies N5166B CXG Programming Guide

Keysight Technologies N5166B CXG
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 #279 background imageLoading...
Page #279 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 279
Creating and Downloading Waveform Files
Programming Examples
// processor such as Intel, then you will need to swap the
// bytes in the data before sending it to the signal generator.
// The arrays ibuffer and qbuffer are used to hold the data
// after any byte swapping, shifting or scaling.
// In this example, we’ll assume that the data is in the format
// of the E443xB without markers. In other words, the data
// is in the range 0-16383.
// 0 gives negative full-scale output
// 8192 gives 0 V output
// 16383 gives positive full-scale output
// If this is not the scaling of your data, then you will need
// to scale your data appropriately in the next two blocks.
// ibuffer and qbuffer will hold the data in the E443xB format.
// No scaling is needed, however we need to swap the byte order
// on a little endian computer. Remove the byte swapping
// if you are using a big endian computer.
for(index=0; index<numsamples; index++)
{
int ivalue = idata[index];
int qvalue = qdata[index];
ibuffer[index*2] = (ivalue >> 8) & 0xFF; // high byte of i
ibuffer[index*2+1] = ivalue & 0xFF; // low byte of i
qbuffer[index*2] = (qvalue >> 8) & 0xFF; // high byte of q
qbuffer[index*2+1] = qvalue & 0xFF; // low byte of q
}
// iqbuffer will hold the data in the E4438C, E8267C, E8267D
// format. In this format, the I and Q data is interleaved.
// The data is in the range -32768 to 32767.
// -32768 gives negative full-scale output
// 0 gives 0 V output

Table of Contents

Other manuals for Keysight Technologies N5166B CXG

Questions and Answers:

Question and Answer IconNeed help?

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

Keysight Technologies N5166B CXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5166B CXG
CategoryPortable Generator
LanguageEnglish

Related product manuals