Agilent B1500 VXIplug&play Driver User’s Guide, Edition 3 4-19
Programming Examples for C++ Users
Staircase Sweep Measurement
Measurement
Result Example
Vg (V), Id (mA), Time (sec), Status
0.00, 0.004043, 0.065200, 0
0.30, 2.330500, 0.071300, 0
0.60, 4.904000, 0.073000, 0
0.90, 7.723500, 0.074600, 0
1.20, 10.753000, 0.076300, 0
1.50, 13.975000, 0.080000, 0
1.80, 17.385000, 0.081200, 0
2.10, 20.955000, 0.082800, 0
2.40, 24.660000, 0.084300, 0
2.70, 28.500000, 0.085500, 0
3.00, 32.450000, 0.087000, 0
FILE *stream; /* 66 */
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 (i = 0; i < nop; i++){
fprintf( stream, "%4.2f, %9.6f, %8.6f, %d\n", sc[i], md[i] * 1000, tm[i],
st[i]);
}
printf( "%s%c", msg2, c );
}
if( fclose( stream ) ){
printf( "Data file was not closed\n" );
} /* 82 */
}
Line Description
66 to 82 Saves the measurement results into a CSV file specified by the f_name variable.
83 End of the perform_meas subprogram.