2-40 Agilent 4155C/4156C VXIplug&play Driver User’s Guide, Edition 4
Driver Function Reference
hp4156b_startMeasure
hp4156b_startMeasure
This function starts the specified measurement by the specified channels. You can
read the measured data by using the hp4156b_readData function. The measurement
data is entered to the 4155/4156 output buffer in the measurement order. If you want
to abort the measurement, use the hp4156b_abortMeasure function.
Syntax ViStatus _VI_FUNC hp4156b_startMeasure(ViSession vi, ViInt32 meas_type,
ViInt32 channel[ ], ViInt32 mode[ ], ViReal64 range[ ], ViInt32 source);
Parameters vi Instrument handle returned from hp4156b_init( ).
meas_type Measurement type. 1 (multi spot), 2 (staircase sweep),
3 (pulse spot), 4 (pulse sweep), 5 (sweep with pulsed bias),
10 (sampling), or 11 (stress force).
channel[ ] Channel number of the measurement unit. 1 to 6 (SMU1 to
SMU6), 23 (VMU1), or 24 (VMU2).
Enter 0 to the last element of channel[ ]. For example, if you use
two channels, set the array size to 3, specify the channels to the
first and second elements, and enter 0 to the third element.
mode[ ] Measurement mode. 1 (current, only for SMU) or 2 (voltage).
range[ ] Measurement ranging mode. 0 (auto), positive value (limited
auto), or negative value (fixed range). For the available values,
see Table 2-2 and Table 2-5 or Table 2-7.
source Source data output mode. 0 (measurement data output without
source data) or 1 (measurement data output with source data).
Example
ViSession vi;
ViStatus ret;
ViInt32 mch[3]; /* channel */
mch[0] = 1; /* SMU1 for the 1st measurement channel*/
mch[1] = 2; /* SMU2 for the 2nd measurement channel*/
mch[2] = 0;
ret = hp4156b_setSwitch(vi, mch[0], 1);
ret = hp4156b_setSwitch(vi, mch[1], 1);
ret = hp4156b_setFilter(vi, mch[0], 0);
ViInt32 om = 2; /* output mode: voltage */
ViReal64 or = 0; /* output range: auto */
ViReal64 v1 = 0; /* base voltage */
ViReal64 v2 = 1.5; /* peak voltage */
ViReal64 tw = 0.001; /* width */
ViReal64 tp = 0.01; /* period */
ViReal64 th = 0; /* hold time */
ViReal64 ic = 0.01; /* current compliance */
ret= hp4156b_setPbias(vi, mch[0], om, or, v1, v2, tw, tp, th, ic);