Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4 5-7
Programming Examples for C++ Users
High-Speed Spot Measurements
High-Speed Spot Measurements
This section explains an example subprogram that performs high speed spot
measurement. The following subprogram will apply voltage to a MOSFET, measure
drain current, and display the measurement result data.
Table 5-2 High-Speed Spot Measurement Example
void perform_meas (ViSession vi, ViStatus ret) /* 1 */
{
ViInt32 drain; /* 3 */
ViInt32 gate;
ViInt32 source;
ViInt32 bulk;
drain = 1; /* SMU1 */
gate = 2; /* SMU2 */
source = 3; /* SMU3 */
bulk = 4; /* SMU4 */ /* 11 */
ret = hp4156b_setSwitch(vi, drain, 1); /* 13 */
ret = hp4156b_setSwitch(vi, gate, 1);
ret = hp4156b_setSwitch(vi, source, 1);
ret = hp4156b_setSwitch(vi, bulk, 1);
check_err (vi, ret); /* 17 */
ViReal64 vd; /* 19 */
ViReal64 vg;
ViReal64 idcomp;
ViReal64 igcomp;
ViReal64 meas;
ViInt32 status;
vd = 1.5;
idcomp = 0.05;
vg = 1.5;
igcomp = 0.01; /* 29 */
Line Description
1 Beginning of the perform_meas subprogram.
3 to 11 Declares variables, and defines the value.
13 to 16 Enables measurement channels.
17 Calls the check_err subprogram (shown in Table 5-1) to check if
an error status is returned for the previous line.
19 to 29 Declares variables, and defines the value.