Technical data

Creating and Downloading User-Data Files 5
Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz 149
{
ViSession defaultRM, vi;
ViStatus status = 0;
status = viOpenDefaultRM(&defaultRM);//open the default resource manager
//TO DO: Error handling here
status = viOpen(defaultRM, instOpenString, VI_NULL, VI_NULL, &vi);
if (status)//if any errors then display the error and exit the program
{
fprintf(stderr, "viOpen failed (%s)\n", instOpenString);
return -1;
}
printf("Example Program to Download User Flatness Corrections\n\n");
printf("Enter number of frequency and amplitude pairs: ");
int num = 0;
scanf("%d", &num);
if (num > 0)
{
int lenArray=num*2;//length of the pairsList[] array. This array
//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