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 #263 background imageLoading...
Page #263 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 263
Creating and Downloading Waveform Files
Programming Examples
{
// Create a text file to view the waveform
// prior to downloading it to the signal generator.
// This verifies that the data looks correct.
char *ofile = “c:\\temp\\iq.txt”;
// Create arrays to hold the I and Q data
int idata[NUMSAMPLES];
int qdata[NUMSAMPLES];
// save the number of sampes into numsamples
int numsamples = NUMSAMPLES;
// Fill the I and Q buffers with the sample data
for(int index=0; index<numsamples; index++)
{
// Create the I and Q data for the number of waveform
// points and Scale the data (20000 * ...) as a precentage
// of the DAC full scale (-32768 to 32767). This example
// scales to approximately 70% of full scale.
idata[index]=23000 * sin((4*3.14*index)/numsamples);
qdata[index]=23000 * cos((4*3.14*index)/numsamples);
}
// Print the I and Q values to a text file. View the data
// to see if its correct and if needed, plot the data in a
// spreadsheet to help spot any problems.
FILE *outfile = fopen(ofile, “w”);
if (outfile==NULL) perror (“Error opening file to write”);
for(index=0; index<numsamples; index++)
{

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