EasyManuals Logo
Home>Agilent Technologies>Measuring Instruments>B1500A

Agilent Technologies B1500A User Manual

Agilent Technologies B1500A
208 pages
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #208 background imageLoading...
Page #208 background image
4-52 Agilent B1500 VXIplug&play Driver Users Guide, Edition 3
Programming Examples for C++ Users
CV Sweep Measurement
printf("Vg (V), Cp (pF), C_st, G (uS), G_st, OSC (mV), Osc_st, DC (V), Dc_st, Time
(s)\n"); /* 61 */
for (j = 0; j < nop2; j++){
n = j * nop1;
for (i = n; i < n + nop1; i++){
printf(" %3.2f, %8.6f, %1d, %8.6f,%1d, %8.6f, %1d, %8.6f,%1d, %8.6f\n",
sc[i], md[2*i] * 1000000000000, st[2*i], md[2*i+1] * 1000000, st[2*i+1], mon[2*i],
st_mon[2*i], mon[2*i+1], st_mon[2*i+1], mt[i]);
}
}
FILE *stream; /* 69 */
if( ( stream = fopen( f_name, "w+" )) == NULL ){
printf( "Data file was not opened\n" );
}
else {
printf( "%s%c", msg1, c );
fprintf( stream, "%s%c", head1, c );
for (j = 0; j < nop2; j++){
n = j * nop1;
for (i = n; i < n + nop1; i++){
fprintf( stream, "%3.2f, %8.6f, %1d, %8.6f,%1d, %8.6f, %1d, %8.6f,%1d,
%8.6f\n", sc[i], md[2*i] * 1000000000000, st[2*i], md[2*i+1] * 1000000, st[2*i+1],
mon[2*i], st_mon[2*i], mon[2*i+1], st_mon[2*i+1], mt[i]);
}
}
printf( "%s%c", msg2, c );
}
if( fclose( stream ) ){
printf( "Data file was not closed\n" );
}
ret = agb1500_setSwitch(vi, agb1500_CH_ALL, 0); /* 90 */
check_err (vi, ret);
}
Line Description
61 to 67 Displays the measurement result data.
69 to 88 Saves the measurement results into a CSV file specified by the f_name variable. The file
name is defined in the line 29.
90 Disables all ports.
91 Calls the check_err subprogram (shown in Table 4-1) to check if an error status is
returned for the previous line.
92 End of the perform_meas subprogram.

Table of Contents

Other manuals for Agilent Technologies B1500A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies B1500A and is the answer not in the manual?

Agilent Technologies B1500A Specifications

General IconGeneral
BrandAgilent Technologies
ModelB1500A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals