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 #257 background imageLoading...
Page #257 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 257
Creating and Downloading Waveform Files
Programming Examples
maxAmp = Qwave[i];
else if( minAmp > Qwave[i] )
minAmp = Qwave[i];
}
maxAmp = fabs(maxAmp);
minAmp = fabs(minAmp);
if( minAmp > maxAmp )
maxAmp = minAmp;
// Convert to short integers and interleave I/Q data
scale = 32767 / maxAmp; // Watch out for divide by zero.
for( i=0; i<points; i++)
{
waveform[2*i] = (short)floor(Iwave[i]*scale + 0.5);
waveform[2*i+1] = (short)floor(Qwave[i]*scale + 0.5);
}
// If on a PC swap the bytes to Big Endian
if( strcmp(computer,”PCWIN”) == 0 )
//if( PC )
{
pChar = (char *)&waveform[0]; // Character pointer to short
int data
for( i=0; i<2*points; i++ )
{
buf = *pChar;
*pChar = *(pChar+1);
*(pChar+1) = buf;
pChar+= 2;
}
}
// Save the data to a file
// Use FTP or one of the download assistants to download the file
to the
// signal generator
char *filename = “C:\\Temp\\PSGTestFile”;

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