Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4 5-15
Programming Examples for C++ Users
Synchronous Sweep Measurements
Synchronous Sweep Measurements
The following subprogram performs I-V measurement and saves the measurement
results (MOSFET Id-Vg characteristics) into a file. The subprogram uses the
synchronous sweep source set by the hp4156b_setSweepSync function.
Table 5-5 Synchronous Sweep Measurement Example
void perform_meas (ViSession vi, ViStatus ret) /* 1 */
{
ViInt32 drain = 1; /* SMU1 */ /* 3 */
ViInt32 gate = 2; /* SMU2 */
ViInt32 source = 3; /* SMU3 */
ViInt32 bulk = 4; /* SMU4 */
ViReal64 vd = 3;
ViReal64 vg = 3;
ViReal64 idcomp = 0.05;
ViReal64 igcomp = 0.01;
ViReal64 hold = 0;
ViReal64 delay = 0;
ViReal64 s_delay = 0;
ViReal64 pdcomp = 0;
ViReal64 pgcomp = 0;
ViInt32 nop = 11;
ViInt32 rep;
ViReal64 sc[11];
ViReal64 md[11];
ViInt32 st[11];
ViInt32 i;
ViChar f_name[] = "C:\Agilent\data\data2.txt";
ViChar head1[] = "Vg (V), Id (mA), Status";
ViChar msg1[] = "Saving data...";
ViChar msg2[] = "Data save completed.";
ViChar c = ’\n’; /* 26 */
ret = hp4156b_setSwitch(vi, drain, 1); /* 27 */
ret = hp4156b_setSwitch(vi, gate, 1);
ret = hp4156b_setSwitch(vi, source, 1);
ret = hp4156b_setSwitch(vi, bulk, 1);
check_err (vi, ret); /* 31 */
Line Description
1 Beginning of the perform_meas subprogram.
3 to 26 Declares variables, and defines the value.
27 to 30 Enables measurement channels.
31 Calls the check_err subprogram (shown in Table 5-1) to check if
an error status is returned for the previous line.