Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 381
Creating and Downloading User–Data Files
User Flatness Correction Downloads Using C++ and VISA
const int MAX_STRING_LENGTH=20;//length of frequency and power
strings
const int BUFFER_SIZE=256;//length of SCPI command string
int main(int argc, char* argv[])
{
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
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...