3-46 Agilent B1500 VXIplug&play Driver User’s Guide, Edition 3
Programming Examples for Visual Basic Users
Pulsed Sweep Measurement
ret = agb1500_setAdc(vi, agb1500_HSPEED_ADC,
agb1500_INTEG_MANUAL, smpl, agb1500_FLAG_OFF) ’47
ret = agb1500_setAdcType(vi, agb1500_CH_ALL,
agb1500_HSPEED_ADC)
ret = agb1500_resetTimestamp(vi)
check_err vi, ret ’50
ret = agb1500_force(vi, m(2), agb1500_VF_MODE, 0, 0, 0.05, 0)
Dim d_ib As Double ’secondary sweep step value (delta) ’54
If nop2 = 1 Then
d_ib = 0
Else
d_ib = (ib2 - ib1) / (nop2 - 1)
End If ’59
Dim ibo As Double ’secondary sweep source output ’61
ibo = ib1
i = 0 ’array counter for sweepIv returned data
Line Description
47 to 48 Sets the high speed ADC, and selects it for all measurement
channels.
49 Resets time stamp.
50 Calls the check_err subprogram (shown in Table 3-1) to check if
an error status is returned for the previous line.
52 Applies voltage to device.
54 to 59 Declares a variable, and defines the value. This variable is used
for the step value of the secondary sweep source.
61 to 62 Declares a variable, and defines the value. This variable is used
for the output value of the secondary sweep source.
64 Sets the array counter i to 0.