Agilent Technologies B1500A User's Guide Page 183

  • Download
  • Add to my manuals
  • Print
  • Page
    / 208
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 182
Agilent B1500 VXIplug&play Driver Users Guide, Edition 3 4-27
Programming Examples for C++ Users
Multi Channel Sweep Measurement
ret = agb1500_setAdc(vi, agb1500_HSPEED_ADC, agb1500_INTEG_MANUAL, smpl,
agb1500_FLAG_OFF); /* 41 */
ret = agb1500_setAdcType(vi, agb1500_CH_ALL, agb1500_HSPEED_ADC);
ret = agb1500_resetTimestamp(vi);
check_err (vi, ret); /* 45 */
ret = agb1500_force(vi, emitter, agb1500_VF_MODE, 0, ve, iecomp, 0); /* 47 */
ret = agb1500_force(vi, collector, agb1500_VF_MODE, 0, vc, iccomp, 0);
ret = agb1500_setIv(vi, base, agb1500_SWP_VF_SGLLIN, 0, vb1, vb2, nop, hold, delay,
s_delay, ibcomp, pcomp);
check_err (vi, ret); /* 50 */
ret = agb1500_msweepMiv(vi, mch, mode, range, &rep, &sc[0], &md[0], &st[0],
&tm[0]);
check_err (vi, ret); /* 53 */
ret = agb1500_zeroOutput(vi, agb1500_CH_ALL); /* 55 */
ret = agb1500_setSwitch(vi, agb1500_CH_ALL, 0);
check_err (vi, ret); /* 57 */
if ( rep != nop ) { /* 59 */
printf ("%d measurement steps were returned.\nIt must be %d steps.\n", rep, nop);
exit (ret);
}
ViInt32 i; /* 64 */
ViInt32 n;
printf(" Vb (V), Ic (mA), Ib (mA)\n");
for (i = 0; i < nop; i++){
printf(" %4.2f, %9.6f, %9.6f\n", sc[i], md[2*i] * 1000, md[2*i+1] * 1000);
} /* 69 */
Line Description
41 to 42 Sets the high speed ADC, and selects it for all measurement channels.
44 Resets time stamp.
47 to 49 Applies voltage to device, and sets the staircase sweep source.
52 Performs measurement by using the agb1500_msweepMiv function.
55 Sets the specified port to the zero output state.
56 Disables all ports.
39, 45, 50, 53,
and 57
Calls the check_err subprogram (shown in Table 4-1) to check if an error status is
returned for the previous line.
59 to 62 Stops the program execution if the number of returned data is not equal to nop.
64 to 69 Displays the measurement result data.
Page view 182
1 2 ... 178 179 180 181 182 183 184 185 186 187 188 ... 207 208

Comments to this Manuals

No comments