5-12 Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Programming Examples for C++ Users
Staircase Sweep Measurements
ret = hp4156b_setSwitch(vi, drain, 1);
/* 38 */
ret = hp4156b_setSwitch(vi, gate, 1);
ret = hp4156b_setSwitch(vi, source, 1);
ret = hp4156b_setSwitch(vi, bulk, 1);
check_err (vi, ret);
/* 42 */
/* 44 */
ret = hp4156b_force(vi, bulk, hp4156b_VF_MODE, 0, 0, 0.1, 0);
ret = hp4156b_force(vi, source, hp4156b_VF_MODE, 0, 0, 0.1, 0);
for (j = 0; j < nop2; j++){
/* 48 */
dvg[j] = (j + 1) * vg / nop2;
ret = hp4156b_force(vi, gate, hp4156b_VF_MODE, 0, dvg[j], igcomp, 0);
ret = hp4156b_setIv(vi, drain, hp4156b_SWP_VF_SGLLIN, 0, 0, vd, nop1, hold,
delay, s_delay, idcomp, p_comp);
check_err (vi, ret);
ret = hp4156b_sweepIv(vi, drain, hp4156b_IM_MODE, 0, &rep, &sc[i], &md[i],
&st[i]);
check_err (vi, ret);
if ( rep = nop1 ) {
i = i + nop1;
}
else {
printf ("%d measurement steps were returned.\nIt must be %d steps.\n", rep,
nop1);
ret = hp4156b_zeroOutput(vi, hp4156b_CH_ALL);
ret = hp4156b_setSwitch(vi, hp4156b_CH_ALL, 0);
check_err (vi, ret);
exit (ret);
}
}
/* 67 */
ret = hp4156b_zeroOutput(vi, hp4156b_CH_ALL);
/* 69 */
check_err (vi, ret);
Line
Description
38 to 41
Enables measurement channels.
45 to 46
Applies voltage to device.
48 to 67
Applies dc voltage and sweep voltage, and performs staircase sweep measurement.
After that, disables all ports and stops the program execution if the number of
returned data is not equal to the nop1 value.
69
Sets the specified port to the zero output state.
42 and 70
Calls the check_err subprogram (shown in Table 5-1) to check if an error status is
returned for the previous line.
Summary of Contents for 4155C
Page 3: ......
Page 13: ...1 Installation...
Page 19: ...2 Driver Function Reference...
Page 89: ...3 Programming Examples for Visual Basic Users...
Page 147: ...4 Programming Examples for Visual Basic NET Users...
Page 183: ...5 Programming Examples for C Users...
Page 225: ...6 Programming Examples for VEE Users...