Chapter 7
7-13
Programming Examples
Measurement Setup Examples
err_status = hp875x_timeOut(vi, 3000);
checkErr(vi, err_status);
// Set up measurement and display
// Channel 1
err_status = hp875x_channelSelect(vi, hp875x_CH1);
checkErr(vi, err_status);
// Turn auxiliary channel off.
err_status = hp875x_auxChannel(vi, hp875x_CH1, hp875x_OFF);
checkErr(vi, err_status);
// Return Loss measurement, no parameter conversion
// For 8719ET/8720ET/8722ET/8753ET, hp875x_S_PAR11 is interpreted as hp875x_REFL
err_status = hp875x_measType(vi, hp875x_S_PAR11, hp875x_CONV_OFF);
checkErr(vi, err_status);
// Log magnitude display
err_status = hp875x_displaySelect(vi,hp875x_CH1,hp875x_DISP_DATA,hp875x_DISP_LOGM);
checkErr(vi, err_status);
// Channel 2
err_status = hp875x_channelSelect(vi, hp875x_CH2);
checkErr(vi, err_status);
// Turn auxiliary channel off.
err_status = hp875x_auxChannel(vi, hp875x_CH2, hp875x_OFF);
checkErr(vi, err_status);
// Return Loss measurement, no parameter conversion
err_status = hp875x_measType(vi, hp875x_S_PAR11, hp875x_CONV_OFF);
checkErr(vi, err_status);
// Phase display
err_status = hp875x_displaySelect(vi,hp875x_CH2,hp875x_DISP_DATA,hp875x_DISP_PHAS);
checkErr(vi, err_status);
// Dual channel display (single graticule)
err_status = hp875x_dualSplit(vi, hp875x_DUAL_CHAN_ON, hp875x_SPLIT_CHAN_OFF);
checkErr(vi, err_status);
// Request start and stop frequency
printf(“Enter Start Frequency (MHz)\n”);
scanf(“%lf”, &f_start);
f_start *= 1000000;
printf(“Enter Stop Frequency (MHz)\n”);
scanf(“%lf”, &f_stop);
f_stop *= 1000000;
// Program the frequency settings
err_status = hp875x_frequency(vi, hp875x_FREQ_STRT_STOP, f_start, f_stop);
checkErr(vi, err_status);
// Autoscale the displays
err_status = hp875x_channelSelect(vi, hp875x_CH1);
checkErr(vi, err_status);
err_status = hp875x_autoscale(vi);
checkErr(vi, err_status);
err_status = hp875x_channelSelect(vi, hp875x_CH2);
checkErr(vi, err_status);
err_status = hp875x_autoscale(vi);
checkErr(vi, err_status);
printf(“The display should now be autoscaled.\n”);
printf(“Press any key on the computer keyboard to view four types of measurements\n”);
printf(“simultaneously on the network analyzer display.\n”);
// Wait for keyboard input, then remove character from buffer
while (!_kbhit());
while (_kbhit()) getch();
Summary of Contents for 8719ES
Page 15: ...1 1 1 Alphabetical Command Reference ...
Page 293: ...2 1 2 Introduction to Instrument Control ...
Page 310: ...3 1 3 GPIB Programming ...
Page 334: ...4 1 4 Reading Analyzer Data ...
Page 343: ...5 1 5 Data Processing Chain ...
Page 350: ...6 1 6 Error Reporting ...
Page 364: ...7 1 7 Programming Examples ...
Page 502: ...A 1 A Preset Conditions ...
Page 517: ...B 1 B Command Listings ...