5-26 Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Programming Examples for C++ Users
Pulsed Sweep Measurements
ret = hp4156b_setFilter(vi, collector, hp4156b_FLAG_OFF);
ret = hp4156b_force(vi, emitter, hp4156b_VF_MODE, 0, 0, 0.1, 0);
for (j = 0; j < nop2; j++){ /* 39 */
dib[j] = (j + 1) * ib / nop2;
ret = hp4156b_force(vi, base, hp4156b_IF_MODE, 0, dib[j], vbcomp, 0);
ret = hp4156b_setPiv(vi, collector, hp4156b_SWP_VF_SGLLIN, 0, base, 0, vc, nop1,
hold, width, period, iccomp);
check_err (vi, ret);
ret = hp4156b_sweepPiv(vi, collector, 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);
}
} /* 58 */
ret = hp4156b_zeroOutput(vi, hp4156b_CH_ALL); /* 60 */
check_err (vi, ret);
Line Description
36 Sets the filter off for the SMU used for the pulse source.
37 Applies voltage to device.
39 to 58 Applies dc current and pulsed sweep voltage, and performs pulsed 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.
60 Sets the specified port to the zero output state.
34, 43, 46, 55,
and 61
Calls the check_err subprogram (shown in Table 5-1) to check if an error status is
returned for the previous line.