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 #382 background imageLoading...
Page #382 background image
382 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading User–Data Files
User Flatness Correction Downloads Using C++ and VISA
//will hold the frequency and amplitude arrays
char** pairsList = new char* [lenArray]; //pointer array
for (int n=0; n < lenArray; n++)//initialize the pairsList
array
//pairsList[n]=0;
for (int i=0; i < num; i++)
{
char* nextFreq = new char[MAX_STRING_LENGTH+1];
//frequency array
char* nextPower = new
char[MAX_STRING_LENGTH+1];//amplitude array
//enter frequency and amplitude pairs i.e 10ghz .1db
printf("Enter Freq %d: ", i+1);
scanf("%s", nextFreq);
printf("Enter Power %d: ",i+1);
scanf("%s", nextPower);
pairsList[2*i] = nextFreq;//frequency
pairsList[2*i+1]=nextPower;//power correction
}
unsigned char str[256];//buffer used to hold SCPI command
//initialize the signal generator's user flatness table
sprintf((char*)str,":corr:flat:pres\n"); //write to buffer
viWrite(vi, str,strlen((char*str),0); //write to PSG
char c = ',';//comma separator for SCPI command
for (int j=0; j< num; j++) //download pairs to the PSG
{
sprintf((char*)str,":corr:flat:pair %s %c
%s\n",pairsList[2*j], c, pairsList[2*j+1]); // << on
SAME line!
viWrite(vi, str,strlen((char*)str),0);
}

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