Agilent B1500 VXIplug&play Driver User’s Guide, Edition 3 4-9
Programming Examples for C++ Users
Multi Channel Spot Measurement
Multi Channel Spot Measurement
Table 4-3 explains an example subprogram that performs the multi channel spot
measurement. The following subprogram will apply voltage to a bipolar transistor,
measure Ic and Ib, calculate hfe value, and display the measurement result data.
Table 4-3 Multi Channel Spot Measurement Example
void perform_meas (ViSession vi, ViStatus ret) /* 1 */
{
ViInt32 emitter; /* 3 */
ViInt32 base;
ViInt32 collector;
emitter = 1; /* SMU1 */
base = 2; /* SMU2 */
collector = 4; /* SMU4 */ /* 8 */
ret = agb1500_setSwitch(vi, emitter, 1); /* 10 */
ret = agb1500_setSwitch(vi, base, 1);
ret = agb1500_setSwitch(vi, collector, 1);
check_err (vi, ret); /* 13 */
ViReal64 vc; /* 15 */
ViReal64 vb;
ViReal64 iccomp;
ViReal64 ibcomp;
vc = 3;
iccomp = 0.1;
vb = 0.7;
ibcomp = 0.01;
ViInt32 mch[3];
ViInt32 mode[2];
ViReal64 range[2];
ViReal64 md[2];
ViInt32 st[2];
ViReal64 tm[2]; /* 29 */
Line Description
1 Beginning of the perform_meas subprogram.
3 to 8 Declares variables, and defines the value.
10 to 12 Enables measurement channels.
13 Calls the check_err subprogram (shown in Table 4-1) to check if
an error status is returned for the previous line.
15 to 29 Declares variables, and defines the value.