4-8 Agilent B1500 VXIplug&play Driver User’s Guide, Edition 3
Programming Examples for C++ Users
High Speed Spot Measurement
Measurement
Result Example
Id = 14.255001 mA (at 1.5 V)
Vg = 1.5 V
ret = agb1500_force(vi, bulk, agb1500_VF_MODE, 0, 0, 0.1, 0); /* 31 */
ret = agb1500_force(vi, source, agb1500_VF_MODE, 0, 0, 0.1, 0);
ret = agb1500_force(vi, gate, agb1500_VF_MODE, 2, vg, igcomp, 0);
ret = agb1500_force(vi, drain, agb1500_VF_MODE, 2, vd, idcomp, 0);
check_err (vi, ret); /* 35 */
ret = agb1500_spotMeas(vi,drain,agb1500_IM_MODE,0,&meas,&status,0);
check_err (vi, ret); /* 38 */
ret = agb1500_zeroOutput(vi, agb1500_CH_ALL); /* 40 */
check_err (vi, ret); /* 41 */
printf("Id = %9.6f mA (at %3.1f V)\n", meas * 1000, vd); /* 43 */
printf("Vg = %3.1f V\n", vg);
ret = agb1500_setSwitch(vi, agb1500_CH_ALL, 0); /* 46 */
check_err (vi, ret); /* 47 */
}
Line Description
31 to 34 Applies voltage to device.
37 Performs high speed spot measurement for the drain terminal.
40 Sets the specified port to the zero output state.
43 to 44 Displays the measurement result data.
46 Disables all ports.
35, 38, 41, and 47 Calls the check_err subprogram (shown in Table 4-1) to check if an error status is
returned for the previous line.
48 End of the perform_meas subprogram.