6146/6156 DC Voltage/Current Generators Operation Manual
5.9.3 Program Example 2-Memory Setting, Scan Operation and Voltage/Source Measurement
5-60
ActiveSheet.Cells(lngRowNo, lngMeasNoCol).Value = lngMeasCnt
ActiveSheet.Cells(lngRowNo, lngIDataCol).Value = strRecvStr
Call aUSBWrt(lngDMMHdl, "F1") ' DC voltage measurement function
Call aUSBWrt(lngVIGHdl, "*TRG") ' Increments the VIG memory number.
If blnUSBComErr = True Then ' USB error check
GoTo ErrExit
End If
lngRowNo = lngRowNo + 1 ' Increments the row number.
End If
DoEvents ' Turns over the control to OS temporarily.
Loop Until blnSWEb = True ' Repeats until the Sweep End bit is set.
Next
ErrExit:
Call aUSBWrt(lngVIGHdl, "SBY") ' Sets the VIG output to OFF.
' Device (instrument) close
Call aUSBCls(lngVIGHdl) ' VIG
Call aUSBCls(lngDMMHdl) ' DMM
' USB driver terminates.
Call aUSBEnd
End Sub