Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4 5-17
Programming Examples for C++ Users
Synchronous Sweep Measurements
Measurement
Result Example
Vg (V), Id (mA), Status
0.00, 0.004043, 0
0.30, 2.330500, 0
0.60, 4.904000, 0
0.90, 7.723500, 0
1.20, 10.753000, 0
1.50, 13.975000, 0
1.80, 17.385000, 0
2.10, 20.955000, 0
2.40, 24.660000, 0
2.70, 28.500000, 0
3.00, 32.450000, 0
FILE *stream; /* 59 */
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, %d\n", sc[i], md[i] * 1000, st[i]);
}
printf( "%s%c", msg2, c );
}
if( fclose( stream ) ){
printf( "Data file was not closed\n" );
} /* 75 */
}
Line Description
59 to 75 Saves the measurement results into a file (C:\Agilent\data\data2.txt, CSV file).
76 End of the perform_meas subprogram.