Agilent B1500 VXIplug&play Driver User’s Guide, Edition 3 4-7
Programming Examples for C++ Users
High Speed Spot Measurement
High Speed Spot Measurement
Table 4-2 explains an example subprogram that performs the high speed spot
measurement. The following subprogram will apply voltage to a MOSFET, measure
drain current, and display the measurement result data.
Table 4-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 = 4; /* SMU4 */
bulk = 6; /* SMU6 */ /* 11 */
ret = agb1500_setSwitch(vi, drain, 1); /* 13 */
ret = agb1500_setSwitch(vi, gate, 1);
ret = agb1500_setSwitch(vi, source, 1);
ret = agb1500_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 4-1) to check if
an error status is returned for the previous line.
19 to 29 Declares variables, and defines the value.